本文整理汇总了PHP中db::UpdateData方法的典型用法代码示例。如果您正苦于以下问题:PHP db::UpdateData方法的具体用法?PHP db::UpdateData怎么用?PHP db::UpdateData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db
的用法示例。
在下文中一共展示了db::UpdateData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_language_variable
function update_language_variable($post_data)
{
if (!isset($post_data['variableid'])) {
return false;
}
$obj_Db = new db();
$lang_sql = "select language_shortname , language_name from job_language";
$lang_result = $obj_Db->ExecuteQuery($lang_sql);
$lang_numrows = mysql_num_rows($lang_result);
$lang_var_sql = "select name from language where id =" . $post_data['variableid'];
$lang_var_result = $obj_Db->ExecuteQuery($lang_var_sql);
$lang_var_numrows = mysql_num_rows($lang_var_result);
$variablename = "";
if ($lang_var_numrows > 0) {
$languagevarrow = mysql_fetch_object($lang_var_result);
$variablename = $languagevarrow->name;
}
if ($lang_numrows > 0) {
while ($languagevar = mysql_fetch_object($lang_result)) {
$lang_page_sql = "select name from job_language_page where id=" . $post_data['langpageid'];
$lang_page_result = mysql_query($lang_page_sql);
$lang_page_data = mysql_fetch_object($lang_page_result);
$data[$languagevar->language_shortname] = $post_data[$languagevar->language_shortname];
$filename = "../../langues/" . $languagevar->language_name . "/PAGE_" . $lang_page_data->name . "_" . $languagevar->language_shortname . ".php";
update_language_variable_in_lang_file($filename, $variablename, $post_data[$languagevar->language_shortname]);
}
}
$obj_Db->ExecuteQuery("SET NAMES utf8");
$data['page_id'] = $post_data['langpageid'];
if ($obj_Db->UpdateData('language', $data, 'id', $post_data['variableid'])) {
return TRUE;
} else {
return FALSE;
}
}
示例2:
if (isset($_GET["type"]) && $_GET["type"] == "rec") {
if (isset($_POST["rate"])) {
$array["rate"] = $_POST["rate"];
}
if (isset($_POST["positions"])) {
$array["positions"] = $_POST["positions"];
}
$array["type"] = "rec";
} else {
if (isset($_POST["subscription"])) {
if ($_POST["subscription"] == "paid") {
if (isset($_POST["rate"])) {
$array["rate"] = $_POST["rate"];
}
if (isset($_POST["positions"])) {
$array["positions"] = $_POST["positions"];
}
} else {
$array["positions"] = 0;
$array["rate"] = 0;
}
}
$array["type"] = "emp";
}
if (isset($_POST["rate_per_position"])) {
$array["rate_per_job"] = $_POST["rate_per_position"];
}
$objDb->UpdateData("job_rec_payment_plans", $array, "plan_id", $_GET["pid"]);
header("location:plan_list.php?msg=edit");
?>
示例3: mail
$array["rec_status"] = 0;
$_SESSION["status"] = 0;
} else {
if ($_POST["comp_type"] == "1") {
$array["rec_status"] = 1;
$_SESSION["status"] = 1;
$email = "NamRecruit <info@namrecruit.com>";
$emailto = $array['rec_email'];
$subject = "Registration Successful with NamRecruit.";
$msg = "Dear, " . $_POST["rec_name"] . "<br><br>";
$msg .= "Thank you for registering with NamRecruit. <br><br>";
$msg .= "Use following information to login namrecruit.com.<br>";
$msg .= "Username : " . $_POST["rec_email"];
$msg .= "<br>Password : " . $_POST["rec_password"];
$msg .= "<br><br>Regards, <br>NamRecruit.";
mail($emailto, $subject, $msg, "From: {$email}\nContent-Type: text/html; charset=iso-8859-1");
}
}
$array["rec_IP"] = $_SERVER['REMOTE_ADDR'];
$objDb->InsertData("job_recruiter", $array);
$rec_id = mysql_insert_id();
$arr_update['rec_uid'] = "JR-" . ($rec_id + 1000);
$objDb->UpdateData("job_recruiter", $arr_update, "rec_id", $rec_id);
/*$_SESSION["rec_plan"] = 0;
$_SESSION["ses_rec_id"] = mysql_insert_id();
$_SESSION["rec_name"] = $array['rec_name'];
*/
header("location:rec_register_success.php?rec_id=" . $rec_id);
?>
示例4: db
require_once "../../includes/functions.php";
$objDb = new db();
for ($i = 0; $i < count($_POST["chk"]); $i++) {
$array = array();
$status = "st_" . $_POST['chk'][$i];
if ($_POST[$status] != "") {
$array["pay_status"] = $_POST[$status];
if (isset($_GET["link"]) && $_GET["link"] == "new") {
if ($array["pay_status"] == "2") {
$array["received_date"] = date("Y-m-d");
} else {
if ($array["pay_status"] == "4") {
$array["bounce_date"] = date("Y-m-d");
}
}
$objDb->UpdateData("job_rec_payments", $array, "pay_id", $_POST['chk'][$i]);
} else {
if (isset($_GET["link"]) && $_GET["link"] == "rec") {
if ($array["pay_status"] == "1") {
$objDb->UpdateData("job_rec_payments", $array, "pay_id", $_POST['chk'][$i]);
$array["pay_date"] = date("Y-m-d");
$sqlInvoice = "select * from job_rec_invoices i,job_rec_payments p where i.invoice_id=p.invoice_id and p.pay_id=" . $_POST['chk'][$i];
$resultInvoice = $objDb->ExecuteQuery($sqlInvoice);
$rsInvoice = mysql_fetch_object($resultInvoice);
//for recruiter
$sqlRec = "select * from job_recruiter where rec_id=" . $rsInvoice->rec_id;
$resultRec = $objDb->ExecuteQuery($sqlRec);
$rsRec = mysql_fetch_object($resultRec);
//end of recruiter
//for cheque
$sqlCheque = "select * from job_rec_payments where pay_id=" . $_POST['chk'][$i];
示例5: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
$array = array();
$array['vat'] = $_POST['vat'];
$array['vat_status'] = $_POST['vat_status'];
$objDb->UpdateData("job_vat", $array, "vat_id", "1");
echo "<script language='javascript'>location.href='change_vat_success.php';</script>";
示例6: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
$array = array();
if (isset($_POST["title"])) {
$array["title"] = $_POST["title"];
}
if (isset($_POST["msg"])) {
$array["msg"] = addslashes($_POST["msg"]);
}
$objDb->UpdateData("job_cover_letters", $array, "letter_id", $_GET["letter_id"]);
header("location:letter_list.php?msg=edit");
?>
示例7: db
require_once "../../classes/db_class.php";
$objDb = new db();
$array = array();
$array["c_id"] = $_POST["seeker_recruiter"];
print_r($_POST);
exit;
if (isset($_POST["vt_name"])) {
$array["vt_name"] = $_POST["vt_name"];
}
$array["vt_status"] = 1;
$target_path = "";
$target_path = "../../tutorials/";
$base_name = "";
if ($_FILES["videotutorial"]["name"] != "") {
$base_name = basename($_FILES["videotutorial"]["name"]);
//$base_name_arr = explode(".",$base_name);
//$base_ext = end($base_name_arr);
// $base_name = $_POST['banner_image'] . "_" . $_POST['rec_phone'] . "." . $base_ext;
$target_path = $target_path . $base_name;
if (move_uploaded_file($_FILES["videotutorial"]["tmp_name"], $target_path)) {
if ($_FILES["videotutorial"]["name"] != "") {
$array["vt_path"] = $base_name;
}
unlink("../../tutorials/" . $_POST["old_tutorial"] . "");
}
}
//$array["status"] =1;
$objDb->UpdateData("job_vtutorials", $array, "vt_id", $_GET["vtid"]);
header("location:tutorial_list.php?msg=edit");
?>
示例8: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
// include("../../includes/thumbnail_generator.php");
$objDb = new db();
$array = array();
if (isset($_POST["tagline"]) and $_POST["tagline"] != "") {
$array["tagline"] = str_replace("'", "’", $_POST["tagline"]);
} else {
$array["tagline"] = $_POST["tagline1"];
}
$objDb->UpdateData("job_tagline", $array, "tagline_id", 1);
header("location:change_tagline.php?msg=add");
?>
示例9:
$array["comp_logo"] = "";
} else {
$comp_logo = $_POST["hid_comp_logo"];
$array["comp_logo"] = $comp_logo;
}
}
}
if (isset($_POST["rec_hidename"])) {
$array["rec_hidename"] = $_POST["rec_hidename"];
}
if (isset($_POST["rec_hideaddress"])) {
$array["rec_hideaddress"] = $_POST["rec_hideaddress"];
}
if (isset($_POST["rec_hideemail"])) {
$array["rec_hideemail"] = $_POST["rec_hideemail"];
}
if (isset($_POST["rec_hidecity"])) {
$array["rec_hidecity"] = $_POST["rec_hidecity"];
}
if (isset($_POST["rec_hidetelno"])) {
$array["rec_hidetelno"] = $_POST["rec_hidetelno"];
}
if (isset($_POST["rec_password"]) && $_POST["rec_password"] != "") {
$array["rec_password"] = $_POST["rec_password"];
}
$array["rec_IP"] = $_SERVER['REMOTE_ADDR'];
$objDb->UpdateData("job_recruiter", $array, "rec_id", $_POST['rec_id']);
header("location:rec_profile.php?msg=updated&rec_id=" . $_POST["rec_id"]);
?>
示例10: basename
if ($_FILES["banner_image"]["name"] != "") {
$base_name = basename($_FILES["banner_image"]["name"]);
//$base_name_arr = explode(".",$base_name);
//$base_ext = end($base_name_arr);
// $base_name = $_POST['banner_image'] . "_" . $_POST['rec_phone'] . "." . $base_ext;
$target_path = $target_path . $base_name;
$imgInfo = getimagesize($target_path);
//echo $imgInfo[0]." ".$imgInfo[1];exit;
if ($imgInfo[0] > 520 || $imgInfo[1] > 80) {
$title = $_POST['title'];
$url = $_POST['url'];
$aid = $_GET["aid"];
echo '<body onload="document.frm1.submit()">
<form name="frm1" action="banner_edit.php?msg=err&aid=' . $aid . '" method="post">
<input type="hidden" name="banner_title" value="' . $title . '" >
<input type="hidden" name="banner_url" value="' . $url . '" >
</form>
</body>';
exit;
}
if (move_uploaded_file($_FILES["banner_image"]["tmp_name"], $target_path)) {
if ($_FILES["banner_image"]["name"] != "") {
$array["banner_image"] = $base_name;
}
}
}
//print_r($array);exit;
$objDb->UpdateData("job_banner", $array, "banner_id", $_GET["aid"]);
header("location:banner_list.php?msg=edit");
?>
示例11: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
$array = array();
$array['user_password'] = $_POST['newp'];
$objDb->UpdateData("job_user", $array, "user_id", "1");
echo "<script language='javascript'>location.href='change_success.php';</script>";
示例12: getCount
$rsplanid_next = mysql_fetch_object($resultplanid_next);
$current_plan_id_next = $rsplanid_next->plan_id;
$next_add = $rsplanid_next->additional_job;
//end of next plan
if ($rs_sq->number_job > 0 && $rsplanid_next->number_job > 0) {
//echo "ll";
//echo $rs_sq->remaining_job;
//if($rs_sq->rate<=$rsplanid_next->rate)
//{
$cntjob_post = getCount("select * from job_ad where invoice_id=" . $in_id . " and rec_id='" . $rs_sq->rec_id . "'");
$res_cnt_additional_job = $objDb->ExecuteQuery("select sum(additional_job) as add_job from job_rec_invoices where invoice_id>" . $in_id . " and rec_id='" . $rs_sq->rec_id . "' and invoice_type=5 and invoice_status=1");
$rs_cnt = mysql_fetch_object($res_cnt_additional_job);
$cnt_additional_job = $rs_cnt->add_job;
if ($rs_sq->additional_job > $rs_sq->number_job + $rs_sq->additional_job - $cntjob_post) {
$arr_remain["additional_job"] = $next_add + ($rs_sq->number_job + $rs_sq->additional_job - $cntjob_post);
$objDb->UpdateData("job_rec_invoices", $arr_remain, "invoice_id", $_GET["Iid"]);
} else {
$arr_remain["additional_job"] = $next_add + $rs_sq->additional_job;
$objDb->UpdateData("job_rec_invoices", $arr_remain, "invoice_id", $_GET["Iid"]);
}
/*$jj=$rs_sq->number_job+$rs_sq->remaining_job+$cnt_additional_job;//echo $jj;
if($cntjob_post>=$jj){ $post_job=-1; } else { $post_job=$jj-$cntjob_post;}
if($post_job==$jj)
{
//echo "kk";
$arr_remain["remaining_job"]=$rs_sq->additional_job+$rs_sq->remaining_job+$cnt_additional_job;
$objDb->UpdateData("job_rec_invoices",$arr_remain,"invoice_id",$_GET["Iid"]);
}
else if($post_job==($rs_sq->number_job-$rs_sq->additional_job))
{
示例13: GenerateXML
$objDb->InsertData("job_options", $array);
GenerateXML();
if (isset($_GET["cat_id"]) && $_GET["cat_id"] != "") {
header("location:option_add.php?cat_id=" . $_GET["cat_id"] . "&msg=add&action=" . $_GET["action"]);
} else {
header("location:option_add.php?msg=add&action=" . $_GET["action"]);
}
} else {
if (isset($_GET["action"]) && $_GET["action"] == "edit") {
if (isset($_POST["category_id"])) {
$array["category_id"] = $_POST["category_id"];
}
if (isset($_POST["option_name"])) {
$array["option_name"] = $_POST["option_name"];
}
$objDb->UpdateData("job_options", $array, "option_id", $_GET["oid"]);
GenerateXML();
if (isset($_GET["cat_id"]) && $_GET["cat_id"] != "") {
header("location:option_add.php?cat_id=" . $_GET["cat_id"] . "&msg=edit&action=add");
} else {
header("location:option_add.php?msg=edit&action=add");
}
} else {
if (isset($_GET["action"]) && $_GET["action"] == "delete") {
$objDb->DeleteData("job_options", "option_id", $_GET["oid"]);
GenerateXML();
if (isset($_GET["cat_id"]) && $_GET["cat_id"] != "") {
header("location:option_add.php?cat_id=" . $_GET["cat_id"] . "&msg=delete&action=add");
} else {
header("location:option_add.php?msg=delete&action=add");
}
示例14: db
require_once "../../classes/db_class.php";
require_once "../../includes/functions1.php";
$objDb = new db();
$sqlRec = "select * from job_rec_invoices i,job_recruiter r where i.invoice_id=" . $_GET["Iid"] . " and r.rec_id=i.rec_id";
$resultRec = $objDb->ExecuteQuery($sqlRec);
$rsRec = mysql_fetch_object($resultRec);
if ($rsRec->invoice_type == 1) {
require_once "includes/accnt_function.php";
} else {
if ($rsRec->invoice_type == 5) {
require_once "includes/accnt_upgraded.php";
}
}
$array["pay_status"] = 1;
$array["pay_date"] = date("Y-m-d");
$objDb->UpdateData("job_rec_payments", $array, "pay_id", $_GET["pid"]);
$array1["invoice_status"] = 1;
$objDb->UpdateData("job_rec_invoices", $array1, "invoice_id", $_GET["Iid"]);
//echo $msg."--".$rsRec->rec_status;exit;
//for comp type
$sqlComp = "select * from job_rec_payment_plans p,job_rec_invoices i where i.plan_name=p.plan_name and i.invoice_id=" . $_GET["Iid"];
$resultComp = $objDb->ExecuteQuery($sqlComp);
$rsComp = mysql_fetch_object($resultComp);
if ($rsRec->rec_status == 0 && $rsComp->type == "rec") {
$emailto = $rsRec->rec_email;
$subject = "Login information of namrecruit.com";
$msg = "Dear " . $rsRec->rec_name . ",<br><br>";
$msg .= "Thank you for registering with NamRecruit. <br><br>";
$msg .= "Use following information to login namrecruit.com.<br>";
$msg .= "Username : " . $rsRec->rec_email;
$msg .= "<br>Password : " . $rsRec->rec_password;
示例15: header
<?php
session_start();
if (!isset($_SESSION["user_id"])) {
header("location: ../index.php");
exit;
}
require_once "../../classes/db_class.php";
$objDb = new db();
if (isset($_POST["user_name"])) {
$array["user_name"] = $_POST["user_name"];
}
if (isset($_POST["user_first_name"])) {
$array["user_first_name"] = $_POST["user_first_name"];
}
if (isset($_POST["user_last_name"])) {
$array["user_last_name"] = $_POST["user_last_name"];
}
if (isset($_POST["user_email"])) {
$array["user_email"] = $_POST["user_email"];
}
if (isset($_POST["user_phone"])) {
$array["user_phone"] = $_POST["user_phone"];
}
if (isset($_POST["user_copyright"])) {
$array["user_copyright"] = $_POST["user_copyright"];
}
$objDb->UpdateData("job_user", $array, "user_id", $_GET["uid"]);
header("location:home.php");
?>