Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Padekit durniui... su grafa v3

Parašė nebespank· 2008 Kov. 30 15:03:53
#24

Jai gali surask , nes nemaciau kiek ziurejau kur reikia keist:|

<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "../maincore.php";
require_once BASEDIR."subheader.php";
require_once ADMIN."navigation.php";

if (!iADMIN || $userdata['user_rights'] == "" || !defined("iAUTH") || $aid != iAUTH) fallback("../index.php");
if (!isset($pagenum) || !isNum($pagenum)) $pagenum = 1;

$admin_images = true;

// Work out which tab is the active default
if ($page1) { $default = 1; }
elseif ($page2) { $default = 2; }
elseif ($page3) { $default = 3; }
elseif ($page4) { $default = 4; }
else { fallback("../index.php"); }

// Ensure the admin is allowed to access the selected page
$pageon = true;
if ($pagenum == 1 && !$page1) $pageon = false;
if ($pagenum == 2 && !$page2) $pageon = false;
if ($pagenum == 3 && !$page3) $pageon = false;
if ($pagenum == 4 && !$page4) $pageon = false;
if ($pageon == false) redirect("index.php".$aidlink."&pagenum=$default");

/*
// Updates
if ($settings['updatecheck_datestamp'] < (time()-3600))
{
   $file = @fopen ("http://extreme-fusion.pl/bin/version_4.php", "r");
   if ($file) {
         $update_version = fgets ($file, 128);
         fclose ($file);
      $result = dbquery("UPDATE ".$d_prefix."settings SET updatecheck_datestamp='".time()."', update_version='$update_version'");
      redirect(FUSION_SELF.$aidlink);
   } else    $result = dbquery("UPDATE ".$d_prefix."settings SET updatecheck_datestamp='0', update_version='0'");
}
$update_version = $settings['update_version'];
if (str_replace(".","",$update_version) > str_replace(".","",$settings['ep_version']))
{
   opentable ($locale['261']);
   echo "<a href='http://extreme-fusion.pl/bin/updates/show2.php?version=".$settings['ep_version']."' target='_blank' style='color:red;'>".$locale['262']."</a>";
   closetable();
   tablebreak();
} else if ($update_version==0) {
   opentable ($locale['261']);
   echo "<a href='http://extreme-fusion.pl/bin/updates/show2.php?version=".$settings['ep_version']."' target='_blank' style='color:orange;'>".$locale['263']."</a>";
   closetable();
   tablebreak();
   
}*/


// Display admin panels & pages
opentable($locale['200']);
echo "<table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
if ($page1) {
   echo "<td align='center' width='25%' class='".($pagenum == 1 ? "tbl1" : "tbl2")."'><span class='small'>\n";
   echo ($pagenum == 1 ? "<b>".$locale['ac01']."</b>" : "<a href='index.php".$aidlink."&amp;pagenum=1'>".$locale['ac01']."</a>")."</span></td>\n";
}
if ($page2) {
   echo "<td align='center' width='25%' class='".($pagenum == 2 ? "tbl1" : "tbl2")."'><span class='small'>\n";
   echo ($pagenum == 2 ? "<b>".$locale['ac02']."</b>" : "<a href='index.php".$aidlink."&amp;pagenum=2'>".$locale['ac02']."</a>")."</span></td>\n";
}
if ($page3) {
   echo "<td align='center' width='25%' class='".($pagenum == 3 ? "tbl1" : "tbl2")."'><span class='small'>\n";
   echo ($pagenum == 3 ? "<b>".$locale['ac03']."</b>" : "<a href='index.php".$aidlink."&amp;pagenum=3'>".$locale['ac03']."</a>")."</span></td>\n";
}
if ($page4) {
   echo "<td align='center' width='25%' class='".($pagenum == 4 ? "tbl1" : "tbl2")."'><span class='small'>\n";
   echo ($pagenum == 4 ? "<b>".$locale['ac04']."</b>" : "<a href='index.php".$aidlink."&amp;pagenum=4'>".$locale['ac04']."</a>")."</span></td>\n";
}
echo "</tr>
<tr>
<td colspan='4' class='tbl1'>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."admin WHERE admin_page='$pagenum' ORDER BY admin_title");
$rows = dbrows($result);
if ($rows != 0) {
   $counter = 0; $columns = 4;
   $align = $admin_images ? "center" : "left";
   echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
   while ($data = dbarray($result)) {
      if (checkrights($data['admin_rights']) && $data['admin_link'] != "reserved") {
         if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
         echo "<td align='$align' width='25%' class='tbl'>";
         if ($admin_images) {
            echo "<span class='small'><a href='".$data['admin_link'].$aidlink."'><img src='".ADMIN."images/".$data['admin_image']."' alt='".$data['admin_title']."' style='border:0px;'><br>\n".$data['admin_title']."</a></span>";
         } else {
            echo "<span class='small'><img src='".THEME."images/bullet.gif' alt=''> <a href='".$data['admin_link'].$aidlink."'>".$data['admin_title']."</a></span>";
         }
         echo "</td>\n";
         $counter++;
      }
   }
   echo "</tr>\n</table>\n";
} else {
   echo "<center><br>\n".$locale['401']."<br><br>\n</center>\n";
}
echo "</td>\n</tr>\n</table>\n
<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n
<tr><td class='small'>PHP-Fusion ".$settings['version']." v".$settings['ep_version']."</td></tr></table>\n";
closetable();
tablebreak();
opentable($locale['250']);
echo "<table align='center' cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td valign='top' width='33%' class='small'>
".$locale['251']." ".dbcount("(user_id)", "users", "user_status<='1'")."<br>
".$locale['252']." ".dbcount("(user_id)", "users", "user_status='2'")."<br>
".$locale['253']." ".dbcount("(user_id)", "users", "user_status='1'")."
</td>";
$new = dbcount("(submit_id)", "submissions", "submit_type='n'");
$art = dbcount("(submit_id)", "submissions", "submit_type='a'");
$lin = dbcount("(submit_id)", "submissions", "submit_type='l'");
$fil = dbcount("(submit_id)", "submissions", "submit_type='f'");
$pho = dbcount("(submit_id)", "submissions", "submit_type='p'");
$com = dbcount("(submit_id)", "submissions", "submit_type='c'");
echo"<td valign='top' width='33%' class='small'><a href='".ADMIN."submissions.php".$aidlink."' style='text-decoration:none;'>
".($new == 0 ? '' : '<b>'.$locale[254].' '.$new.' </b><br>')."
".($art == 0 ? '' : '<b>'.$locale[255].' '.$art.' </b><br>')."
".($lin == 0 ? '' : '<b>'.$locale[256].' '.$lin.' </b><br>')."
".($fil == 0 ? '' : '<b>'.$locale[260].' '.$fil.' </b><br>')."
".($pho == 0 ? '' : '<b>'.$locale[266].' '.$pho.' </b><br>')."
".($com == 0 ? '' : '<b>'.$locale[275].' '.$com.' </b><br>')."
</a>";
if(!$new && !$art && !$lin && !$fil && !$pho && !$com) echo $locale[276];
echo"<td valign='top' width='33%' class='small'>
".$locale['257']." ".dbcount("(comment_id)", "comments")."<br>
".$locale['258']." ".dbcount("(shout_id)", "shoutbox")."<br>
".$locale['259']." ".dbcount("(post_id)", "posts")."<br>
".$locale['267']." ".dbcount("(photo_id)", "photos")."
</td>\n</tr>\n</table>\n";
closetable();

echo "</td>\n";
require_once BASEDIR."footer.php";
?>