Just started my backend admin development

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Just started my backend admin development
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
But I am getting a blank page when I test this and try and see it. Most of it is commented out. I am just trying to test things before I continue. Don't have an admin image yet. I am typing in [ Register or login to view links on this board. ] and trying to see the admin page for my MILPACS module.

Nothing come back. The page is blank.


<?php
//////////////////////////////////////////////////////////////////////
//===========================
// MILPACS
//
// This is the Military Personell and Classification System.
// Donovan [3rd ID]
//
//
///////////////////////////////////////////////////////////////////////
if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }

$result = sql_query("select radminsuper, radminency from ".$prefix."_authors where aid='$aid'", $dbi);
list($radminency, $radminsuper) = sql_fetch_row($result, $dbi);
if (($radminency==1) OR ($radminsuper==1)) {

function milpacs() {
    global $prefix, $dbi;
    include("header.php");
   GraphicAdmin();
    OpenTable();
    echo "<center><strong>MILPACS 1.0 Administration </strong></center><br>";
   CloseTable();
   echo "<br>";
   OpenTable();
   echo "<strong>Roster Management</strong><br><br>";
    echo "<form action=\"admin.php\" method=\"post\">";   
   echo "<input name=\"Submit\" type=\"Submit\" value=\"Enter Roster Manager\"><input name=\"op\" type=\"hidden\" value=\"rostermanager\"></form>";
   CloseTable();
   echo "<br>";
   OpenTable();
   echo "<strong>Unit Management</strong><br><br>";
   echo "<strong>Edit Units</strong><br>";
   //displayUnits();
   CloseTable();
   echo "<br>";
   OpenTable();
   echo "<strong>Medal Managment</strong><br><br>";
   echo "<form action=\"admin.php\" method=\"post\">";   
   echo "<input name=\"Submit\" type=\"Submit\" value=\"Create New Medal\"><input name=\"op\" type=\"hidden\" value=\"adminMedal\"></form>";
   echo "<form action=\"admin.php\" method=\"post\">";
    //MedalDrop();   
   echo "<select name=\"op\"><option value=\"EditMedal\">Edit Medal</option><option value=\"RemoveMedal\">Delete Medal</option>
   </select><input name=\"Submit\" type=\"Submit\" value=\"Ok\"></form>";
   CloseTable();
   echo "<br>";
   OpenTable();
   echo "<strong>Weapons Manager</strong><br><br>";
   //weaponmanager();
   CloseTable();
   echo "<br>";
   OpenTable();
   echo "<strong>Something</strong><br><br>";
   //something();
   CloseTable();
   echo "<br>";
   OpenTable();
   echo "<strong>Something Else</strong><br><br>";
   //somethingelse();
   CloseTable();
    include("footer.php");
}
///*********************************************************/
///* Roster Manager Functions                              */
///*********************************************************/
//
//function rostermanager() {
//    global $prefix, $dbi;
//    include("header.php");
//    GraphicAdmin();
//    OpenTable();
//    echo "<center><font class=\"title\"><b>Roster Manager</b></font></center>";
//    CloseTable();
//    echo "<br>";
//    OpenTable();
//    echo "<center><font class=\"option\"><b>Select a soldier to edit:</font></center><br>"
//   ."<table border=\"0\" width=\"100%\" align=\"center\" cellpadding=\"2\">";
//    $count = 0;
//    $result = sql_query("select uniqueid, u_rank, u_name from roster_members order by uniqueid", $dbi);
//    while(list($uniqeid, $u_rank, $u_name) = sql_fetch_array($result, $dbi)) {
//   echo "<td align=\"center\">"
//       ."<a href=\"admin.php?op=soldieredit&amp;uniqueid=$uniqueid\"></a><br></td>";
//       }
//    echo "</table>";
//    CloseTable();
//    echo "<br><a name=\"Add\">";
//    OpenTable();
//    echo "
//   <center><font class=\"option\"><b>Add a Soldier</b></font></center><br>"
//  ."<form action=\"admin.php\" method=\"post\">"
//   ."<b>Name:</b><br><br>"
//   ."<input type=\"text\" name=\"u_name\" size=\"20\" maxlength=\"20\" value=\"$u_name\"><br><br>"//   
//   ."</form>";
//    CloseTable();
//    include("footer.php");
//}


//function soldieredit($uniqueid) {
//    global $prefix, $dbi;
//    include("header.php");
//    GraphicAdmin();
//    OpenTable();
//    echo "<center><font class=\"title\"><b>Edit Soldier</b></font></center>";
//    CloseTable();
//    echo "<br>";
//    OpenTable();
//    $result = sql_query("select * from roster_members where uniqeuid=$uniqueid", $dbi);
//    ."<INPUT type=\"submit\" value=\"Save Data\"> <font class=\"content\">[ <a href=\"admin.php?op=soldierdelete&amp;uniqueid=$uniqueid\">**Discharge this soldier**</a> ]</font>"
//   ."</form>";
//    CloseTable();
//    include("footer.php");
//}

else {
    echo "Access Denied";
}
?>



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
You need to add the switch($op) for them and you also need to add the case.milpacs.php.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Just started my backend admin development
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
Thanks Telli,

Question. How hard would it be to use the Combo-Box Viewer from dynamicdrive.com to use for an admin page. That way I could dynamically choose which admin function I want to use, instead if all of them listed one ofter the other on a page. The path for the javascript SRC=\"modules/$module_name/js/switch.js\ isn't in the modules/admin area of Nuke so would I have to hard code it?
[ Register or login to view links on this board. ]

Could I place all this in the begining of my milpacs.php in admin/modules and not worry about an external /js/switch.js file?



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Yes you could do that or just add your url in front of it. [ Register or login to view links on this board. ]

But i am not sure why you need that. Is this for the main menu like when you go to this milpacs admin module?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Just started my backend admin development
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
Well I'm looking for the best way to start designing my administrative page for MILPACS. I would like to have a dynamic drop down box and choose which admin function I need. I am assuming this will go under the admin/modules directory. All this would be the admin part and not be public.



Back to top Reply with quote
#6   re: Just started my backend admin development
Donovan
CZ Active Member
 Codezwiz Site Donator
Donovan has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Web Developer
Gender: Male
Fav. Sports Team: St Louis Cardinals
Status: Offline
Joined: Dec 03, 2003
0.02 posts per day
Posts: 160
Points: 9,216
   
Here is the public part. [ Register or login to view links on this board. ]

Well I have my initial admin page set up using this dynamic switch and it looks pretty good. Using the switch the following gives me a drop down box that I can select from.


OpenTable();
echo "<form name=\"dropmsgform\">";
echo "<center>Administration Menu<br>";
echo "<select name=\"dropmsgoption\" size=\"1\" width: 300px; onChange=\"expandone()\">";
echo "<option selected>Roster Manager</option>";
echo "<option>Unit Manager</option>";
echo "<option>Medal Manager</option>";
echo "<option>Weapons Manager</option>";
echo "<option>Rank Manager</option>";
echo "<option>Soldier of the Month</option>";
echo "</select></center>";
CloseTable();


Then below in another table I have my main pages.

echo"</form><div id=\"dropmsg0\" class=\"dropcontent\">";
echo "<br>";
OpenTable();
echo "<form>";
echo "<H3><center>Roster Management</center></H3>";
echo "<HR>";
echo "<table width='95%' border='0' cellspacing='0' cellpadding='2'>\n";
echo "<div align='center'><p><input type='submit' value='Add Soldier'> </p></div>";
echo "</table>";
echo "</form>";
closetable();


echo "</div><div id=\"dropmsg1\" class=\"dropcontent\">";
echo "<br>";
opentable();
echo "<form>";
echo "<H3><center>Unit Management</center></H3>";
echo "<HR>";
echo "<table width='95%' border='0' cellspacing='0' cellpadding='2'>\n";
echo "<div align='center'><p><input type='submit' value='Add Unit'> </p></div>";
echo "</table>";
echo "</form>";
closetable();


..and so on.

I don't think adding and deleting stuff will be a problem since this will be a straight form, but what about when I need to edit an existing record? Maybe I could have 3 option boxes and select Add, Delete or Edit and then use the drop down box and send me to a function to handle it.

Making the public part to these seemed easy compared to the admin part. icon_cry.gif


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum