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


PHP common::customQuery方法代码示例

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


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

示例1: search

extract($_POST);
extract($_GET);
$search = new search();
$obj_setting = new common();
$modelList = array();
$manf = $obj_setting->CustomQuery("SELECT * FROM `attribute_option_value` WHERE `attribute_id` = '2' ORDER BY `value`,`sort_order` ASC");
while ($row = mysql_fetch_assoc($manf)) {
    $modelList[] = $row;
}
/*Fetch welcome section content*/
$fetchSetting = $obj_setting->read('editor_rows', 'id = 1');
$getSetting = $db->fetchNextObject($fetchSetting);
$content = $getSetting->content;
/*Fetch rotating banner section content*/
$allBanner = $obj_setting->customQuery("SELECT * FROM  rot_banner where status=1 order by id asc");
$totalBanners = mysql_num_rows($allBanner);
/*Fetch about us section content*/
$fetchSetting = $obj_setting->read('editor_rows', 'id = 2');
$getSetting = $db->fetchNextObject($fetchSetting);
$aboutUsContent = $getSetting->content;
/*Fetch about us section content*/
$fetchSetting = $obj_setting->read('editor_rows', 'id = 3');
$getSetting = $db->fetchNextObject($fetchSetting);
$realFactsContent = $getSetting->content;
$realFactBackgroundImage = $getSetting->image;
/*Fetch homepage review content*/
/////
$check_home_review_one = $obj_setting->getValueByField("superadmin_options", "option_name='HomeReviewOne'", "option_value");
$check_home_review_two = $obj_setting->getValueByField("superadmin_options", "option_name='HomeReviewTwo'", "option_value");
$check_home_review = $check_home_review_one . "','" . $check_home_review_two;
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:30,代码来源:home_code.php

示例2: common

$obj_setting = new common();
if (!isset($_REQUEST['searchcombo'])) {
    $total_rows = $obj_setting->numberOfRows('contact', 'type = 101');
    //number of rows in pages table
} else {
    if ($_REQUEST['searchtext'] == 'Search') {
        $total_rows = $obj_setting->numberOfRows('contact', 'type = 101');
        //number of rows in pages table
    } else {
        $total_rows = $obj_setting->numberOfRows('contact', "type = 101 and `name` like '%" . addslashes($_REQUEST['searchtext']) . "%' OR `email` like '%" . addslashes($_REQUEST['searchtext']) . "%'");
        //number of rows in pages table for perticular search criteria
    }
}
if (!isset($_REQUEST['searchcombo'])) {
    if ($searchword == "" && $type != "") {
        $all_pages = $obj_setting->customQuery("SELECT * FROM contact where type = 101 order by {$field} {$orderby} limit {$eu}, {$limit} ");
    } else {
        if ($searchword != "" && $type != "") {
            $all_pages = $obj_setting->customQuery("SELECT * FROM contact where type = 101 and name like '%" . addslashes($searchword) . "%' or  `email` like '%" . addslashes($searchword) . "%' order by {$field} {$orderby} limit {$eu}, {$limit} ");
        } else {
            $all_pages = $obj_setting->customQuery("SELECT * FROM contact where type = 101 order by {$field} {$orderby} limit {$eu}, {$limit} ");
        }
    }
} else {
    if ($_REQUEST['searchtext'] == 'Search') {
        $all_pages = $obj_setting->customQuery("SELECT * FROM contact where type = 101 and order by {$field} {$orderby} limit {$eu}, {$limit} ");
    } else {
        $all_pages = $obj_setting->customQuery("SELECT * FROM contact where type = 101 and `name` like '%" . addslashes($_REQUEST['searchtext']) . "%' OR `desc` like '%" . addslashes($_REQUEST['searchtext']) . "%' order by {$field} {$orderby} limit {$eu}, {$limit} ");
        //number of rows in pages table for perticular search criteria
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:contact_code.php

示例3: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    $obj_setting->delete('rot_banner', " id={$id}");
    $_SESSION['success_msg'] = 'Banner deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/home/index.php' . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('rot_banner', " id={$id}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT name FROM rot_banner where id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->name;
} else {
    $pageName = 'There is no banner exists with this page id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:19,代码来源:home_banner_delete_code.php

示例4: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('pages', " id={$pageid}");
    $_SESSION['success_msg'] = 'Page deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/page/index.php' . $addToUrl . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('pages', " id={$pageid}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT name FROM pages where id='" . $pageid . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->name;
} else {
    $pageName = 'There is no page exists with this page id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:24,代码来源:page_delete_code.php

示例5: common

<?php

$obj_setting = new common();
$firstVid = $obj_setting->getValueByField("superadmin_options", "option_name='firstVid'", "option_value");
$secondVid = $obj_setting->getValueByField("superadmin_options", "option_name='secondVid'", "option_value");
if (isset($_POST) && $_POST['submit'] == 'submit') {
    foreach ($_POST as $key => $value) {
        if ($value != 'submit') {
            $checkExist = $obj_setting->getValueByField("superadmin_options", "option_name='" . trim($key) . "'", "option_value");
            if ($checkExist) {
                $settings_save = $obj_setting->customQuery("UPDATE `superadmin_options` SET `option_name`='{$key}',`option_value`='{$value}'  WHERE  `option_name`='" . $key . "'");
            } else {
                $settings_save = $obj_setting->customQuery("INSERT INTO `superadmin_options`(`option_name`, `option_value`) VALUES ('" . trim($key) . "' , '" . trim($value) . "')");
            }
        }
    }
    if ($settings_save) {
        echo '<script>location.href = "' . DEFAULT_ADMIN_URL . '/car/productcars.php?response=success";</script>';
    } else {
        echo '<script>location.href = "' . DEFAULT_ADMIN_URL . '/car/productcars.php?response=error";</script>';
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:22,代码来源:products_car_code.php

示例6: common

    $field = 'name';
}
if (isset($_GET['orderBy']) and $_GET['orderBy'] != '') {
    $orderby = $_GET['orderBy'];
} else {
    $orderby = 'ASC';
}
$obj_setting = new common();
if (!isset($_REQUEST['searchcombo'])) {
    $total_rows = $obj_setting->numberOfRows('pages');
    //number of rows in pages table
} else {
    if ($_REQUEST['searchtext'] == 'Search') {
        $total_rows = $obj_setting->numberOfRows('pages');
        //number of rows in pages table
    } else {
        $total_rows = $obj_setting->numberOfRows('pages', " `name` like '%" . addslashes($_REQUEST['searchtext']) . "%' OR `desc` like '%" . addslashes($_REQUEST['searchtext']) . "%'");
        //number of rows in pages table for perticular search criteria
    }
}
if (!isset($_REQUEST['searchcombo'])) {
    $all_pages = $obj_setting->customQuery("SELECT * FROM pages order by {$field} {$orderby} limit {$eu}, {$limit} ");
} else {
    if ($_REQUEST['searchtext'] == 'Search') {
        $all_pages = $obj_setting->customQuery("SELECT * FROM pages order by {$field} {$orderby} limit {$eu}, {$limit} ");
    } else {
        $all_pages = $obj_setting->customQuery("SELECT * FROM pages where `name` like '%" . addslashes($_REQUEST['searchtext']) . "%' OR `desc` like '%" . addslashes($_REQUEST['searchtext']) . "%' order by {$field} {$orderby} limit {$eu}, {$limit} ");
        //number of rows in pages table for perticular search criteria
    }
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:page_code.php

示例7: array

    $searched .= " with price range <span class=\"searched\"> \$" . $price[0] * 1000 . " USD  to \$" . $price[1] * 1000 . " USD </span>";
    $dataArray['price'] = array('0' => (int) $price[0] * 1000, '1' => (int) $price[1] * 1000);
}
if (isset($filter) && $filter != '') {
    if ($filter == 1) {
        $val = array('FixedPrice', 'StoreInventory', 'AuctionWithBIN');
    } else {
        $val = array('AuctionWithBIN', 'Auction');
    }
    $filterarray[] = array('name' => 'ListingType', 'value' => $val, 'paramName' => '', 'paramValue' => '');
} else {
    $filterarray[] = array('name' => 'ListingType', 'value' => array('FixedPrice', 'StoreInventory', 'AuctionWithBIN', 'Auction'), 'paramName' => '', 'paramValue' => '');
}
$userTblName = 'temp_' . $_SESSION['unique_id'][0];
if (!isset($_SESSION['announces'])) {
    $common->customQuery('DROP TABLE IF EXISTS `' . $userTblName . '`');
    $common->customQuery('CREATE TABLE `' . $userTblName . '` (
							  `type` int(10) NOT NULL,
							  `itemId` bigint(20) NOT NULL,
							  `title` varchar(255) NOT NULL,
							  `Price` float NOT NULL,
							  `content` longtext
							) ENGINE=MyISAM DEFAULT CHARSET=latin1');
    $common->customQuery('INSERT INTO master_temp (user_id, tbl_name, lastAct) VALUES ("' . $_SESSION['unique_id'][0] . '","' . $userTblName . '",' . getCurrentTimestamp() . ')');
    $common->customQuery("DELETE FROM " . $userTblName);
}
if (!isset($_GET['page'])) {
    $_SESSION['announces'] = array();
    $_SESSION['announces']['fill'] = true;
    $page = 1;
    $_SESSION['announces']['page'] = 8;
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:announces_code-11-12-2013.php

示例8: IN

extract($_GET);
extract($_POST);
#getting array of ids from multiple checkbox and then imploding those ids with ',' to put in IN()
$totalIds = implode("','", $allselect);
$obj_setting = new common();
# Here we are deleting all selected pages
if (isset($pageid) and $pageid != '' and isset($action) and $action == 'delete') {
    if (isset($searchtext) and $searchtext != '') {
        $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
    } else {
        $addToUrl = '';
    }
    $obj_setting->delete('contact', " id IN('{$pageid}')");
    $_SESSION['success_msg'] = 'Enquiry deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/contact/consult/index.php' . $addToUrl . '";</script>';
}
#taking imploded ids and checking if these ids exists in database or not
#if not then we are showing error message and if found then we are fetching names
#of those pages to show
$total_rows = $obj_setting->numberOfRows('contact', " id IN('{$totalIds}')");
if ($total_rows > 0) {
    $totalNames = array();
    $singlePage = $obj_setting->customQuery("SELECT * FROM contact where id IN('{$totalIds}')");
    while ($getPageName = $db->fetchNextObject($singlePage)) {
        $totalNames[] = $getPageName->name;
    }
    $pageName = implode("&nbsp;,&nbsp;", $totalNames);
} else {
    $pageName = 'No Enquiry exists with these ids.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:contact_multiple_delete_code.php

示例9: Paginator

                $pages->items_total = $total_rows;
                $pages->default_ipp = 15;
                $pages->paginate();
                $cars = $search->attributeSearch($dataArray, 'fullName', 'ASC', $pages->limit);
            }
        }
    }
} else {
    $total_rows = $common->numberOfRows("car", '');
    $pages = new Paginator();
    $pages->items_total = $total_rows;
    $pages->default_ipp = 15;
    $pages->paginate();
    /*$dataArray = array( "manufacturer" => "64");
    	$cars = $search->attributeSearch($dataArray,'fullName','ASC',$pages->limit);*/
    $result = $common->customQuery("select car_id from car " . $pages->limit);
    $car = array();
    while ($res = mysql_fetch_object($result)) {
        $cars[] = $res->car_id;
    }
}
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);
    // 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";
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:carlist_code.php

示例10: search

<?php

extract($_POST);
extract($_GET);
$search = new search();
$obj_setting = new common();
$page_name = 'revue_automobiles';
/******************************************************/
//fetch all makes entered so far from the admin
/*******************************************************/
$all_makes_query = $obj_setting->customQuery("SELECT make, make_name FROM  reviews ");
$all_makes = array();
while ($makerow = mysql_fetch_object($all_makes_query)) {
    $make_id = $makerow->make;
    $make_name = $makerow->make_name;
    $all_makes[$make_id] = $make_name;
}
$QueryString = '';
//$limit = PAGING_LIMIT;
$limit = 1;
if (strlen($start) > 0 and !is_numeric($start)) {
    $start = 0;
}
$eu = $start - 0;
$this1 = $eu + $limit;
$back = $eu - $limit;
$next = $eu + $limit;
if (strlen($startOld) > 0 and !is_numeric($startOld)) {
    $startOld = 0;
}
$euOld = $startOld - 0;
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:revue_code.php

示例11: common

        $select20 = "";
        break;
}
$start = $_GET['start'];
if (strlen($start) > 0 and !is_numeric($start)) {
    $start = 0;
}
$eu = $start - 0;
if (!$limit > 0) {
    // if limit value is not available then let us use a default value
    $limit = PAGING_LIMIT;
    // No of records to be shown per page by default.
}
$this1 = $eu + $limit;
$back = $eu - $limit;
$next = $eu + $limit;
if (isset($_GET['field']) and $_GET['field'] != '') {
    $field = $_GET['field'];
} else {
    $field = 'id';
}
if (isset($_GET['orderBy']) and $_GET['orderBy'] != '') {
    $orderby = $_GET['orderBy'];
} else {
    $orderby = 'ASC';
}
$obj_setting = new common();
//number of rows in pages table
$total_rows = $obj_setting->numberOfRows('media');
$allMedia = $obj_setting->customQuery("SELECT * from media order by {$field} {$orderby} limit {$eu}, {$limit}");
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:media_code.php

示例12: common

<?php

extract($_GET);
extract($_POST);
$obj_setting = new common();
if (isset($id) and $id != '' and isset($action) and $action == 'delete') {
    $obj_setting->delete('content_page', " id={$id}");
    $_SESSION['success_msg'] = 'Tab deleted successfully.';
    echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/logistique/index.php' . '";</script>';
}
$total_rows = $obj_setting->numberOfRows('content_page', " id={$id}");
if ($total_rows > 0) {
    $singlePage = $obj_setting->customQuery("SELECT tab_title FROM content_page where page_name='logistique' and id='" . $id . "'");
    $getPageName = $db->fetchNextObject($singlePage);
    $pageName = $getPageName->tab_title;
} else {
    $pageName = 'There is no Tab exists with this id.';
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:19,代码来源:logistique_delete_code.php

示例13: common

    $start = 0;
}
$eu = $start - 0;
if (!$limit > 0) {
    // if limit value is not available then let us use a default value
    $limit = PAGING_LIMIT;
    // No of records to be shown per page by default.
}
$this1 = $eu + $limit;
$back = $eu - $limit;
$next = $eu + $limit;
if (isset($_GET['field']) and $_GET['field'] != '') {
    $field = 'news_articles' . $_GET['field'];
} else {
    $field = 'articles.id';
}
if (isset($_GET['orderBy']) and $_GET['orderBy'] != '') {
    $orderby = $_GET['orderBy'];
} else {
    $orderby = 'ASC';
}
$obj_setting = new common();
//number of rows in pages table
if ($_GET['cat_id'] != '') {
    $total_rows = $obj_setting->numberOfRows('news_articles', "category_id='" . $_GET['cat_id'] . "'");
    $allArticles = $obj_setting->customQuery("SELECT category.category_name,articles.id,articles.title FROM  news_articles as articles LEFT JOIN news_category as category ON articles.category_id=category.id where articles.category_id='" . $_GET['cat_id'] . "' order by {$field} {$orderby} limit {$eu}, {$limit}");
} else {
    $total_rows = $obj_setting->numberOfRows('news_articles');
    $allArticles = $obj_setting->customQuery("SELECT category.category_name,articles.id,articles.title FROM  news_articles as articles LEFT JOIN news_category as category ON articles.category_id=category.id order by {$field} {$orderby} limit {$eu}, {$limit}");
}
unset($obj_setting);
开发者ID:pankajsinghjarial,项目名称:SYLC-NEWSITE,代码行数:31,代码来源:articles_code.php

示例14: makeAlias

    $obj->add_fields($name, 'req', 'Please Enter Page Title');
    $obj->add_fields($desc, 'req', 'Please Enter Description');
    $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;
        }
        if (isset($searchtext) and $searchtext != '') {
            $addToUrl = '?searchtext=' . $searchtext . '&searchcombo=' . $searchcombo;
        } else {
            $addToUrl = '';
        }
        $_SESSION['success_msg'] = 'Page has been edited successfully.';
        $dataArr = array('name' => $name, 'slug' => $slug, 'desc' => $desc, 'publish' => $publish, 'metatitle' => $metatitle, 'metakeyword' => $metakeyword, 'metadescription' => $metadescription, 'can_delete' => $can_delete, 'page_cat' => $page_cat);
        $update_site = $obj_setting->update(TBL_PAGE, $dataArr, ' id=' . $id);
        echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/page/index.php' . $addToUrl . '";</script>';
        exit;
    }
}
$fetchPage_cat = $obj_setting->customQuery("SELECT * FROM pages where page_cat=0");
unset($obj_setting);
unset($obj);
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:page_edit_code.php

示例15: explode

        <table style="float:right">
          <tr>
            <td><input class="inp-form" type="text" name="searchcar" id="searchcar" value="<?php 
echo $searchcar;
?>
" /></td>
            <td><?php 
//echo $searchattr;
if (isset($searchattr)) {
    $sel = explode("~", $searchattr);
}
?>
              <select class="select-form" name="searchattr">
                <?php 
$objcommon = new common();
$result = $objcommon->customQuery("Select attribute_id, frontend_label,backend_type,frontend_type From attribute  where searchable = '1' order by frontend_label ASC");
while ($row = mysql_fetch_array($result)) {
    ?>
                <option value="<?php 
    echo $row[attribute_id] . "~" . $row[backend_type] . "~" . $row[frontend_type];
    ?>
" <?php 
    if ($sel[0] == $row[attribute_id]) {
        ?>
 selected="selected"<?php 
    }
    ?>
><?php 
    echo $row[frontend_label];
    ?>
</option>
开发者ID:pankajsinghjarial,项目名称:SYLC-AMERICAN,代码行数:31,代码来源:view.php


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