本文整理汇总了PHP中common::save方法的典型用法代码示例。如果您正苦于以下问题:PHP common::save方法的具体用法?PHP common::save怎么用?PHP common::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common
的用法示例。
在下文中一共展示了common::save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: time
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
/*save bannr section content*/
if ($_FILES['file']['name'] != "") {
$image_name = time() . $_FILES['file']['name'];
$path = LIST_ROOT . '/images/logistique/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $image_name);
} else {
$image_name = $oldimage;
}
$slug = str_replace(' ', '_', strtolower($tabtitle));
$dataArr = array('tab_title' => htmlentities($tabtitle), 'banner_image' => $image_name, 'content' => $content, 'page_name' => 'Logistique', 'slug' => $slug);
if ($id == "") {
$banner_insert = $obj_setting->save('content_page', $dataArr);
} else {
$banner_insert = $obj_setting->update('content_page', $dataArr, "id=" . $id);
}
$_SESSION['success_msg'] = 'Successfully Saved';
echo '<script>location.href="' . DEFAULT_URL . '/superadmin/logistique/index.php";</script>';
exit;
}
}
/*Fetch banner section content*/
if (isset($_GET['id'])) {
$fetchSetting = $obj_setting->read('content_page', 'id = ' . $_GET['id']);
$getSetting = $db->fetchNextObject($fetchSetting);
$id = $getSetting->id;
$tabTitle = $getSetting->tab_title;
$bannerImage = $getSetting->banner_image;
示例2: unset
unset($obj);
if ($error_tab1 != '') {
$errorMsges .= $error_tab1;
}
if ($error_tab2 != '') {
$errorMsges .= $error_tab2;
}
if ($error_tab3 != '') {
$errorMsges .= $error_tab3;
}
if ($error_tab4 != '') {
$errorMsges .= $error_tab4;
}
if ($error_tab4 == '' && $error_tab3 == '' && $error_tab1 == '' && $error_tab2 == '') {
$_SESSION['success_msg'] = 'New car has been saved successfully.';
if ($formObj->AddCar($_POST, $_FILES)) {
/*Save data in car_flat for searching*/
$lastInsertedId = mysql_insert_id();
$images = $obj_setting->getAllImage($lastInsertedId);
$dataArr = array('car_id' => $lastInsertedId, 'make' => $obj_setting->getOptionNameById($manufacturer), 'model' => $model, 'year' => $madeYear, 'price' => $price, 'description' => $description, 'title' => $fullName, 'date' => date("Y-m-d H:i:s"), 'images' => implode(',', $images));
$obj_setting->save('car_flat', $dataArr);
if (!empty($_REQUEST['type']) && $_REQUEST['type'] == 'nostock') {
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/new_stock/new_car/index.php";</script>';
}
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/car";</script>';
exit;
} else {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $formObj->error . "</font>";
}
}
}
示例3: common
<?php
include_once "conf/config.inc.php";
if (isset($_POST) && isset($_POST["submit_inq"])) {
global $db;
$common_obj = new common();
$arr = array("car_id" => $_POST['car_id'], "name" => $_POST['name'], "email" => $_POST['email'], "phone" => $_POST['phone'], "message" => $_POST['message'], "address" => $_POST['address'], "type" => 0);
$common_obj->save("contact", $arr);
$to = '4006@dothejob.org';
// Your subject
$subject = 'Inquiry About Car';
// From
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'From: ' . $_POST['name'] . '<' . $_POST['email'] . '>' . "\r\n";
$message = 'The person that contacted you is ' . $_POST['name'] . '<br/> E-mail: ' . $_POST['email'] . '<br/>
Phone Number: ' . $_POST['phone'] . '<br/>
Address: ' . $_POST['address'] . '<br/>
Message: ' . $_POST['message'] . '<br/>';
$sentmail = mail(SITE_ADMIN_EMAIL, $subject, $message, $headers);
}
?>
<?php
include LIST_ROOT . "/includes/views/header.php";
?>
<div class="main_middle">
<div class="middle">
<div class="middle_two">
示例4: strtolower
$file_type = strtolower(end(explode(".", $_FILES["image"]["name"])));
if ($file_type == "png" || $file_type == "jpeg" || $file_type == "jpg" || $file_type == "gif") {
$valid_file_type = 'yeap';
} else {
$valid_file_type = '';
}
$obj->add_fields($valid_file_type, 'req', 'Please upload image file only.');
}
$error = $obj->validate();
//--------------------------------------------//
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
$image = '';
if (!empty($_FILES["image"]["name"])) {
$type = strtolower(end(explode(".", $_FILES["image"]["name"])));
if ($type == "png" || $type == "jpeg" || $type == "jpg" || $type == "gif") {
$image = $currentTimestamp . '-' . $obj_handle->makeAlias($_FILES["image"]["name"]) . '.' . $type;
@chmod(LIST_ROOT_ADMIN . "/images/new_model", 0777);
move_uploaded_file($_FILES["image"]["tmp_name"], LIST_ROOT_ADMIN . "/images/new_model/" . $image);
}
}
$dataArr = array('brand_name' => $brand_name, 'year' => $year, 'image' => $image, 'prix' => $prix, 'publish' => $publish, 'creation_date' => $currentTimestamp);
$add_product = $obj_block->save(TBL_NEW_MODEL, $dataArr);
$_SESSION['msg'] = 'New Model Successfully Added';
redirectUrl(DEFAULT_ADMIN_URL . '/new_model/index.php');
unset($obj_block);
unset($obj);
exit;
}
}
示例5: emailContentsWrapper
$emailData['téléphone'] = $phone;
$emailData['Un message'] = $massage;
$emailData["Vous avez reçu un e-mail à partir d'ici"] = DEFAULT_URL . "/contacts";
$message = emailContentsWrapper($emailData, $heading, $subHeading);
$adminEmails = $common->getAdminNotificationEmails();
foreach ($adminEmails as $emaiA) {
$sentmail = sendSmtpMail($emaiA, $subject, $message);
}
//Send confirmation to User
$heading = 'Merci';
$subHeading = 'Votre demande de contact a été reçu avec succès.';
$footerHeading = 'Merci encore<br/>Americamcarcentrale.com';
$message = emailContentsWrapper(null, $heading, $subHeading, $footerHeading);
sendSmtpMail($_POST['email'], 'Merci', $message);
// Save request for admin leads
$time = time();
$currentTimestamp = getCurrentTimestamp();
$dataArray = array('name' => $fname . " " . $lname, 'email' => $email, 'phone' => $phone, 'message' => $massage, 'type' => 1, 'mail_date' => $currentTimestamp);
$save = $common->save("contact", $dataArray);
$send = 1;
$_SESSION['success'] = "ok";
echo "<script>location.href='" . DEFAULT_URL . "/thank_you.php';</script>";
exit;
}
unset($obj);
} else {
if ($website != "") {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>Please provide all fields value.</font>";
$_SESSION['msg'] = $errorMsg;
}
}
示例6: array
$result = $obj_product->numberOfRows(TBL_MEMBER, 'name = "' . $name . '" AND cat_id=' . $cat_id . ' AND sub_cat_id =' . $sub_cat_id);
}
$obj->add_fields($cat_id, 'req', 'Please Select Product Category');
$obj->add_fields($sub_cat_id, 'req', 'Please Select Product Sub Category');
$error = $obj->validate();
if ($error || $result > 0) {
if ($result > 0) {
$error .= "Product already Exist in selected Category.";
}
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
if ($_FILES['logo']['name']) {
$logo = $currentTimestamp . '_' . $_FILES['logo']['name'];
move_uploaded_file($_FILES['logo']['tmp_name'], LIST_ROOT_ADMIN . "/products_manager/upload/" . $logo);
} else {
$logo = 'no_img.jpg';
}
$p_slug = $obj_handle->makeAlias($name);
if ($obj_product->numberOfRows(TBL_PRODUCT, "p_slug = '" . $p_slug . "'") > 0) {
$p_slug = $obj_handle->makeAlias($p_slug . " " . $cat_id);
}
$dataArr = array('name' => $name, 'logo' => $logo, 'desc' => $desc, 'cat_id' => $cat_id, 'sub_cat_id' => $sub_cat_id, 'publish' => $publish, 'creation_date' => $currentTimestamp, 'p_slug' => $p_slug);
$add_product = $obj_product->save(TBL_PRODUCT, $dataArr);
$_SESSION['msg'] = RECORD_ADD;
redirectUrl(DEFAULT_ADMIN_URL . '/members/product.php');
exit;
}
}
?>
示例7: array
$carlist .= '<tr>';
$carlist .= '<td>' . $ebays->title . ' </td>';
$carlist .= '<td> - $' . number_format($ebays->buyItNowPrice, 2) . '</td>';
$carlist .= '</tr>';
$flage = true;
$common->update('contact', array("mail_date" => $currentTimestamp, 'status' => 1), ' id=' . $contact_id);
}
}
}
}
$carlist .= '</table>';
//echo $carlist; die;
if ($flage) {
$replaces = array('[CUSTOMER_NAME]' => $name, '[CAR_LIST]' => $carlist, '[ADDRESS]' => $address, '[TELEPHONE]' => $phone, '[EMAIL_ADDRESS]' => $adminemail, '[TERMS_URL]' => DEFAULT_URL);
$messages = strReplaceAssoc($replaces, $message);
$headers = "From: " . $adminemail . "\r\n";
$headers .= "Reply-To: " . $adminemail . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
//echo $messages; die;
//mail($toEmail,$subject,$messages,$headers);
sendSmtpMail($toEmail, $subject, $message);
$common->save('email_log', array("email" => $toEmail, "content" => $messages, "sent_date" => $currentTimestamp, "next_date" => $next, 'status' => 1));
if ($i == $count) {
$_SESSION['success_msg'] = "Mail Sent Succefully";
echo '<script>alert("thanks");window.location.href="' . DEFAULT_ADMIN_URL . '/template/reminder/index.php";</script>';
exit;
}
$i++;
}
}
示例8: getCurrentTimestamp
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
$obj->add_fields($title, 'req', 'Please Enter Title');
$error = $obj->validate();
$image = '';
//--------------------------------------------//
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
if ($_FILES["logo"]["name"]) {
$type = explode(".", $_FILES["logo"]["name"]);
if (end($type) == "png" || end($type) == "jpeg" || end($type) == "jpg" || end($type) == "gif") {
$image = getCurrentTimestamp() . '-' . $_FILES["logo"]["name"];
//chmod(DEFAULT_ADMIN_URL."/images/brands",0777);
move_uploaded_file($_FILES["logo"]["tmp_name"], LIST_ROOT_ADMIN . "/images/brands/" . $image);
}
}
$dataArr = array('title' => $title, 'logo' => $image, 'publish' => $publish, 'creation_date' => $currentTimestamp);
$add_product = $obj_block->save(TBL_BRANDS, $dataArr);
$_SESSION['msg'] = 'Brand Successfully Added';
redirectUrl(DEFAULT_ADMIN_URL . '/brands/index.php');
unset($obj_block);
unset($obj);
exit;
}
}
?>
示例9: strtolower
$file_type = strtolower(end(explode(".", $_FILES["image"]["name"])));
if ($file_type == "png" || $file_type == "jpeg" || $file_type == "jpg" || $file_type == "gif") {
$valid_file_type = 'yeap';
} else {
$valid_file_type = '';
}
$obj->add_fields($valid_file_type, 'req', 'Please upload image file only.');
}
$error = $obj->validate();
//--------------------------------------------//
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
$image = '';
if (!empty($_FILES["image"]["name"])) {
$type = strtolower(end(explode(".", $_FILES["image"]["name"])));
if ($type == "png" || $type == "jpeg" || $type == "jpg" || $type == "gif") {
$image = $currentTimestamp . '-' . $obj_handle->makeAlias($_FILES["image"]["name"]) . '.' . $type;
@chmod(LIST_ROOT_ADMIN . "/images/htmltemplate", 0777);
move_uploaded_file($_FILES["image"]["tmp_name"], LIST_ROOT_ADMIN . "/images/htmltemplate/" . $image);
}
}
$dataArr = array('title' => $title, 'details_url' => $details_url, 'image' => $image, 'price' => $price, 'publish' => $publish, 'creation_date' => $currentTimestamp);
$add_product = $obj_block->save(TBL__HTMLTEMPLATE, $dataArr);
$_SESSION['msg'] = 'Car Template Successfully Added';
redirectUrl(DEFAULT_ADMIN_URL . '/htmltemplate/index.php');
unset($obj_block);
unset($obj);
exit;
}
}
示例10: time
//$obj->add_fields($model, 'req', 'Please select a Model');
$obj->add_fields($year, 'req', 'Please Enter year');
$obj->add_fields($expert, 'req', 'Please Enter Excerpt');
$obj->add_fields($ensemble, 'req', 'Please Enter Ensemble');
$obj->add_fields($characteristique, 'req', 'Please Enter Characteristique');
$obj->add_fields($_FILES['image']['name'], 'req', 'Please Upload Image');
$obj->add_fields($_FILES['image'], 'ftype=jpg,gif,png', 'Please Upload Valid Image');
$error = $obj->validate();
//echo "<pre>";
//print_r($error); die;
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>";
} else {
$make_name = $makes[$make];
$models_new = $getEntityObj->getEntityOutput($make, 4);
$model_name = $models_new[$model];
$image_name = time() . '-' . $_FILES['image']['name'];
//$path = LIST_ROOT.'/images/reviews/media/';
$path = LIST_ROOT_ADMIN_REVIEW_IMAGEPATH . '/';
move_uploaded_file($_FILES["image"]["tmp_name"], $path . $image_name);
$_SESSION['success_msg'] = 'New review has been saved successfully.';
$dataArr = array('short_description' => $short_description, 'old_new' => $old_new, 'editorial' => $editorial, 'pdsf' => $pdsf, 'mpg' => $mpg, 'image' => $image_name, 'make' => $make, 'model' => $model, 'year' => $year, 'expert' => $expert, 'ensemble' => $ensemble, 'characteristique' => $characteristique, 'updated' => getCurrentTimestamp(), 'make_name' => $make_name, 'model_name' => $model_name);
$review_id = $obj_setting->save('reviews', $dataArr);
foreach ($medias as $media) {
$dataArrMedia = array('review_id' => $review_id, 'media_type' => $media['mediatype'], 'order_id' => $media['order'], 'media_name' => $media['value'], 'updated' => getCurrentTimestamp());
$review_media_id = $obj_setting->save('reviews_media', $dataArrMedia);
}
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/reviews";</script>';
exit;
}
}
示例11: common
extract($_GET);
extract($_POST);
$obj_setting = new common();
$obj = new validation();
echo $att_label;
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
$obj->add_fields($att_code, 'req', 'Please Enter Atrribute Code');
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>";
} else {
if (trim($slug)) {
$slug = makeAlias($slug);
} else {
$slug = makeAlias($name);
}
if (trim($metatitle)) {
$metatitle = $metatitle;
} else {
$metatitle = $name;
}
$_SESSION['success_msg'] = 'New Attribute has been saved successfully.';
$dataArr = array('attribute_code' => $att_code, 'frontend_type' => $att_type, 'frontend_label' => $att_label, 'is_required' => $req, 'default_value' => $att_def, 'publish' => $publish);
$update_site = $obj_setting->save(TBL_ATTRIBUTE, $dataArr);
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/page";</script>';
exit;
}
}
示例12: elseif
content:"Nous avons ajouté votre demande avec succès",
type:"info",
timeOut:5000,
opacity:0.6,
autoClose:true
});
});
})(jQuery);
</script>';
} elseif (isset($_POST) && isset($_POST["add_to_enquire"])) {
global $db;
//error_reporting(E_ALL);
//ini_set('display_errors', '1');
$common_obj = new common();
$arr = array("car_id" => $_POST['car_id'], "email" => $_POST['email'], "submit_date" => date("Y-m-d H:i:s"));
$common_obj->save("car_inquiry", $arr);
$mailHeading = !empty($_POST['order']) && $_POST['order'] == 1 ? "A fait une demande de L’historique de cette voiture ici." : "A fait une demande de fiche technique de cette voiture ici.";
//Send confirmation to User
$heading = 'Merci';
$subHeading = 'Votre adresse e-mail a été reçu, un de nos représentants vous contactera avec les informations de la voiture.<br><br>Merci encore<br/>Americamcarcentrale.com';
$message = emailContentsWrapper(null, $heading, $subHeading);
sendSmtpMail($_POST['email'], 'Merci', $message);
// Send admin Notifications
$heading = "Un invité envoyé demande d'enquête pour une voiture";
$subHeading = 'ce client ' . $_POST['email'] . ' ' . $mailHeading . '<br/>Détails du véhicule';
$emailData['Id de voiture'] = $_POST['car_id'];
$emailData['titre'] = $carInfo['fullName'];
$emailData['vin'] = $carInfo['vin'];
$emailData['Achat immédiat Prix'] = $common->CurrencyConverter($carInfo['price']) . ' €';
$emailData['Construire'] = $carInfo['manufacturer'];
$emailData['Modèle'] = $carInfo['model'];
示例13: fetchEbayCar
function fetchEbayCar($itemId, $action)
{
$common = new common();
// crated by us
//$version = 773;
//$devid = "e872f3d0-8bee-4784-b631-f0c6e0468c21";
//$appid = "Planetwe-4831-4322-a03c-57a0a2d3aafb";
//$certid = "574bc5e0-889c-431c-b3aa-918f19b83e0e";
//$siteid =0;
//$callname = "GetItem";
//$accesToken = "AgAAAA**AQAAAA**aAAAAA**4gqXUg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AGkISjAJWBpg6dj6x9nY+seQ**An0BAA**AAMAAA**5D3c3AfScHkf+mmuQBsiuSAHvJ5dvb5KeUGyfX43IK6P4wjRzo5Rj7MxubzlEB+QmPf+nrkYAUU8V0nczpqvYaFl8orKRmqEdXKW0JqUE72CHfNIeNkcE7usMZZ9g97D9Be4yfDdAILBxTOEh4TdV4U3YD19Gfq1aSalXtSnLNndWFKS3j4vO4yBcZImdPkoNgCj7gtwidbz8l6zv+EHBUIRXqoEMP6gAZIY2JLjGq1T/u96NqQj7UKyzwoCvAsmUWL/0JTieQXuKqlM5sFdwKdEUAJzgaiK93ghP2aLFde3Rxqgh5sijGeT+f2KIKODYO9PILnRsiEKFyamt5OPLRmPfFeKBAv9kYoj0plLHbeeEBMP+F6QdwHrnK8pq/xMMm1K71JpjN1hoI3MbrFzNLNh/6b8NTHjlbYqjn8e6TJ2j8CyQe8XaiB4BlI4aBdJXW2ikxaWtBP7SAHTSmTFKk7t7xNP3Ti+BAAr1Uc+kyMBLs7o2m5vvJxz6bj/fxgcoUAv+GNt5/PtuuB60o4x9bG1WWp50+zZsqBlLCEwBxDKhbZ49jJRNc8nbM9xUcaupLxVTxUwbqoPpWB2i/dZuA+7xxfB0AyCTzFU9xPpZUIoEfCUcSFtZ0euub2w9jET4imzeJCc41sE3Qo/wB2AubK5oMn6wJXTsvu2sHRQgIsM/vJOweg6uLIZ15gb6Pn7JD+trob9IzCXoSwK/ytCdDOWfT589Fg7tw6A4pK31eMUjIwaYuH+l1SoItIBWBLV";
//Details provided by client
$version = 849;
$devid = "E69WP8Z16P996R8H2K1EWU7LC2F4P4";
$appid = "francois-1656-442d-bf2d-37b84676c2fb";
$certid = "2f56d2cd-9d4b-45a5-8945-67c432f53d29";
$siteid = 0;
$callname = "GetItem";
//$accesToken = "AgAAAA**AQAAAA**aAAAAA**It2lUg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6wJlIOhCJWCpQ6dj6x9nY+seQ**fzgAAA**AAMAAA**HO7Ff5QcNtBiD9NvWdD1xP+4GLKHGfpUP+SwT+cDf4AnxrGLcjv2DHcPivAGLK06agYWzcX4jpuhunP+WbdU5Uw8T8S1fBdsV2pwuCVTG1a2lMz2zHSgqvhQ+CLS3eBqZ9APg/gg/HVG8PBhJa147C4OtSAoJb0Q1CNM9Fmi4iHoX91KM14b6g9LhOUpIH1ODtlpkiwQhA+ZBe8lyxZzgNgVL1NpaWBv6Z5WRBgdQmGRh5OUxhteTOp0iDG5pzVA7isLCfQyBf41mcrdMAWrNBlyGGVSIWjk82M4kHYbd7uRA9w+cr+YUkC2J8f2T3DuoRqxBDShUnlm9rn+PYYqYJjn5c+DIz6GMMVnrgURZd/8HHu5jbGCGnEgnTIvcP64zdUSzzMV9i6XE32Mw2Wse0qVVPEMYRPwkGAejvBh5NlwpSYaTHw4ePmGV5oKYma/Qoyxa0CxsZ6YFIgKI2RVsjUJBihixnfQU7JUcjwwMtJ1oVfyjmT7aDX5CGkwR9LfGyJQWAYDler441lRFw8Ci7D87h1H6sd2SY2Szy5HsWuNTwOl8IHgio6Yw1acpZSAUDJ8jhWV8pKITBq0oJvQX7VF8DjjYNN+zp4329U89yfH1kjaS79a5TJgBSUMU9UDZi2HilDzEaPLJJcZr8DctxoZrEsh1fozvlvwbAehRQcsHnBqTCVGWme47BY9Ia5eTipFlSYDo7Sl8V0gUQeiEOtca+f0sR6qvb85sW5EYDWuWXCaS4YR+taT9L5OxO25";
$accesToken = "AgAAAA**AQAAAA**aAAAAA**fqSbVQ**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AGkISjAJWBpg6dj6x9nY+seQ**An0BAA**AAMAAA**F5lNYkkTF5+eh9ORJHXXaAi0kOFTeYMNzeVxybYeVyTcvJWc8bn4auZqxUK25zO8gqfChFLU1b3UbRcgJmhoQcVqb0L7rmNpFctACptDN7zUw+iv9ZLeePmxUFivtc5KUtPa7XLYKF4khJc7l5MWBwtzGC7+QKPWNRBoccYnpz5X6n7KHymsf1sH00toTpSczFBzQGFQcP65pyioz45/QQ//8f90jOyFXs60nR0RGHItNnwjjfQy/J2U6AhXSorLl3jOhqJhMErkNrmzkv9hjTYlpVoWhlJWGz93O5YKzneDW3h/pgikw7taeC63EUNCMHqM5eP16e+o2iOUFJ+AhvN0t4joK8/7JLuhUggOJLDQFvp9T5wzRMSmhhPobmI/ABfN0EgxFbiNb/9hDelf9HotFt2MvCsoupqVzat3Kz+hGWlovE+qieoKrQOzSi8Rzm/DTNBEequJtPd7MOSX/boW0Y/Hl0hnyzPoszj6wCepHtSilZrLHL0RO3+9ocSmmTJKgi038+oIJS4wC81YP0bTBReu3HHM9/cb5b457JJZ0TSo/mX9Mv+tPfrsWmzo4huyXspp3KdjeaTOvn+IzfiOekrE3JDRi7aPUFgY00A/gpQTkT1bgabdIm9V86zJVXvRDJXfa7vp2nCaA2BuQzJF2RLIoW6CYDnOV7oLJsYRo7QKRaCY6S8rDmiJTgrd99zZSusNYldBCJuFAj4g0abmEmiJr2aCKEtL5wFb9UDNWM7v0J2IELjzAf+p0dF1";
$xml = '<?xml version="1.0" encoding="utf-8"?>
<GetItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>' . $accesToken . '</eBayAuthToken>
</RequesterCredentials>
<DetailLevel>ReturnAll</DetailLevel>
<IncludeItemSpecifics>true</IncludeItemSpecifics>
<ItemID>' . $itemId . '</ItemID>
</GetItemRequest>';
$ch = curl_init("https://api.ebay.com/ws/api.dll?siteid={$siteid}");
$headers = array('X-EBAY-API-COMPATIBILITY-LEVEL: ' . $version, 'X-EBAY-API-DEV-NAME: ' . $devid, 'X-EBAY-API-APP-NAME: ' . $appid, 'X-EBAY-API-CERT-NAME: ' . $certid, 'X-EBAY-API-CALL-NAME: ' . $callname, 'X-EBAY-API-SITEID: ' . $siteid);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
$output = curl_exec($ch);
//echo "<pre>";print_r($output);die;
curl_close($ch);
$res = simplexml_load_string($output);
$item = $res->Item;
$gallery = array();
foreach ($item->PictureDetails->PictureURL as $val) {
$gallery[] = (string) $val;
}
$gallerystr = implode("**", $gallery);
$ConditionDisplayName = (string) $item->ConditionDisplayName;
$description = (string) $item->Description;
$specs = array();
foreach ($item->ItemSpecifics->NameValueList as $arr) {
$valus = array();
foreach ($arr->Value as $val) {
$temp = (string) $val;
$valus[] = $temp;
}
$values = implode(",", $valus);
$key = (string) $arr->Name;
$specs[$key] = $values;
}
$std_equips = array();
foreach ($specs as $keys => $data) {
$std_equips[] = $keys . "^" . $data;
}
$std_equip = implode("~", $std_equips);
$postalCode = (string) $item->PostalCode;
$location = (string) $item->Location;
$country = (string) $item->Country;
$timeLeft = (string) $item->TimeLeft;
if ((int) $item->BuyItNowPrice == 0) {
$buyItNowAvailable = 0;
$buyItNowPrice = (double) $item->SellingStatus->ConvertedCurrentPrice;
} else {
$buyItNowAvailable = 1;
$buyItNowPrice = (double) $item->BuyItNowPrice;
}
$vin = (string) $item->VIN;
$endTimes = (string) $item->ListingDetails->EndTime;
$listingType = (string) $item->ListingType;
$title = (string) $item->Title . " " . (string) $item->SubTitle;
$itemData = (array) $item;
if (!empty($itemData)) {
$datArray = array("itemId" => $itemId, "galleryURL" => mysql_escape_string($gallerystr), "postalCode" => $postalCode, "location" => $location, "country" => $country, "endTime" => $timeLeft, "buyItNowPrice" => $buyItNowPrice, "listingType" => $listingType, "buyItNowAvailable" => $buyItNowAvailable, "ConditionDisplayName" => $ConditionDisplayName, "title" => mysql_escape_string($title), "description" => base64_encode($description), "stdequip" => mysql_escape_string($std_equip), "vin" => $vin, "Year" => $specs['Year'], "Make" => $specs['Make'], "Model" => $specs['Model'], "Mileage" => $specs['Mileage'], "endson" => $endTimes, "endtimestamp" => strtotime($endTimes));
if ($action == "update") {
$common->update("ebay_car", $datArray, " itemId = " . $itemId);
} elseif ($action == "save") {
$common->save("ebay_car", $datArray);
}
}
return $common->CustomQuery("Select * from ebay_car where itemId = " . $itemId);
}
示例14: common
*************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_product = new common();
$obj = new validation();
$obj_handle = new Handle();
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
$obj->add_fields($name, 'req', 'Please Enter Group-Head Name');
$obj->add_fields($address, 'req', 'Please Enter Address');
$obj->add_fields($phone, 'req', 'Please Enter Phone No');
$obj->add_fields($phone, 'num', 'Please Enter Valid Phone No');
$obj->add_fields($phone, 'min=6', 'Please Enter Valid Phone No');
$obj->add_fields($phone, 'max=12', 'Please Enter Valid Phone No');
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
$dataArr = array('name' => $name, 'address' => $address, 'phone' => $phone, 'status' => $publish, 'creation_date' => $currentTimestamp);
$add_product = $obj_product->save(TBL_GHEAD, $dataArr);
$_SESSION['msg'] = RECORD_ADD;
redirectUrl(DEFAULT_ADMIN_URL . '/group_head/index.php');
exit;
}
}
?>
示例15: common
<?php
/*************************************************************************************************************
#Coder : Kapil Verma
#Description : This Code is used to Manage Pages
*************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_setting = new common();
$obj = new validation();
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
$obj->add_fields($question, 'req', 'Please Enter Question');
$obj->add_fields($answer, 'req', 'Please Enter Answer');
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
$_SESSION['success_msg'] = 'FAQ has been saved successfully.';
$dataArr = array('question' => $question, 'answer' => $answer, 'publish' => $publish, 'creation_date' => $currentTimestamp);
$update_site = $obj_setting->save("faq", $dataArr);
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/faq";</script>';
exit;
}
}