Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
hitwalker
Sells PC To Pay For Divorce



Joined:
Posts: 5661

PostPosted: Mon Jan 24, 2005 2:39 pm Reply with quote

ok i got a shop but i just was trying the picture upload function but got this error instead..

Fatal error: Call to undefined function: opentable() in /home/admin.php on line 224

i get the error when im in the shop admin and click for the image upload.
then i get the error as above ....


the code here below is upload script what is called...
parts of html are left out....

anyone can see what can cause it?

Code:


include ("config.php");
require_once("mainfile.php");
global $dbi;

$issafe = ini_get('safe_mode');
if($issafe == "1"){
 GraphicAdmin();
 OpenTable();
 echo "<center><h4>Shopping</h4></center>\n";
 echo "<center><a href=\"admin.php?op=sbsaddprod\">Add Product</a>&nbsp;<a href=\"admin.php?op=sbsaddcat\">Add Category</a>&nbsp;<a href=\"admin.php?op=sbsaddsubscribe\">Add Subscription</a><br>\n";
 echo "<a href=\"admin.php?op=sbsviewinven\">Edit Product/Category/Subscriptions</a>&nbsp;Upload Images<br>\n";
 echo "<a href=\"admin.php?op=sbsinvoices\">Invoice Management</a>&nbsp;<a href=\"admin.php?op=sbsconfig\">Configuration</a><br></center>\n";
 CloseTable();
 echo "<br>\n";

 OpenTable();
 echo "<center><font color=\"#FF0000\"><b>This server's PHP is in SAFE MODE<br>\n";
 echo "This uploading utility will not function in SAFE MODE</b></font></center>\n";
 CloseTable();
 exit();
}


include ("header.php");
GraphicAdmin();
OpenTable();
echo "<center><h4>Shop</h4></center>\n";
echo "<center><a href=\"admin.php?op=sbsaddprod\">Add Product</a>&nbsp;<a href=\"admin.php?op=sbsaddcat\">Add Category</a>&nbsp;<a href=\"admin.php?op=sbsaddsubscribe\">Add Subscription</a><br>\n";
echo "<a href=\"admin.php?op=sbsviewinven\">Edit Product/Category/Subscriptions</a>&nbsp;Upload Images<br>\n";
echo "<a href=\"admin.php?op=sbsinvoices\">Invoice Management</a>&nbsp;<a href=\"admin.php?op=sbsconfig\">Configuration</a><br></center>\n";

CloseTable();
echo "<br>\n";
OpenTable();

if($error) {
 echo ("<font color=\"#FF0000\"><b>* $error</b></font><br><br>");
} elseif ($message) {
 echo ("<font color=\"#0000FF\"><b>$message</b></font><br><br>");
}
echo ("<form action=\"admin.php?op=sbsupload\" method=\"POST\" enctype=\"multipart/form-data\">");
echo ("Upload Directory: images/onlinestore/<br>");
echo ("Choose the thumbnail to upload: <input type=\"file\" name=\"thumbnail\"><br>");
echo ("Choose the image to upload: <input type=\"file\" name=\"image\"><br>");
echo ("<center><input type=\"submit\" name=\"submit\" value=\"Upload Files\"></center>");
echo ("</form>");
CloseTable();
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Jan 24, 2005 6:16 pm Reply with quote

What is line 224?
 
View user's profile Send private message
hitwalker







PostPosted: Mon Jan 24, 2005 6:48 pm Reply with quote

yeah i hope you understood i mean nukes admin.php... Sad

anyway nukes admin.php line 224..

Code:


if ($radminsuper == 1) {
       OpenTable();
       echo "<center><a href=\"".$admin_file.".php\"><font class='title'>"._ADMINMENU."</font></a>";
       echo "<br><br>";
       echo"<table border=\"0\" width=\"100%\" cellspacing=\"1\"><tr>";
       $linksdir = dir("admin/links");
       while($func=$linksdir->read()) {
           if(substr($func, 0, 6) == "links.") {
              $menulist .= "$func ";


And the error doesnt happen on the testsite but that has not much installed..

i noticed that the script wants to open a table to let me know i cant upload cause of safe-mode.(table with text)


Like i posted...
Code:


OpenTable();
 echo "<center><font color=\"#FF0000\"><b>This server's PHP is in SAFE MODE<br>\n";
 echo "This uploading utility will not function in SAFE MODE</b></font></center>\n";
 CloseTable();
 exit();
}




But the author is looking into that now...
but i would like to know where the problem sits..
 
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Mon Jan 24, 2005 7:00 pm Reply with quote

In the code you posted in the first post add include ("header.php"); above GraphicAdmin();
 
View user's profile Send private message Visit poster's website
hitwalker







PostPosted: Mon Jan 24, 2005 7:11 pm Reply with quote

hi cs,

im not sure exactly what you mean but just above this part....
Code:


include ("header.php");
GraphicAdmin();


i only took out some html stuff lines like..
Code:
HTTP_POST_FILES
 
chatserv







PostPosted: Mon Jan 24, 2005 8:01 pm Reply with quote

Code:
include ("config.php"); 

require_once("mainfile.php");
global $dbi;

$issafe = ini_get('safe_mode');
if($issafe == "1"){
 GraphicAdmin();
 OpenTable();

Should have a call to header.php
Code:
include ("config.php"); 

require_once("mainfile.php");
global $dbi;

$issafe = ini_get('safe_mode');
if($issafe == "1"){
 include ("header.php");
 GraphicAdmin();
 OpenTable();

Or you could also try adding the call to header.php below the one for mainfile.php so that it gets used on all sections of code.
 
hitwalker







PostPosted: Mon Jan 24, 2005 8:04 pm Reply with quote

ok thanks,il give that a try....
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©