当前位置: 首页>>代码示例>>PHP>>正文


PHP common::update方法代码示例

本文整理汇总了PHP中common::update方法的典型用法代码示例。如果您正苦于以下问题:PHP common::update方法的具体用法?PHP common::update怎么用?PHP common::update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common的用法示例。


在下文中一共展示了common::update方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCurrentTimestamp

$com = $getSetting->com;
$obj_setting->getExchangeRate();
extract($_POST);
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
#saving data in database after validation
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $error = '';
    $obj->add_fields($boat, 'req', 'Please Enter Transport By Boat');
    $obj->add_fields($boat, 'currency', 'Please Enter Valid Transport By Boat');
    $obj->add_fields($custom, 'req', 'Please Enter Customs');
    $obj->add_fields($custom, 'currency', 'Please Enter Valid Customs');
    $obj->add_fields($tva, 'req', 'Please Enter TVA');
    $obj->add_fields($tva, 'currency', 'Please Enter Valid TVA');
    $obj->add_fields($transp, 'req', 'Please Enter Transp');
    $obj->add_fields($transp, 'currency', 'Please Enter Valid Transp');
    $obj->add_fields($com, 'req', 'Please Enter Com');
    $obj->add_fields($com, 'currency', 'Please Enter Valid Com');
    $error = $obj->validate();
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
    } else {
        $_SESSION['success_msg'] = 'Exchange Rate has been saved successfully.';
        $dataArr = array('boat' => $boat, 'custom' => $custom, 'tva' => $tva, 'transp' => $transp, 'com' => $com);
        $update_site = $obj_setting->update('currency', $dataArr, ' id=1');
        echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/currency/index.php' . $addToUrl . '";</script>';
        exit;
    }
}
//unset($obj_setting);
unset($obj);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:currency_edit_code.php

示例2: array

            case 0:
                $imageName = $oldImageNameName;
                break;
            case 1:
                $imageName = $imageName;
                break;
            case 2:
                $imageName = $oldImageNameName;
                break;
        }
    } else {
        $imageName = $oldImageNameName;
        $successstatus = 1;
    }
    $dataArr = array('site_title' => $site_title, 'meta_title' => $meta_title, 'meta_keywords' => $meta_keywords, 'meta_description' => $meta_description, 'google_map_key' => $google_map_key, 'phone1' => $phone1, 'phone2' => $phone2, 'office_address' => $office_address, 'slogan' => $slogan, 'logo' => $imageName, 'copyright_text_footer' => $copyright_text_footer, 'facebook' => $facebook, 'twitter' => $twitter, 'youtube' => $youtube, 'rss' => $rss);
    $update_site = $obj_setting->update(TBL_ADMIN, $dataArr, 'id = ' . $_SESSION['LoggedInId']);
    if ($successstatus == 0) {
        $_SESSION['success_msg'] = 'Image size is greater then 200kb ,so this image could not be saved.Your other information has been saved successfully.';
    } else {
        if ($successstatus == 2) {
            $_SESSION['success_msg'] = 'Image type is not JPEG or GIF ,so this image could not be saved.Your other information has been saved successfully.';
        } else {
            $_SESSION['success_msg'] = 'Your information has been saved successfully.';
        }
    }
}
#Code to Fetch data to show on form
$fetchSetting = $obj_setting->read(TBL_ADMIN, 'id = ' . $_SESSION['LoggedInId']);
$getSetting = $db->fetchNextObject($fetchSetting);
$site_title = $getSetting->site_title;
$meta_title = $getSetting->meta_title;
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:pref_code.php

示例3: time

        $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;
    $content = $getSetting->content;
    $heading = "Edit";
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:logistique_actiontabs_code.php

示例4: strtolower

        $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);
                /*if(isset($old_image) && $old_image!='' && file_exists(LIST_ROOT_ADMIN."/images/new_model/".$old_image)) {
                			unlink(LIST_ROOT_ADMIN."/images/new_model/".$old_image);
                		}*/
                move_uploaded_file($_FILES["image"]["tmp_name"], LIST_ROOT_ADMIN . "/images/new_model/" . $image);
            }
        } else {
            $image = $old_image;
        }
        $dataArr = array('brand_name' => $brand_name, 'year' => $year, 'image' => $image, 'prix' => $prix, 'publish' => $publish);
        $update_product = $obj_block->update(TBL_NEW_MODEL, $dataArr, 'id=' . $model_id);
        $_SESSION['msg'] = 'New Model Successfully Updated';
        unset($obj_block);
        unset($obj);
        redirectUrl(DEFAULT_ADMIN_URL . '/new_model/index.php');
        exit;
    }
} else {
    #Code to Fetch seleted ID's data
    $getBlock = $obj_block->read(TBL_NEW_MODEL, 'id=' . $model_id);
    $fetchBlock = $db->fetchNextObject($getBlock);
    $brand_name = $fetchBlock->brand_name;
    $year = $fetchBlock->year;
    $old_image = $fetchBlock->image;
    $prix = $fetchBlock->prix;
    $publish = $fetchBlock->publish;
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:update_code.php

示例5: fetchEbayCar

function fetchEbayCar($itemId, $action)
{
    $common = new common();
    $version = 773;
    $devid = "e872f3d0-8bee-4784-b631-f0c6e0468c21";
    $appid = "Planetwe-4831-4322-a03c-57a0a2d3aafb";
    $certid = "574bc5e0-889c-431c-b3aa-918f19b83e0e";
    $siteid = 0;
    $callname = "GetItem";
    $xml = '<?xml version="1.0" encoding="utf-8"?>
				<GetItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
					<RequesterCredentials>
						<eBayAuthToken>AgAAAA**AQAAAA**aAAAAA**GsfITw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AFkYekC5iHogidj6x9nY+seQ**An0BAA**AAMAAA**PpioAZjw8mCxVt0pqkk749Yb5v0gTCgKSXUcQedT6MhtnDSO4CL2CwtOzOzMn4uwDGr3LIzawpsA/RkBeXpTInV/CITheT3XCyPh5t1O9OMgQy1fAvA6oHmfSjZtXUeEevdvnGRMnOz7gVZ13M6ZCRcReMQotcUkJ+UXqLxogoUrgmtVG3SE8+5mbAYnTmr/nwV3h+l5t3AxVVCr1d795tDXkyqpkXkZ+YY6xnDyg7UUTH3iXQxLPTB2CsmjIaU3wtbSfjQ+0Ep0mTsxKm7Wna2YEidRq9CBP71ynlVIO+iyOHg1Q6kfn6NWZHX1Oynzl6FXR1M2PpeT92xaVtAmg19JI1opydhdbD+CvwpSnrozmrUV57FsL+KyXVOI40JjbMfJFqHbJYZIQXVI+OgV2LxYmo4rv14tR5WiveTsZi482uXf0oL8OLn1hBQ4gN3ANlD2iv48VZjkIL7G/rmnGIvAd982DrujhB4kR8n0f3LcZKBPlCXrTTFnwNdaq/UHSNa4WjO0F0KwieNIDZ3+yqvF69r8ygHfb2zfiIHxDKED9vcv6KK6mcJgkwOKRF4MPZyV4sRZqjrLrOd/L3KVEVTy6MpkRC8P+n+YXuJ8sSXtZz9qTDIrv9SyJutvZs9Xy2Kk21dj39QWOnYxQiJ18pFLsg9In9O2it6+B3PPIqfUoUVE6G2LgVfpf7bnlleurBqemkKPftyN9Ml1b30OQBcM/T5Djcep6ffgsSrP7XnFojKCS811V5e1I0YzN9Xc</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);
    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;
    $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);
}
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:75,代码来源:ebay_code-13-11-2013.php

示例6: getCurrentTimestamp

$currentTimestamp = getCurrentTimestamp();
#Code to Fetch seleted ID's data
$fetchSetting = $obj_setting->read('template', ' id = 1');
$getSetting = $db->fetchNextObject($fetchSetting);
$email = $getSetting->email;
$subject = $getSetting->subject;
$template = $getSetting->template;
$next_date = $getSetting->next_date;
extract($_POST);
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
#saving data in database after validation
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $error = '';
    $obj->add_fields($email, 'req', 'Please Enter Email');
    $obj->add_fields($email, 'email', 'Please Enter A Valid Email');
    $obj->add_fields($subject, 'req', 'Please Enter Subject');
    $obj->add_fields($template, 'req', 'Please Enter Template');
    $error = $obj->validate();
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
    } else {
        $_SESSION['success_msg'] = 'Template has been edited successfully.';
        $dataArr = array('email' => $email, 'subject' => $subject, 'template' => $template, 'next_date' => $next_date, 'mail_date' => $currentTimestamp);
        $update_site = $obj_setting->update('template', $dataArr, ' id=1');
        echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/template/reminder/index.php' . $addToUrl . '";</script>';
        exit;
    }
}
unset($obj_setting);
unset($obj);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:reminder_edit_code.php

示例7: 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'] = 'Car has been saved successfully.';
        $value = '';
        if ($formObj->AddCar($_POST, $_FILES, true, $_GET['id'])) {
            /*Save data in car_flat for searching*/
            $images = $obj_setting->getAllImage($_GET['id']);
            $dataArr = array('make' => $obj_setting->getOptionNameById($manufacturer), 'model' => $model, 'year' => $madeYear, 'price' => $price, 'description' => $description, 'title' => $fullName, 'images' => implode(',', $images));
            $obj_setting->update('car_flat', $dataArr, 'car_id=' . $_GET['id']);
            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>";
        }
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:car_edit_code.php

示例8: common

#Coder         : Kapil Verma
#Description   : This Code is used to Manage Pages
*************************************************************************************************************/
extract($_POST);
extract($_GET);
$obj_setting = new common();
$obj = new validation();
if ($editsub == "editsub") {
    $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.';
        $updateSetting = $obj_setting->update('faq', array("publish" => 1, "question" => $question, "answer" => $answer), 'id=' . $id);
        echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/faq";</script>';
        exit;
        unset($obj_setting);
        unset($obj);
    }
} else {
    #Code to Fetch seleted ID's data
    $fetchSetting = $obj_setting->read('faq', 'id = ' . $id);
    $getSetting = $db->fetchNextObject($fetchSetting);
    $id = $getSetting->id;
    $question = $getSetting->question;
    $answer = $getSetting->answer;
    $publish = $getSetting->publish;
}
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:faq_edit_code.php

示例9: time

        /*
        echo "<pre>";
        print_r($_FILES);
        print_r($_POST); 
        print_r($medias);
        die;
        */
        if (isset($main_image)) {
            if ($main_image) {
                $image_name = $main_image;
            } else {
                $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'] = 'Review has been updated 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->update('reviews', $dataArr, "id=" . $id);
        $obj_setting->delete('reviews_media', " review_id IN('{$id}')");
        foreach ($medias as $media) {
            $dataArrMedia = array('review_id' => $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;
    }
}
unset($obj_setting);
unset($obj);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:page_edit_code.php

示例10: common

<?php

/*************************************************************************************************************
#Coder         : Kapil Verma
#Description   : This Code is used to Manage Pages
*************************************************************************************************************/
extract($_GET);
$obj_setting = new common();
$obj = new validation();
#Code to Fetch seleted ID's data
$fetchSetting = $obj_setting->read('car_inquiry', 'id = ' . $id);
$getSetting = $db->fetchNextObject($fetchSetting);
$id = $getSetting->id;
$name = $getSetting->name;
$email = $getSetting->email;
$status = $getSetting->status;
$phone = $getSetting->phone;
$car_id = $getSetting->car_id;
$address = $getSetting->address;
$message = $getSetting->message;
$updateSetting = $obj_setting->update('car_inquiry', array(status => 1), 'id=' . $id);
unset($obj_setting);
unset($obj);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:23,代码来源:contact_edit_code.php

示例11: 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);
}
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:90,代码来源:ebay_functions.php

示例12: time

    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/home/banner/';
            move_uploaded_file($_FILES["file"]["tmp_name"], $path . $image_name);
        } else {
            $image_name = $oldimage;
        }
        $dataArr = array('banner_image' => $image_name, 'content' => $content, 'url' => $url, 'status' => $status);
        if ($id == "") {
            $banner_insert = $obj_setting->save('rot_banner', $dataArr);
        } else {
            $banner_insert = $obj_setting->update('rot_banner', $dataArr, "id=" . $id);
        }
        $_SESSION['success_msg'] = 'Successfully Saved';
        echo '<script>location.href="' . DEFAULT_URL . '/superadmin/home/index.php";</script>';
        exit;
    }
}
/*Fetch banner section content*/
if (isset($_GET['id'])) {
    $fetchSetting = $obj_setting->read('rot_banner', 'id = ' . $_GET['id']);
    $getSetting = $db->fetchNextObject($fetchSetting);
    $id = $getSetting->id;
    $bannerImage = $getSetting->banner_image;
    $content = $getSetting->content;
    $url = $getSetting->url;
    $status = $getSetting->status;
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:home_banner_code.php

示例13: Image

    $error = '';
    /*validate required fields*/
    $obj->add_fields($content, 'req', 'Please Enter Content');
    $obj->add_fields($_FILES['file'], 'ftype=jpg,gif,png', 'Please Upload Valid Image');
    if ($_FILES['file']['name'] != "") {
        $obj->add_fields($_FILES['file'], "imgwh=1100,450", "Please Upload Valid Image(1100pxX450px)");
    }
    $error = $obj->validate();
    if ($error) {
        $errorMsg = "<font color='#FF0000' family='verdana' size=2>{$error}</font>";
    } else {
        /*save real facts section content*/
        if ($_FILES['file']['name'] != "") {
            $image_name = time() . $_FILES['file']['name'];
            $path = LIST_ROOT . '/images/home/';
            move_uploaded_file($_FILES["file"]["tmp_name"], $path . $image_name);
        } else {
            $image_name = $oldimage;
        }
        $dataArr = array('content' => $content, 'image' => $image_name);
        $aboutus_insert = $obj_setting->update('editor_rows', $dataArr, "id=3");
        $_SESSION['success_msg'] = 'Successfully Saved';
        echo '<script>location.href="' . DEFAULT_URL . '/superadmin/home/real_facts.php";</script>';
        exit;
    }
}
/*Fetch real facts section content*/
$fetchSetting = $obj_setting->read('editor_rows', 'id = 3');
$getSetting = $db->fetchNextObject($fetchSetting);
$content = $getSetting->content;
$backgroundImage = $getSetting->image;
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:home_realfacts_code.php

示例14: returnPath

<?php

include_once '../../conf/config.inc.php';
global $db;
$commonObj = new common();
$tbl_name = "car_media_gallery";
$result = $commonObj->read($tbl_name, "fetched = 0");
while ($url = $db->fetchNextObject($result)) {
    $path = returnPath($url->value);
    $arr = array("value" => $path, "fetched" => 1);
    $whereCondition = 'value_id = ' . $url->value_id;
    $commonObj->update($tbl_name, $arr, $whereCondition);
}
function returnPath($path)
{
    if (strpos($path, "http://") !== false || strpos($path, "https://") !== false) {
        $upload_path = getUploadDirPath(basename($path));
        save_image($path, UPLOAD_CAR_IMAGES . $upload_path);
        return $upload_path;
    }
}
function save_image($inPath, $outPath)
{
    //Download images from remote server
    $in = fopen($inPath, "rb");
    $out = fopen($outPath, "wb");
    while ($chunk = fread($in, 8192)) {
        fwrite($out, $chunk, 8192);
    }
    fclose($in);
    fclose($out);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:importCarImages.php

示例15: unlink

        }
        $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 . "/members/upload/" . $logo);
            unlink(LIST_ROOT_ADMIN . "/members/upload/" . $logo_hidden);
        } else {
            $logo = $logo_hidden;
        }
        $p_slug = $obj_handle->makeAlias($name);
        if ($obj_product->numberOfRows(TBL_PRODUCT, "p_slug = '" . $p_slug . "'") > 0) {
            $p_slug = $obj_handle->makeAlias($p_slug . " " . $prod_id);
        }
        $dataArr = array('name' => $name, 'logo' => $logo, 'desc' => $desc, 'cat_id' => $cat_id, 'sub_cat_id' => $sub_cat_id, 'publish' => $publish, 'p_slug' => $p_slug);
        $update_product = $obj_product->update(TBL_PRODUCT, $dataArr, 'id=' . $prod_id);
        $_SESSION['msg'] = RECORD_UPDATE;
        redirectUrl(DEFAULT_ADMIN_URL . '/members/product.php');
        exit;
    }
} else {
    #Code to Fetch seleted ID's data
    $getProduct = $obj_product->read(TBL_PRODUCT, 'id=' . $prod_id);
    $fetchProduct = $db->fetchNextObject($getProduct);
    $name = $fetchProduct->name;
    $logo = $fetchProduct->logo;
    $desc = $fetchProduct->desc;
    $cat_id = $fetchProduct->cat_id;
    $sub_cat_id = $fetchProduct->sub_cat_id;
    $publish = $fetchProduct->publish;
    $old_p_slug = $fetchProduct->p_slug;
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:update_code.php


注:本文中的common::update方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。