?? sort.php
字號:
<?php
require ("../include/config.php");
require ("./global.php");
include ("../include/header.php");
$cookie_user = $HTTP_COOKIE_VARS[$cookie_name.'_user'];
$cookie_pass = $HTTP_COOKIE_VARS[$cookie_name.'_pass'];
// check cookie
islogin($cookie_user,$cookie_pass);
mysql_pconnect($dbhost,$dbuser,$dbpasswd);
echo "<center>\n";
echo "<table border=0 cellspacing=0 style='border-collapse:collapse' width=735 height=233 cellpadding=3>\n";
echo "<tr>\n";
echo "<td width=185 valign=top>\n";
adminmenu();
echo "</td>\n";
echo "<td width=550 valign=top>\n";
if ($senddelsort2):
delsort2($id);
end;
else:
if ($senddelsort1):
delsort1($id);
end;
else:
if ($delsort2):
$sql = "SELECT * FROM $down_sort2_table WHERE id=$id";
$result = mysql_db_query($dbname, $sql);
$obj = mysql_fetch_object($result);
$sort2 = $obj->sort2;
echo "<form method=POST action=sort.php>\n";
echo "<center><br><br><br><br><br>";
echo "serial number:<input type=text name=id value='$id' size=3 class=border style='color:#000000; background-color:#efefef' readonly> \n";
echo "name:<input type=text name=sort2 value='$sort2' size=15 class=border style='color:#000000; background-color:#efefef'> \n";
echo "<br><br>Note: this will also delete to delete all the records in this category, make sure?";
echo "<br><br><input type=submit value=' make sure ' name=senddelsort2 class=border style='color: #000000; background-color: #efefef'> \n";
echo "<a href=javascript:history.back(1)>Click here to return</a>";
echo "</form>";
end;
else:
if ($delsort1):
$sql = "SELECT * FROM $down_sort1_table WHERE id=$id";
$result = mysql_db_query($dbname, $sql);
$obj = mysql_fetch_object($result);
$sort1 = $obj->sort1;
echo "<form method=POST action=sort.php>\n";
echo "<center><br><br><br><br><br>";
echo "serial number:<input type=text name=id value='$id' size=3 class=border style='color:#000000; background-color:#efefef' readonly> \n";
echo "name:<input type=text name=sort1 value='$sort1' size=15 class=border style='color:#000000; background-color:#efefef'> \n";
echo "<br><br>Note: this will also delete to delete all the records in this category, make sure?";
echo "<br><br><input type=submit value=' make sure ' name=senddelsort1 class=border style='color: #000000; background-color: #efefef'> \n";
echo "<a href=javascript:history.back(1)>Click here to return</a>";
echo "</form>";
end;
else:
if ($sendeditsort2):
editsort2($id,$sort2,$description,$sort1id);
end;
else:
if ($sendeditsort1):
editsort1($id,$sort1,$description);
end;
else:
if ($editsort1):
if ($id == ""):
echo "<center><br><br><br><br><br>No choice Category ";
echo "<a href=./sort.php>Click here to return</a>";
else:
echo "<table border=0 cellspacing=0 width=90% cellpadding=3>\n";
echo "<tr>\n";
echo "<td class=shadow2 align=center>\n";
echo "<b>--==Edit big categories==--</b>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td align=center><br><br>\n";
$sql = "SELECT * FROM $down_sort1_table WHERE id=$id";
$result = mysql_db_query($dbname, $sql);
$obj = mysql_fetch_object($result);
$sort1 = $obj->sort1;
$description = $obj->description;
echo "largest categories:serial number ";
echo "<input type=text name=id value='$id' size=3 class=border style='color:#000000; background-color:#efefef' readonly> \n";
echo " name ";
echo "<input type=text name=sort1 value='$sort1' size=15 class=border style='color:#000000; background-color:#efefef'> \n";
echo " Description ";
echo "<input type=text name=description value='$description' size=15 class=border style='color:#000000; background-color:#efefef'> \n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align=center>\n";
echo "<br><input type=submit value=submit name=sendeditsort1 class=border style='color: #000000; background-color: #efefef'> \n";
echo "<input type=reset value=refill class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>\n";
echo "</tr>\n";
echo "</table>\n";
endif;
elseif ($editsort2):
if ($id == ""):
echo "<center><br><br><br><br><br>No choice Category ";
echo "<a href=./sort.php>Click here to return</a>";
else:
echo "<table border=0 cellspacing=0 width=90% cellpadding=3>\n";
echo "<tr>\n";
echo "<td class=shadow2 align=center>\n";
echo "<b>--==Edit small categories==--</b>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td align=center><br><br>\n";
$sql = "SELECT * FROM $down_sort2_table WHERE id=$id";
$result = mysql_db_query($dbname, $sql);
$obj = mysql_fetch_object($result);
$sort2 = $obj->sort2;
$description = $obj->description;
$sort1id = $obj->sort1id;
echo "small categories:serial number ";
echo "<input type=text name=id value='$id' size=3 class=border style='color:#000000; background-color:#efefef' readonly> \n";
echo " name ";
echo "<input type=text name=sort2 value='$sort2' size=15 class=border style='color:#000000; background-color:#efefef'> \n";
echo " Description ";
echo "<input type=text name=description value='$description' size=15 class=border style='color:#000000; background-color:#efefef'> \n";
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);
$typesql = "SELECT * FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
echo "<select size=1 name=sort1id style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value=''>big category</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
if ($typerow[id] == $sort1id):
echo "<option value=".$typerow[id]." selected>".$typerow[sort1]."</option>\n";
else:
echo "<option value=".$typerow[id].">".$typerow[sort1]."</option>\n";
endif;
}
echo "</select> \n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align=center>\n";
echo "<br><input type=submit value=submit name=sendeditsort2 class=border style='color: #000000; background-color: #efefef'> \n";
echo "<input type=reset value=refill class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>\n";
echo "</tr>\n";
echo "</table>\n";
endif;
else:
if ($addsort2):
addsort2($newsort2,$description,$sort1id);
end;
else:
if ($addsort1):
addsort1($newsort1,$description);
end;
else:
echo "<center>";
echo "<table border=0 cellspacing=0 width=90% cellpadding=3>\n";
echo "<tr>\n";
echo "<td class=shadow2 align=center>\n";
echo "<b>--==Classify Managemen==--</b>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=shadow2>\n";
echo "<br><b>Add Classify:</b>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td>\n";
echo "wallpaper type";
echo "<input type=text name=newsort1 size=12 class=border style='color:#000000; background-color:#efefef'>\n";
echo " Description ";
echo "<input type=text name=description size=12 class=border style='color:#000000; background-color:#efefef'> \n";
echo "<input type=submit value=add name=addsort1 class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td>\n";
echo "small categories name";
echo "<input type=text name=newsort2 size=12 class=border style='color:#000000; background-color:#efefef'>\n";
echo " Description ";
echo "<input type=text name=description size=12 class=border style='color:#000000; background-color:#efefef'> \n";
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);
$typesql = "SELECT * FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
echo "<select size=1 name=sort1id style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>typeresult</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[sort1]."</option>\n";
}
echo "</select> \n";
echo "<input type=submit value=add name=addsort2 class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=shadow2>\n";
echo "<br><b>Editor Category:</b>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td>\n";
echo "big category:";
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);
$typesql = "SELECT * FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
echo "<select size=1 name=id style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>choose big category</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[sort1]."</option>\n";
}
echo "</select> \n";
echo "<input type=submit value=editor name=editsort1 class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td>\n";
echo "small category:";
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort2_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);
$typesql = "SELECT * FROM $down_sort2_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
echo "<select size=1 name=id style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>choose small category</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[sort2]."</option>\n";
}
echo "</select> \n";
echo "<input type=submit value=editor name=editsort2 class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=shadow2>\n";
echo "<br><b>delete classify:</b>";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td>\n";
echo "big category:";
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);
$typesql = "SELECT * FROM $down_sort1_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
echo "<select size=1 name=id style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>choose big category</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[sort1]."</option>\n";
}
echo "</select> \n";
echo "<input type=submit value=delete name=delsort1 class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>";
echo "</tr>\n";
echo "<tr>\n";
echo "<form method=POST action=sort.php>\n";
echo "<td>\n";
echo "small category:";
$typesql = "SELECT COUNT(*) AS rcnt FROM $down_sort2_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
$typerow = mysql_fetch_array($typeresult);
$typesql = "SELECT * FROM $down_sort2_table ORDER BY id";
$typeresult = mysql_db_query($dbname, $typesql);
echo "<select size=1 name=id style='color:#000000; border-style:solid; border-width:1; background-color:#efefef'>\n";
echo "<option value='' selected>choose classify</option>\n";
while ($typerow=mysql_fetch_array($typeresult)) {
echo "<option value=".$typerow[id].">".$typerow[sort2]."</option>\n";
}
echo "</select> \n";
echo "<input type=submit value=delete name=delsort2 class=border style='color: #000000; background-color: #efefef'>\n";
echo "</td>\n";
echo "</form>";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class=shadow2><br><p style='line-height:150%'>\n";
echo "<b><font color=red>advert:</font></b>";
echo "\"delete category\"Categories will be deleted under the classification of all small and small classification of all records, If the classification of records still useful,Please use\"Mass transfer\"Functional classification of the records transferred to other classifications!";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
endif; // if addsort1
endif; // if addsort2
endif; // if editsort
endif; // if sendeditsort1
endif; // if sendeditsort2
endif; // if delsort1
endif; // if delsort2
endif; // if senddelsort1
endif; // if senddelsort2
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br><hr width=735>\n";
include ("../include/footer.php");
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -