<?
//*****************************************************************************
function Startup_Operation(){
$content = null;
$obj_tempdbarray = new CTempDBArray();
$obj_tempdbengine = new CTempDBEngine();
$current = "id=\"current\"";
$active = "id=\"active\"";
$content .= "
<div id=\"navcontainer\">
<ul id=\"navlist\">";
$content .= "<li $active><a href=\"".basename($PHP_SELF)."?mode=admin\" $current>"._CONTROL_PANEL_."</a>";
$content .= "
<strong>".$_SESSION['uname']."</strong>
</ul>
</div>";
$count_td = 0;
$content .= "
<table width=\"90%\" height=\"100%\">
<tr>";
/*******************************************************************************/
//Home View
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?mode=user\">
<img src=\"./images/icon48/home.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_HOME_."
</a>
</td>";
/*******************************************************************************/
//Logout
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=logout\">
<img src=\"./images/icon48/logout.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_LOGOUT_."
</a>
</td>";
/*******************************************************************************/
$content .= "
<td align=\"center\" width=\"20%\">
</td>";
/*******************************************************************************/
$content .= "
<td align=\"center\" width=\"20%\">
</td>";
/*******************************************************************************/
$content .= "
<td align=\"center\" width=\"20%\">
</td>";
$content .= "
</tr>
</table>";
$count_td = 0;
$content .= "
<hr>
<table width=\"90%\" height=\"100%\">
<tr>";
/*******************************************************************************/
//Page Administration Permission
if (permission_of("structure")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=structure\">
<img src=\"./images/icon48/pages.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_PAGE_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
/*******************************************************************************/
//File Administration Permission
if (permission_of("filemanager")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=filemanager\">
<img src=\"./images/icon48/files.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_FILE_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
/*******************************************************************************/
//Content Administration Permission
if (permission_of("content")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=content\">
<img src=\"./images/icon48/contents.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_CONTENT_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
/*******************************************************************************/
//Style Administration Permission
if (permission_of("style")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=style\">
<img src=\"./images/icon48/styles.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_STYLE_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
/*******************************************************************************/
//Language Administration Permission
if (permission_of("language")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=language\">
<img src=\"./images/icon48/languages.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_LANGUAGE_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
/*******************************************************************************/
//Contact Administration Permission
if (permission_of("contact")){
$SQL = "SELECT * FROM contact_us ";
$SQL .= "WHERE active=1 ";
if (!$all)
$SQL .= "AND read_message=0 ";
$obj_tempdbarray = $obj_tempdbengine->GetRows($SQL);
$total_record = $obj_tempdbarray->count();
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=contact\">
<img src=\"./images/icon48/contacts.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_CONTACT_ADMINISTRATION_."";
if ($total_record>0){
$content .= "($total_record)";
$content .= "<br><img src=\"./images/animated/message.gif\" border=\"0\"><br>";
}
$content .= "
</a>
</td>";
$count_td++;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
/*******************************************************************************/
//My Information
//if (permission_of("myinfo")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=myinfo\">
<img src=\"./images/icon48/personel.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_USER_INFORMATION_."
</a>
</td>";
$count_td++;
//}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
/*******************************************************************************/
//User Administration Permission
if (permission_of("user")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=user\">
<img src=\"./images/icon48/users.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_USER_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
/*******************************************************************************/
//Backup Administration Permission
if (permission_of("mysql")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=mysql\">
<img src=\"./images/icon48/mysql.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_MYSQL_ADMINISTRATION_."
</a>
</td>";
$count_td++;
//For direct access restriction
session_register("mysqlbackuppro");
$_SESSION['mysqlbackuppro'] = 1;
}
else{
//For direct access restriction
session_register("mysqlbackuppro");
$_SESSION['mysqlbackuppro'] = 0;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
/*******************************************************************************/
//Restore Administration Permission
/*
if (permission_of("restore")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=restore\">
<img src=\"./images/icon48/restore.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_RESTORE_ADMINISTRATION_."
</a>
</td>";
$count_td++;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
*/
/*******************************************************************************/
//Extra Modules Permission
if (permission_of("extra")){
$content .= "
<td align=\"center\" width=\"20%\">
<a href=\"".basename($PHP_SELF)."?f=extra\">
<img src=\"./images/icon48/modules.png\" width=\"48\" height=\"48\" border=\"0\"><br>
"._CP_EXTRA_MODULES_."
</a>
</td>";
$count_td++;
}
if ($count_td>=5){
$content .= "</tr><tr>";
$count_td = 0;
}
else{
for ($count_td; $count_td<=5; $count_td++){
$content .= "
<td align=\"center\" width=\"20%\">
</td>";
}
$count_td=0;
}
$content .= "
</tr>
</table>";
//echo "count_td : $count_td<br>";
return $content;
}
?>