本文整理汇总了PHP中common::read方法的典型用法代码示例。如果您正苦于以下问题:PHP common::read方法的具体用法?PHP common::read怎么用?PHP common::read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common
的用法示例。
在下文中一共展示了common::read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: common
<?php
/********************************************************************************************************************
#Coder : Kapil Verma
#Description : This Code is used to display list of all product and remove any on them
*********************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_product = new common();
$currentTimestamp = getCurrentTimestamp();
if ($pid != '' && $action == 'delete') {
$deleteProduct = $obj_product->delete(TBL_GHEAD, 'id =' . $pid);
$_SESSION['msg'] = RECORD_DELETE;
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/group_head/index.php";</script>';
exit;
}
$getProduct = $obj_product->read(TBL_GHEAD, '', ' creation_date DESC');
?>
示例2: common
<?php
/********************************************************************************************************************
#Coder : Kapil Verma
#Description : This Code is used to display list of all product and remove any on them
*********************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_product = new common();
$currentTimestamp = getCurrentTimestamp();
if ($prod_id != '' && $action == 'delete') {
$deleteProduct = $obj_product->delete(TBL_MEMBER, 'id =' . $prod_id);
unlink(LIST_ROOT_ADMIN . "/members/upload/" . $file);
$_SESSION['msg'] = RECORD_DELETE;
echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/admin/members/index.php";</script>';
}
$getProduct = $obj_product->read(TBL_MEMBER);
?>
示例3: common
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:42px; color:#1e1e1e; font-weight:bold; text-transform:uppercase;" id="new_car_link">New Cars</td>
</tr>
<tr>
<td align="left" valign="top" style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#4c5051; line-height:18px; padding:10px 0 18px 0; border-bottom:2px dashed #e8e8e8;"> SYLC Corporation vous apporte les affaires "STOCK U.S.A NEUF" du moment. Decouvrez des lots de voitures americaines diponbles immediatement aux US mais aussi disponible sur le territoire europeen.
Veuillez nous contacter afin de reserver votre vehicule, demande de renseignement ou brochures. </td>
</tr>
</table></td>
</tr>';
$common_object = new common();
$used_car_text = mysql_fetch_object($common_object->read(TBL_ADMIN, "", ''));
$all_brands = $common_object->read(TBL_BRANDS, "publish='yes'", '');
while ($brands = mysql_fetch_object($all_brands)) {
$childs = $common_object->read(TBL_NEW_CAR, "brand_id={$brands->id} AND publish=1", '');
$full_data .= '<tr>
<td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" style="padding:0 0 10px 0;"><img src="http://www.sylc-export.com/voitures-americaines/superadmin/images/brands/' . $brands->logo . '" width="172" height="98" alt="ford" border="0" /></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top"><table width="600" border="0" align="center" cellpadding="0" cellspacing="0" style="border:1px solid #e1e1e1; border-bottom:0px;">
<tr>
示例4: common
<?php
extract($_GET);
$url_listing = DEFAULT_URL . '/revue_automobiles';
if (isset($_GET['reviewID'])) {
$id = convert_uudecode(base64_decode($_GET['reviewID']));
$obj_setting = new common();
$fetchSetting = $obj_setting->read('reviews', 'id = ' . $id);
$getSetting = $db->fetchNextObject($fetchSetting);
$id = $getSetting->id;
$short_description = $getSetting->short_description;
$old_new = $getSetting->old_new;
$make = $getSetting->make;
$model = $getSetting->model;
$pdsf = $getSetting->pdsf;
$mpg = $getSetting->mpg;
$make_name = $getSetting->make_name;
$model_name = $getSetting->model_name;
$year = $getSetting->year;
$expert = $getSetting->expert;
$ensemble = $getSetting->ensemble;
$ensemble = $getSetting->ensemble;
$characteristique = $getSetting->characteristique;
$image = $getSetting->image;
$title = $make_name . ' ' . $model_name . ' ' . $year;
$currentUrl = DEFAULT_URL . $_SERVER['REQUEST_URI'];
$all_media_query = $obj_setting->customQuery("SELECT * FROM reviews_media WHERE review_id=" . $id);
$all_media = array();
while ($mediaRow = mysql_fetch_object($all_media_query)) {
$mediaid = $mediaRow->id;
$review_id = $mediaRow->review_id;
示例5: common
#Description : This Code is used to Manage Pages
*************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_setting = new common();
$obj = new validation();
#Code to Fetch page category data
#END
$publish = 1;
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
/*validate required fields*/
$obj->add_fields($content, 'req', 'Please Enter Content');
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>";
} else {
/*save welcome section content*/
$dataArr = array('content' => $content);
$banner_insert = $obj_setting->update('editor_rows', $dataArr, "id=1");
$_SESSION['success_msg'] = 'Successfully Saved';
echo '<script>location.href="' . DEFAULT_URL . '/superadmin/home/welcome.php";</script>';
exit;
}
}
/*Fetch welcome section content*/
$fetchSetting = $obj_setting->read('editor_rows', 'id = 1');
$getSetting = $db->fetchNextObject($fetchSetting);
$content = $getSetting->content;
示例6: getCurrentTimestamp
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
$obj_handle = new Handle();
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);
$update_product = $obj_product->update(TBL_GHEAD, $dataArr, 'id=' . $prod_id);
$_SESSION['msg'] = RECORD_UPDATE;
redirectUrl(DEFAULT_ADMIN_URL . '/group_head/index.php');
//echo '<script>location.href="'.DEFAULT_ADMIN_URL.'/group_head/index.php";</script>';
exit;
}
} else {
#Code to Fetch seleted ID's data
$getProduct = $obj_product->read(TBL_GHEAD, 'id=' . $prod_id);
$fetchProduct = $db->fetchNextObject($getProduct);
$name = $fetchProduct->name;
$address = $fetchProduct->address;
$phone = $fetchProduct->phone;
$publish = $fetchProduct->status;
}
示例7: common
<?php
session_start();
$error = 0;
$error_login_msg = "";
if (trim($_POST['useremail']) != "") {
$common = new common();
$wherecondition = "email='" . trim($_POST['useremail']) . "'";
$usercount = $common->numberOfRows("users", $wherecondition);
if ($usercount == 0) {
$error_login_msg = '<span class="error_msg">Email non reconnu! Veuillez réessayer ou créer un nouveau compte.</span>';
} else {
$userqrywhrcondition = "email='" . trim($_POST['useremail']) . "'";
$user = $common->read("users", $userqrywhrcondition);
$uservalue = mysql_fetch_object($user);
//$password = base64_decode($uservalue->original_pswd);
$password = base64_decode($uservalue->password);
// Your subject
$subject = 'mot de passe oublié';
$message = nl2br("Message de La Centrale : compte utilisateur\n\t\t\t\t\t\t\tLa Centrale\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tVous avez oublié votre mot de passe : \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tIdentifiant : " . trim($_POST['useremail']) . "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMot de passe : {$password}");
$message = html_entity_decode(htmlentities($message, ENT_QUOTES, "UTF-8"));
$sentmail = sendSmtpMail(trim($_POST['useremail']), $subject, $message);
$error_login_msg = '<span class="success_msg">Mot de passe envoyé ! Si le message n\'apparaît pas d\'ici quelques minutes, vérifiez les courriers indésirables.</span>';
//echo "<script>window.location.href = '".DEFAULT_URL."/wishlist'</script>";
}
} else {
if (isset($_POST['useremail'])) {
$error_login_msg = '<span class="error_msg">S\'il vous plaît entrez l\'adresse e-mail valide pour obtenir votre mot de passe.</span>';
}
}
示例8: common
$obj_setting = new common();
$obj = new validation();
#Code to Fetch page category data
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
/*validate required fields*/
$obj->add_fields($brand_name, 'req', 'Please Enter Brand Name');
$id = $_GET['id'];
$obj->add_fields($brand_name, 'unique', 'Please Enter Unique Brand Name', 'car_brands', "brand_name='" . $brand_name . "' and id!=" . $id);
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
/*save welcome section content*/
$dataArr = array('brand_name' => $brand_name);
if (!isset($_GET['id'])) {
$aboutusInsert = $obj_setting->save('car_brands', $dataArr);
} else {
$aboutusInsert = $obj_setting->update('car_brands', $dataArr, 'id = ' . $_GET['id']);
}
$_SESSION['success_msg'] = 'Successfully Saved';
echo '<script>location.href="' . DEFAULT_URL . '/superadmin/home/brands.php";</script>';
exit;
}
}
/*Fetch brandn content*/
if (isset($_GET['id'])) {
$fetchSetting = $obj_setting->read('car_brands', 'id = ' . $_GET['id']);
$getSetting = $db->fetchNextObject($fetchSetting);
$brandName = $getSetting->brand_name;
}
示例9: common
<?php
/*************************************************************************************************************
#Coder : Keshav Sharma
*************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_block = new common();
$obj = new validation();
$obj_handle = new Handle();
$getbrandBlock = $obj_block->read(TBL_BRANDS, " publish=1");
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
/* Get list of all brands */
if (isset($sub) && $sub != "" && $_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
$obj->add_fields($model_name, 'req', 'Please Enter Model');
$obj->add_fields($brand_id, 'req', 'Please Select Brand');
$obj->add_fields($year, 'req', 'Please Enter Year');
$obj->add_fields($year, 'num', 'Please Enter vaild Year');
$obj->add_fields($color, 'req', 'Please Enter Color');
$obj->add_fields($dispo, 'req', 'Please Enter Dispo');
$obj->add_fields($prix, 'req', 'Please Enter Prix');
$obj->add_fields($stockType, 'req', 'Please Select Stock Type');
$obj->add_fields($_FILES['file']['name'], 'req', 'Please Upload Image');
$obj->add_fields($_FILES['file'], 'ftype=jpg,gif,png', 'Please Upload Valid Image');
$error = $obj->validate();
//--------------------------------------------//
示例10: common
<?php
extract($_POST);
extract($_GET);
$obj_setting = new common();
/*Fetch tabs*/
$total_rows = $common->numberOfRows('content_page', "page_name='presentation'");
$allTabs = $common->customQuery("SELECT slug,tab_title FROM content_page where page_name='presentation' ORDER BY id ASC");
/*Fetch tab content*/
if ($tab_title == '') {
$tab_title = 'presentation';
}
$fetchSetting = $obj_setting->read('content_page', "slug = '{$tab_title}'");
$getSetting = $db->fetchNextObject($fetchSetting);
$content = $getSetting->content;
/*Fetch banner section content*/
$fetchSetting = $obj_setting->read('content_page', 'id = 6');
$getSetting = $db->fetchNextObject($fetchSetting);
$topBanner = $getSetting->content;
$fetchSetting = $obj_setting->read('content_page', 'id = 7');
$getSetting = $db->fetchNextObject($fetchSetting);
$sideBanner = $getSetting->content;
示例11: time
$image_name = time() . $_FILES['file']['name'];
$path = LIST_ROOT . '/images/pages/media/';
move_uploaded_file($_FILES["file"]["tmp_name"], $path . $image_name);
} else {
$image_name = $oldimage;
}
$slug = str_replace(' ', '_', strtolower($tabtitle));
$dataArr = array('title' => $mediaTitle, 'image' => $image_name, 'youtubeurl' => $url, 'type' => $media_type);
if ($id == "") {
$banner_insert = $obj_setting->save('media', $dataArr);
} else {
$banner_insert = $obj_setting->update('media', $dataArr, "id=" . $id);
}
$_SESSION['success_msg'] = 'Successfully Saved';
echo '<script>location.href="' . DEFAULT_URL . '/superadmin/page/media.php";</script>';
exit;
}
}
/*Fetch banner section content*/
if (isset($_GET['id'])) {
$fetchSetting = $obj_setting->read('media', 'id = ' . $_GET['id']);
$getSetting = $db->fetchNextObject($fetchSetting);
$id = $getSetting->id;
$mediaType = $getSetting->type;
$mediaTitle = $getSetting->title;
$bannerImage = $getSetting->image;
$url = $getSetting->youtubeurl;
$heading = "Edit";
} else {
$heading = "Add New";
}
示例12: common
#Description : This Code is used to Manage Pages
*************************************************************************************************************/
extract($_GET);
extract($_POST);
$obj_setting = new common();
$obj = new validation();
#Code to Fetch page category data
#END
$publish = 1;
/* Get Current Date Time Stamp */
$currentTimestamp = getCurrentTimestamp();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$error = '';
/*validate required fields*/
$obj->add_fields($content, 'req', 'Please Enter Content');
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>{$error}</font>";
} else {
/*save personalized search content*/
$dataArr = array('content' => $content);
$aboutus_insert = $obj_setting->update('content_page', $dataArr, "page_name = 'Personalized Search'");
$_SESSION['success_msg'] = 'Successfully Saved';
echo '<script>location.href="' . DEFAULT_URL . '/superadmin/personalized_search/index.php";</script>';
exit;
}
}
/*Fetch personalized search content*/
$fetchSetting = $obj_setting->read('content_page', "page_name = 'Personalized Search'");
$getSetting = $db->fetchNextObject($fetchSetting);
$content = $getSetting->content;
示例13: common
<?php
extract($_POST);
extract($_GET);
$obj_setting = new common();
$common_function = new commonFunction();
/*Fetch tab content*/
if ($slug != '') {
$fetchSetting = $obj_setting->read('news_articles', "slug = '{$slug}'");
$getSetting = $db->fetchNextObject($fetchSetting);
$articleId = $getSetting->id;
}
/*Fetch categories*/
$total_rows = $obj_setting->numberOfRows('news_category');
//number of rows in pages table
$allCategories = $obj_setting->customQuery("SELECT * FROM news_category WHERE EXISTS (SELECT * FROM news_articles\n WHERE news_category.id = news_articles.category_id)");
/*Fetch articles*/
if ($articleId != '') {
$total_articles = $obj_setting->numberOfRows('news_articles', "id='" . $articleId . "'");
$allArticles = $obj_setting->customQuery("SELECT category.category_name,category.id,category.slug as cateslug,articles.title,articles.content,articles.slug FROM news_articles as articles LEFT JOIN news_category as category ON articles.category_id=category.id where articles.id='" . $articleId . "'");
} else {
$total_articles = $obj_setting->numberOfRows('news_articles');
$allArticles = $obj_setting->customQuery("SELECT category.category_name,category.id,articles.title,articles.content,articles.slug FROM news_articles as articles LEFT JOIN news_category as category ON articles.category_id=category.id order by title ASC");
}
$fetchSetting = $obj_setting->read('content_page', 'id = 7');
$getSetting = $db->fetchNextObject($fetchSetting);
$sideBanner = $getSetting->content;
示例14: common
<?php
extract($_POST);
extract($_GET);
$common = new common();
/*Fetch personalized search content*/
$fetchSetting = $common->read('content_page', "page_name = 'Personalized Search'");
$getSetting = $db->fetchNextObject($fetchSetting);
$content = $getSetting->content;
/*Fetch car brand names*/
$modelList = array();
$manf = $common->CustomQuery("SELECT * FROM `attribute_option_value` WHERE `attribute_id` = '2' ORDER BY `value`, `sort_order` ASC");
while ($row = mysql_fetch_assoc($manf)) {
$modelList[] = $row;
}
ini_set('display_errors', true);
ini_set('error_reporting', E_ALL);
/*Recherche personnalisee Inquiry*/
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
require_once 'lib/iContactApi.php';
// code for lead save on iContact
iContactApi::getInstance()->setConfig(array('appId' => ICONTACT_APPID, 'apiPassword' => ICONTACT_APIPASSWORD, 'apiUsername' => ICONTACT_APIUSERNAME));
// Store the singleton
$oiContact = iContactApi::getInstance();
try {
//Create a contact
//Create a contact
$listName = "RecherchePersonaliseeEnquiry({$marque})";
$getLists = $oiContact->getLists();
$found = 0;
foreach ($getLists as $aList) {
示例15: strtolower
$obj->add_fields($content, 'req', 'Please Enter Content');
$error = $obj->validate();
if ($error) {
$errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>";
} else {
/*save category*/
$slug = str_replace(' ', '_', strtolower($title));
$dataArr = array('category_id' => $category_id, 'title' => $title, 'content' => $content, 'slug' => $slug);
if ($id == "") {
$categoryInsert = $obj_setting->save('news_articles', $dataArr);
} else {
$categoryInsert = $obj_setting->update('news_articles', $dataArr, "id=" . $id);
}
$_SESSION['success_msg'] = 'Successfully Saved';
echo '<script>location.href="' . DEFAULT_URL . '/superadmin/page/articles.php";</script>';
exit;
}
}
/*Fetch banner section content*/
if (isset($_GET['id'])) {
$fetchSetting = $obj_setting->read('news_articles', 'id = ' . $_GET['id']);
$getSetting = $db->fetchNextObject($fetchSetting);
$id = $getSetting->id;
$categoryId = $getSetting->category_id;
$title = $getSetting->title;
$content = $getSetting->content;
$heading = "Edit";
} else {
$heading = "Add New";
}
$allCategories = $obj_setting->customQuery("SELECT id,category_name FROM news_category order by category_name ASC");