Exemplo n.º 1
0
 $formGen->setTextElement("title", $taskVals["title"], "", 50, "txtboxes");
 $formGen->setTextAreaElement("description", $taskVals["description"], 50, 8, "txtboxes");
 $formGen->setTextAreaElement("keyword", $taskVals["keyword"], 50, 8, "txtboxes");
 //$formGen -> setHiddenElement("data", $_REQUEST["metaid"], 50, 8, "txtboxes");
 $addFormPostURL = "";
 if ($optEdit) {
     $addFormPostURL = "&metaid=" . $_GET["metaid"] . "&type=" . $_REQUEST['type'];
     $submitBtnLabel = "Update";
 } else {
     $addFormPostURL = "&type=" . $_REQUEST['type'];
     $submitBtnLabel = "Add Data";
 }
 #Process Form
 $disForm = $formGen->processForm($submitBtnLabel, "buttons", "subAddTask", "index.php?action=addmeta" . $addFormPostURL);
 #Get HTML of the elements
 $disElementHTML = $formGen->getDisElementHTML();
 #Get Error Messages
 $errMsg = $formGen->getErrorMsg($_appLang["errorMsgLabel"], "style2");
 #Get Posted Values
 $postedVals = $formGen->getPostedElementValues();
 if (count($postedVals)) {
     $allVals = array("title" => $postedVals["title"], "description" => $postedVals["description"], "keyword" => $postedVals["keyword"], "page" => $postedVals["page"]);
     if ($optEdit) {
         $condition = "meta_id = '" . $_GET["metaid"] . "'";
         $resAddUpdate = $mySqlObj->queryUpdate("keywords", $allVals, true, $condition);
         echo "Successfully added. Please wait...<META HTTP-EQUIV=\"refresh\" content=\"3;URL=index.php?action=addmeta\" />";
         die;
     } else {
         $pagetest = mysql_query("select * from keywords where page='" . $postedVals["page"] . "'");
         $rowss = mysql_num_rows($pagetest);
         if ($rowss > 0) {