} } $rowColor = getRowColor(0); $rowColor2 = getRowColor(1); $bodyVals[0][0] = array("value" => "<b>Title : <b>", "align" => "right", "width" => "30%", "style" => $rowColor2); $bodyVals[0][1] = array("value" => $disElementHTML["page"], "align" => "left", "width" => "70%", "style" => $rowColor2); $bodyVals[1][0] = array("value" => "<b>Title : <b>", "align" => "right", "width" => "30%", "style" => $rowColor2); $bodyVals[1][1] = array("value" => $disElementHTML["title"], "align" => "left", "width" => "70%", "style" => $rowColor2); $bodyVals[2][0] = array("value" => "<b>Description : <b>", "align" => "right", "width" => "30%", "style" => $rowColor); $bodyVals[2][1] = array("value" => $disElementHTML["description"], "align" => "left", "width" => "70%", "style" => $rowColor); $bodyVals[3][0] = array("value" => "<b>Keywords : <b>", "align" => "right", "width" => "30%", "style" => $rowColor2); $bodyVals[3][1] = array("value" => $disElementHTML["keyword"], "align" => "left", "width" => "70%", "style" => $rowColor2); //$bodyVals[4][0] = array("value" => $disElementHTML["data"]); $bodyVals[4][1] = array("value" => $disForm["submit"]); $genBodyTableMain = genHTMLTable(count($bodyVals), 2, $bodyVals, "100%", "", 8, 0, 0); $bodyVals1[0][0] = array("value" => "Metadata", "style" => "maintitle"); $bodyVals1[1][0] = array("value" => $errMsg, "style" => "tinyredtext", "align" => "center"); $bodyVals1[2][0] = array("value" => $disForm["form"]["start"] . $genBodyTableMain . $disForm["form"]["end"]); $genBodyTable = genHTMLTable(count($bodyVals1), 1, $bodyVals1, "100%", "", 3, 0, 0); $_disContentBody = $genBodyTable; } else { include "paginate.php"; $arr = paginate("select * from keywords", 5); $str = "<span class=maintitle>Metadata</span>\r\n<table cellpadding=3 border=0 width=100%>\r\n<tr>\r\n\t<td><b><a href=\"index.php?action=addmeta&type=add\">Add Data</a></b></td><td width=200> </td><td> </td><td> </td><td> </td>\r\n</tr>\r\n<tr>\r\n\t<td width=200> </td><td colspan=4><b>" . $arr["information"] . " " . $arr["navigation"] . "</b></td>\r\n</tr>\r\n<tr>\r\n\t<td width=200> </td><td colspan=4><b> </b></td>\r\n</tr>\r\n\r\n<tr>\r\n\t<td colspan=5><table cellpadding=3 cellspacing=1 border=0 width=100% bgcolor=#000000>\r\n\t<tr bgcolor=#cccccc>\r\n\t<td><b>Page Name</b></td><td><b>Page Title</b></td><td><b>Meta Description</b></td><td><b>Meta Keywords</b></td><td> </td>\r\n</tr>"; while ($row = mysql_fetch_array($arr["result"])) { $str .= "<tr bgcolor=#ffffff><td>" . ucwords($row["page"]) . "</td><td>" . $row["title"] . "</td><td>" . $row["description"] . "</td><td>" . $row["keyword"] . "</td><td><a href=\"index.php?action=addmeta&metaid=" . $row["meta_id"] . "\">Edit</a></td></tr>"; } $str .= "</table></td>\r\n</tr>\r\n<tr>\r\n\t<td width=200> </td><td colspan=4><b> </b></td>\r\n</tr>\r\n<tr>\r\n\t<td width=200> </td><td colspan=4><b>" . $arr["information"] . " " . $arr["navigation"] . "</b></td>\r\n</tr>\r\n</table>"; $_disContentBody = $str; //include("delete.php"); }
#Get Error Messages $errMsg = $formGen->getErrorMsg("The following errors occured", "style2"); #Get Posted Values $postedVals = $formGen->getPostedElementValues(); if (count($postedVals)) { include "dbaccess.class.php"; //Create Instance $mySqlObj = new dBAccess(_DBHOST, _DBUSERNAME, _DBPASSWORD); //MySQL Database Instance $mySqlObj->selectDB(_DBNAME); $resLogin = $mySqlObj->authenticateLogin($postedVals["usName"], $postedVals["psWord"], true); if (count($resLogin)) { loginUser(_APPNAME, $resLogin[0]["userId"], $resLogin[0]["lastLogin"]); redirectPage("index.php"); } else { $errMsg = $_appLang["errorLogin"]; } } $contVal[0][0] = array("value" => "Username"); $contVal[0][1] = array("value" => $disElementHTML["usName"]); $contVal[1][0] = array("value" => "Password"); $contVal[1][1] = array("value" => $disElementHTML["psWord"]); $contVal[2][1] = array("value" => $disForm["submit"]); $contTable = genHTMLTable(3, 2, $contVal, "100%", "", 4); $contVal2[0][0] = array("value" => "Login", "style" => "titletext"); $contVal2[1][0] = array("value" => $errMsg, "style" => "tinyredtext"); $contVal2[2][0] = array("value" => $disForm["form"]["start"] . $contTable . $disForm["form"]["end"]); $contTable2 = genHTMLTable(3, 1, $contVal2, "220"); showHeaderHTML("Management Console", "appstyle.css", "", ""); echo useTemplate("mainlayout", "Management Console", "", "", $contTable2); showFooterHTML();
$cont[$i+1][1] = array("value" => $res[$i]["catname"]); $ord = "order".$i; //$orderVal[0][1] = array("value" => $disElementHTML[$ord]); //$cont[$i+1][2] = array("value" => $disElementHTML["order".$i].$disElementHTML["id".$i]); $cont[$i+1][3] = array("value" => genHTMLLink("index.php?action=addcat&catid=".$res[$i]["catid"],"Edit")." | ".genHTMLLink("index.php?action=categories&confirm=false&table=categories&field=catid&x=".$res[$i]["catid"],"Delete")); } $cont[$i+1][2] = array("value" => $disForm["submit"]); $tbllist = genHTMLTable(count($res)+2,4, $cont, "100%", 3, 4,"",0); $contVal[0][0] = array("value" => "<h3>Categories</h3>"); $contVal[1][0] = array("value" => $disForm["form"]["start"].$tbllist.$disForm["form"]["end"]); $contTable = genHTMLTable(2, 1, $contVal, "100%", "", 4,"",0,"center","addtable"); $_disContentBody = $contTable; if(isset($_GET["confirm"])) { if($_GET["confirm"]=="false") { $_disContentBody="Are you sure you want to delete? <a href=\"index.php?action=".$_GET["action"]."&confirm=true&field=".$_GET["field"]."&table=".$_GET["table"]."&x=".$_GET["x"]."\">Yes</a> | <a href=\"index.php?action=".$_GET["action"]."\">No</a>"; } else { $arrCon4 = $_GET["field"]."='".$_GET["x"]."'"; $resAdd12 = $mySqlObj -> queryDelete($_GET["table"],$arrCon4); //mysql_query("delete from ".." where ".);
<?php $_navLinkList = array(); ksort($disNavList); reset($disNavList); foreach ($disNavList as $disNavigation) { $valLinkId = $disNavigation["actPageId"]; $valLinkName = $disNavigation["actLink"]; if (isset($_GET["action"]) && $_GET["action"] == $valLinkId && !getAJAXState(_APPNAME)) { $_navLinkList[][0]["value"] = genHTMLLink(genAJAXLink(_APPNAME, $valLinkId, _ACTIONURL), " + " . $valLinkName, "", "menuLinkSel"); } else { $_navLinkList[][0]["value"] = genHTMLLink(genAJAXLink(_APPNAME, $valLinkId, _ACTIONURL), " + " . $valLinkName, "", "menuLink"); } if (isset($disSubNavList[$disNavigation["actId"]])) { $tempSubNav = $disSubNavList[$disNavigation["actId"]]; ksort($tempSubNav); reset($tempSubNav); foreach ($tempSubNav as $disSubNavigation) { $valSubLinkId = $disSubNavigation["actPageId"]; $valSubLinkName = $disSubNavigation["actLink"]; if (isset($_GET["action"]) && $_GET["action"] == $valSubLinkId && !getAJAXState(_APPNAME)) { $_navLinkList[][0]["value"] = genHTMLLink(genAJAXLink(_APPNAME, $valSubLinkId, _ACTIONURL), " --- " . $valSubLinkName, "", "menuLinkSmallSel"); } else { $_navLinkList[][0]["value"] = genHTMLLink(genAJAXLink(_APPNAME, $valSubLinkId, _ACTIONURL), " --- " . $valSubLinkName, "", "menuLinkSmall"); } } } } $_navLinkList[][0]["value"] = genHTMLLink(_ACTIONURL . "logout", " + " . "Logout", "", "menuLink"); $_navLinkList = genHTMLTable(count($_navLinkList), 1, $_navLinkList, "100%", "", 4);