Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Admin Panel help

Asked Modified Viewed 1,200 times
S
Samuel MS
S
I'm not good at English.
  • Member, joined since
  • Contributed 70 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
asked
Member

I make a upgrade page, and i upgrade my site. But at the admin panel, my page cannot displayed. Anyone help me please.
Here is my file:-
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: upgrade.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../maincore.php";

if (!checkrights("U") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }

require_once THEMES."templates/admin_header.php";
if (file_exists(LOCALE.LOCALESET."admin/upgrade.php")) {
   include LOCALE.LOCALESET."admin/upgrade.php";
} else {
   include LOCALE."English/admin/upgrade.php";
}

opentable($locale['400']);
echo "<div style='text-align:center'><br />\n";
echo "<form name='upgradeform' method='post' action='".FUSION_SELF.$aidlink."'>\n";

if (str_replace(".", "", $settings['version']) < "xxxxx") {
   if (!isset($_POST['stage'])) {
      echo sprintf($locale['500'], $locale['504'])."<br />\n".$locale['501']."<br /><br />\n";
      echo "<input type='hidden' name='stage' value='2'>\n";
      echo "<input type='submit' name='upgrade' value='".$locale['400']."' class='button'><br /><br />\n";
   } elseif (isset($_POST['upgrade']) && isset($_POST['stage']) && $_POST['stage'] == 2) {
              $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."entu");
                     $result = dbquery("CREATE TABLE ".$db_prefix."entu (
                     entu_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
                     entu_subject VARCHAR(200) NOT NULL DEFAULT '',
                     entu_image VARCHAR(100) NOT NULL DEFAULT '',
                     entu_image_t1 VARCHAR(100) NOT NULL DEFAULT '',
                     entu_image_t2 VARCHAR(100) NOT NULL DEFAULT '',
                     entu_cat MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
                     entu_news TEXT NOT NULL,
                     entu_extended TEXT NOT NULL,
                     entu_breaks CHAR(1) NOT NULL DEFAULT '',
                     entu_name MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '1',
                     entu_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     entu_start INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     entu_end INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     entu_visibility TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
                     entu_reads INT(10) UNSIGNED NOT NULL DEFAULT '0',
                     entu_draft TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
                     entu_sticky TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
                     entu_allow_comments TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
                     entu_allow_ratings TINYINT(1) UNSIGNED NOT NULL DEFAULT '1',
                     PRIMARY KEY (entu_id),
                     KEY entu_datestamp (entu_datestamp),
                     KEY entu_reads (entu_reads)
                     ) TYPE=MyISAM;");

                     if (!$result) { $fail = true; }

                     $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."entu_cats");
                     $result = dbquery("CREATE TABLE ".$db_prefix."entu_cats (
                     entu_cat_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
                     entu_cat_name VARCHAR(100) NOT NULL DEFAULT '',
                     entu_cat_image VARCHAR(100) NOT NULL DEFAULT '',
                     PRIMARY KEY (entu_cat_id)
                     ) TYPE=MyISAM;");

                     if (!$result) { $fail = true; }

   
      $result = dbquery("UPDATE ".DB_SETTINGS." SET settings_value='xxxx' WHERE settings_name='version'");
      echo $locale['502']."<br /><br />\n";
   }
} else {
   echo $locale['401']."<br /><br />\n";
}
   
echo "</form>\n</div>\n";
closetable();

require_once THEMES."templates/footer.php";
?>


Edit: Please use the codetags /SiteMaster

Merged on Jun 02 2011 at 01:58:05:
What is code tag
Edited by Samuel MS on 01-06-2011 21:28,
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

S
S
I'm not good at English.
  • Member, joined since
  • Contributed 70 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet