Location: PHPKode > projects > VCore > v25b10/main.php
<?php
require_once ('database/db.php');
$title = "Main Menu";
?>

<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
  <?php
if ($_SESSION['username'] == "") {
	die("You are not logged in...<br><br><p align=center><font size=2>[ <a href=index.php target=_parent>Go To Login</a> ]</font></p>");
}
if (isset($row_Config['broadcastmessage'])) {
	if ($row_Config['broadcastmessage'] <> '') {
		echo '<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000"><tr><td><strong>Message from the administration:</strong> '.$row_Config['broadcastmessage'].'</td></tr></table><br>';
	}
}
?>
  </font></p>
<?php
$colname_Modules = "1";
mysql_select_db($database_Customer_Database, $Customer_Database);
$query_Modules = sprintf("SELECT * FROM modules WHERE active='1' ORDER BY name");
$Modules = mysql_query($query_Modules, $Customer_Database);
$row_Modules = mysql_fetch_assoc($Modules);
$totalRows_Modules = mysql_num_rows($Modules);

switch ($row_User['Rank']) {
    case "User":
    $rank = 4;
    break;    
  case "Rep":
    $rank = 3;
    break;
  case "Power User":
    $rank = 2;
    break;
  case "Admin":
    $rank = 1;
    break;
}

$icon = 1;
$noupdate = "false";

echo ('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr align="center" valign="top">');
?>
<!-- <td width="25%" height="50"><font size="2"><a href="?page=install"><img src="images/icons/addon.gif" alt="Install Scripts" width="32" height="32" border="0"></a><br>Install Scripts</font></td> -->
<!--
<td height="40"><font size="2"> 
      <form action="filemanager/index.php" method="post" name="LoginForm" target="_blank" id="LoginForm">
        <input type="hidden" name="input_ftpserver" value="<?php echo $row_Config['ftpserver']; ?>">
        <input type="hidden" name="input_ftpserverport" value="21">
        <input type="hidden" name="input_username" value="<?php echo $_SESSION['username']; ?>">
        <input type="hidden" name="input_password" value="<?php echo $_SESSION['password']; ?>">
        <input type="hidden" name="input_skin" value="1">
        <input type="hidden" name="state" value="browse">
        <input type="hidden" name="state2" value="main">
        <a href="javascript:void(document.LoginForm.submit())"><img src="images/icons/fileman.gif" alt="File Manager" width="32" height="32" border="0"></a><br>
        <font size="2">File Manager </font> 
      </form>
      </font></td> -->
<?php

do {
	if ($icon < 4) {
		if ($rank <= $row_Modules['permissions']) {
			echo ('<td width="25%" height="1"><font size="2"><a href="?page='.$row_Modules['name'].'"><img src="'.$row_Modules['icon'].'" alt="'.$row_Modules['title'].'" width="32" height="32" border="0"></a><br>'.$row_Modules['title'].'</font></td>');
		}else{
			$noupdate = "true";
		}
	}else{
		if ($rank <= $row_Modules['permissions']) {
			echo ('<td width="25%" height="50"><font size="2"><a href="?page='.$row_Modules['name'].'"><img src="'.$row_Modules['icon'].'" alt="'.$row_Modules['title'].'" width="32" height="32" border="0"></a><br>'.$row_Modules['title'].'</font></td>');
			echo ('</tr><tr align="center" valign="top"><td width="25%" height="1"><font size="2">&nbsp;</font></td><td width="25%" height="1"><font size="2">&nbsp;</font></td><td width="25%" height="1"><font size="2">&nbsp;</font></td><td width="25%" height="1"><font size="2">&nbsp;</font></td></tr><tr align="center" valign="top">');
		}else{
			$noupdate = "true";
		}
	}

//update counter

	if ($noupdate != "true") {
	
		if ($icon == 4) {
			$icon = 1;
		}else{		
			$icon = $icon + 1;
		}
		
	}
$noupdate = "false";
} while ($row_Modules = mysql_fetch_assoc($Modules));

?>
</tr>
</table>
<HEAD>

<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200,left = 540,top = 412');");
}
</script>

<?php if ($row_User['unansweredpm'] == '1') {
	echo "<script>popUp('newpm.php');</script>";
	$updateSQL = "UPDATE custumerbase SET unansweredpm='0' WHERE servicename='".$_SESSION['username']."'";

	mysql_select_db($database_Customer_Database, $Customer_Database);
	$Update = mysql_query($updateSQL, $Customer_Database) or die(mysql_error());
}
?>
Return current item: VCore