honus Posted June 10, 2007 Share Posted June 10, 2007 This simple php content manager was working on one server, but when I switched hosting companies I can no longer get it to work. I think it is because I need something like >>> $ip = $_POST['ip']; <<< for the form to work but I am not sure how to impliment it. Can someone look at this and help please? Here is my index.php page: <?php include("./includes/config.inc.php"); if($mode == "log_out") { $empower->logOut(); unset($mode); unset($session); } if(($mode == "view") && (!$session)){ if($session = $empower->checkLogin($user, $pass, $remember)){ $html = $empower->html(); $empower->useTemplate("main.tem.php"); } else { $error = 1; $empower->useTemplate("login.tem.php"); } } elseif(($session) || ($empower->AUTH == 0)){ if($mode == "save"){ $empower->saveText($data, $saved_file); } $html = $empower->html(); $empower->useTemplate("main.tem.php"); } else { $empower->useTemplate("login.tem.php"); } ?> ...and here is the page that I think is having the problem: <html> <head> <title>ADMIN FOR CCJV WEBSITE</title> <META HTTP-EQUIV="Expires" CONTENT="25"> <META NAME="robots" CONTENT="noindex, nofollow"> <script language="JavaScript"> <!-- function resetMenu1(){ document.menu.file.value = ""; } function resetMenu2(){ document.menu.directory.value = "<?php print $html[dirValue]; ?>"; } function go(url){ window.location.href = url; } function helpWindow() { helpWin = window.open('<?php print $html[helpURL]; ?>', 'help', ['width=380','height=400','scrollbars=yes']) helpWin.top.focus(); } //--> </script> </head> <body bgcolor="#FFFFFF" text="#000000" link="#606FAF" vlink="#606FAF" alink="#606FAF" topmargin=2 marginheight=2> <table border=0 width=702 cellspacing=0 cellpadding=0> <tr> <td height=16 align=right> <font face="verdana,arial,helvetica" size=2> <?php if($html[auth] == 1){ ?><a href="<?php print $PHP_SELF; ?>?mode=log_out">log out[/url] | <?php } ?><a href="javascript:helpWindow();">help[/url] </font> </td> </tr> </table> <table bgcolor="#000000" border=0 cellspacing=0 cellpadding=1> <tr> <td> <!-- begin nesting --> <table border=0 cellspacing=0 cellpadding=0 width=702> <tr> <td height=30 bgcolor="#606FAF"> </td> <td height=30 bgcolor="#6B73B5"> <!-- begin nesting --> <table border=0 cellspacing=0 cellpadding=2> <form action="<?php echo $PHP_SELF; ?>" name="menu" method="post"> <input type="hidden" name="user" value="<?php print $html[user]; ?>"> <input type="hidden" name="pass" value="<?php print $html[pass]; ?>"> <input type="hidden" name="session" value="<?php print $html[session]; ?>"> <tr> <td> <?php print $html[directoryDropDown]; ?> </td> <td> <input type="submit" value="open dir"> </td> <td> <?php print $html[fileDropDown]; ?> </td> <td> <input type="submit" value="open file"> </td> </tr> </form> </table> <!-- end nesting --> </td> <td align=right height=36 bgcolor="#6B73B5"> <font face="verdana,arial,helvetica" size=4 color="#FFFFFF"> ADMIN </font> </td> </tr> </table> <!-- end nesting --> </td> </tr> </table> <?php if($html[data][box_count]>0){ ?> <form action="<?php print $PHP_SELF; ?>" method="post"> <input type="hidden" name="mode" value="save"> <input type="hidden" name="saved_file" value="<?php print $html[file]; ?>"> <table border=0 width=704> <tr> <td> <!-- begin nesting --> <table border=0 cellpadding=0 cellspacing=0> <tr> <td height=30> <font face="verdana,arial,helvetica" size=2> FILE Location: </font> </td> <td height=30> <font face="verdana,arial,helvetica" size=2> <?php print $file; ?> </font> </td> </tr> <?php if($html[meta] == 1){ ?> <tr> <td height=30> <font face="verdana,arial,helvetica" size=2> META Keywords: </font> </td> <td height=30> <input type="text" name="data[meta_keywords]" size=60 value="<?php print stripslashes($html[data][meta_keywords]); ?>"> <input type="hidden" name="data[keywords_line]" value="<?php print $html[data][keywords_line]; ?>"> </td> </tr> <tr> <td height=30> <font face="verdana,arial,helvetica" size=2> META Description: </font> </td> <td height=30> <input type="text" name="data[meta_description]" size=60 value="<?php print stripslashes($html[data][meta_description]); ?>"> <input type="hidden" name="data[description_line]" value="<?php print $html[data][description_line]; ?>"> </td> </tr> <?php } ?> <?php if($html[title] == 1){ ?> <tr> <td height=30> <font face="verdana,arial,helvetica" size=2> PAGE Title: </font> </td> <td height=30> <input type="text" name="data[page_title]" size=60 value="<?php print stripslashes($html[data][page_title]); ?>"> <input type="hidden" name="data[title_line]" value="<?php print $html[data][title_line]; ?>"> </td> </tr> <?php } ?> </table> <!-- end nesting --> <p><font color="#990033">HTML CODE REMINDERS</font><font color="#990033"> Press the 'enter' key to move to the next line. Press the 'enter' key 2 times to put a space between the next line. <b>bold</b> <i>italics</i> <hr> (line to seperate text)</font></p> </td> </tr> <?php for($i=0; $i<$html[data][box_count]; $i++){ ?> <tr> <td> <font face="verdana,arial,helvetica" size=2> PAGE Text:</font> <input type="hidden" name="<?php print "data[begin_line][$i]"; ?>" value="<?php print $html[data][begin_line][$i]; ?>"> <input type="hidden" name="<?php print "data[end_line][$i]"; ?>" value="<?php print $html[data][end_line][$i]; ?>"> <textarea name="<?php print "data[page_text][$i]"; ?>" cols=75 rows=13 wrap="virtual"><?php print "\n".stripslashes(chop($html[data][page_text][$i]))."\n"; ?></textarea> </td> </tr> <?php } ?> <tr> <td> <font face="verdana,arial,helvetica" color="gray" size=1> Convert new lines to line breaks: <?php print $html[convert_status]; ?> META Keywords & Description: <?php print $html[meta_status]; ?> PAGE Title: <?php print $html[title_status]; ?> HTML: <?php print $html[html_status]; ?> </font> <input type="submit" value="Save Changes!"> </td> </tr> </table> </form> <?php } else { ?> <table border=0 width=704 cellspacing=0 cellpadding=0> <tr> <td bgcolor="#000000" valign=top height=350 align=center> <font face="verdana,arial,helvetica" color="#FFFFFF" size=2> <?php print $html[msg]; ?></font> </td> </tr> </table> <?php } ?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/54930-my-simple-content-mgr-worked-on-one-server-but-not-on-another/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.