예제 #1
0
$sort = " ORDER BY " . C_STORETYPE_ID . " ";
//======================================================
if (isset($_GET['name'])) {
    $where .= " AND " . C_STORETYPE_NAME . equallike($_GET['name'], "string");
}
if (isset($_GET['description'])) {
    $where .= " AND " . C_STORETYPE_DESCRIPTION . equallike($_GET['description'], "string");
}
if (isset($_GET['id'])) {
    $where .= " AND " . C_STORETYPE_ID . equallike($_GET['id'], "int");
}
if (isset($_GET['pending'])) {
    $where .= " AND " . C_STORETYPE_PENDING . equallike($_GET['pending'], "int");
}
if (isset($_GET['enabled'])) {
    $where .= " AND " . C_STORETYPE_ENABLED . equallike($_GET['enabled'], "int");
}
//======================================================
if (isset($_GET['limit'])) {
    $limit = " LIMIT " . $_GET['limit'] . " ";
}
if (isset($_GET['sortby']) && isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . " " . $_GET['sortorder'] . " ";
}
if (isset($_GET['sortby']) && !isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . $sortorder . " ";
}
//======================================================
$items = StoreType::get_by_sql("SELECT * FROM " . T_STORETYPES . " WHERE " . $where . $sort . $limit);
$filename = 0;
if (!isset($_GET['blob'])) {
예제 #2
0
    $where .= " AND " . C_REVIEW_ITEMTYPE . equallike($_GET['itemtype'], "string");
}
if (isset($_GET['review'])) {
    $where .= " AND " . C_REVIEW_REVIEW . equallike($_GET['review'], "string");
}
if (isset($_GET['rating'])) {
    $where .= " AND " . C_REVIEW_RATING . equallike($_GET['rating'], "int");
}
if (isset($_GET['id'])) {
    $where .= " AND " . C_REVIEW_ID . equallike($_GET['id'], "int");
}
if (isset($_GET['pending'])) {
    $where .= " AND " . C_REVIEW_PENDING . equallike($_GET['pending'], "int");
}
if (isset($_GET['enabled'])) {
    $where .= " AND " . C_REVIEW_ENABLED . equallike($_GET['enabled'], "int");
}
//======================================================
if (isset($_GET['limit'])) {
    $limit = " LIMIT " . $_GET['limit'] . " ";
}
if (isset($_GET['sortby']) && isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . " " . $_GET['sortorder'] . " ";
}
if (isset($_GET['sortby']) && !isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . $sortorder . " ";
}
//======================================================
$items = Review::get_by_sql("SELECT * FROM " . T_REVIEWS . " WHERE " . $where . $sort . $limit);
$filename = 0;
if (!isset($_GET['blob'])) {
예제 #3
0
$sort = " ORDER BY " . C_PRODUCTTYPE_ID . " ";
//======================================================
if (isset($_GET['name'])) {
    $where .= " AND " . C_PRODUCTTYPE_NAME . equallike($_GET['name'], "string");
}
if (isset($_GET['description'])) {
    $where .= " AND " . C_PRODUCTTYPE_DESCRIPTION . equallike($_GET['description'], "string");
}
if (isset($_GET['id'])) {
    $where .= " AND " . C_PRODUCTTYPE_ID . equallike($_GET['id'], "int");
}
if (isset($_GET['pending'])) {
    $where .= " AND " . C_PRODUCTTYPE_PENDING . equallike($_GET['pending'], "int");
}
if (isset($_GET['enabled'])) {
    $where .= " AND " . C_PRODUCTTYPE_ENABLED . equallike($_GET['enabled'], "int");
}
//======================================================
if (isset($_GET['limit'])) {
    $limit = " LIMIT " . $_GET['limit'] . " ";
}
if (isset($_GET['sortby']) && isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . " " . $_GET['sortorder'] . " ";
}
if (isset($_GET['sortby']) && !isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . $sortorder . " ";
}
//======================================================
$items = ProductType::get_by_sql("SELECT * FROM " . T_PRODUCTTYPES . " WHERE " . $where . $sort . $limit);
$filename = 0;
if (!isset($_GET['blob'])) {
예제 #4
0
    $where .= " AND " . C_TRAFFIC_LONGITUDE . equallike($_GET['longitude'], "string");
}
if (isset($_GET['latitude'])) {
    $where .= " AND " . C_TRAFFIC_LATITUDE . equallike($_GET['latitude'], "string");
}
if (isset($_GET['comment'])) {
    $where .= " AND " . C_TRAFFIC_COMMENT . equallike($_GET['comment'], "string");
}
if (isset($_GET['id'])) {
    $where .= " AND " . C_TRAFFIC_ID . equallike($_GET['id'], "int");
}
if (isset($_GET['pending'])) {
    $where .= " AND " . C_TRAFFIC_PENDING . equallike($_GET['pending'], "int");
}
if (isset($_GET['enabled'])) {
    $where .= " AND " . C_TRAFFIC_ENABLED . equallike($_GET['enabled'], "int");
}
//======================================================
if (isset($_GET['limit'])) {
    $limit = " LIMIT " . $_GET['limit'] . " ";
}
if (isset($_GET['sortby']) && isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . " " . $_GET['sortorder'] . " ";
}
if (isset($_GET['sortby']) && !isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . $sortorder . " ";
}
//======================================================
$items = Traffic::get_by_sql("SELECT * FROM " . T_TRAFFICS . " WHERE " . $where . $sort . $limit);
$filename = 0;
if (!isset($_GET['blob'])) {
예제 #5
0
    $where .= " AND " . C_FEATUREDITEM_ITEMID . equallike($_GET['itemid'], "int");
}
if (isset($_GET['itemtype'])) {
    $where .= " AND " . C_FEATUREDITEM_ITEMTYPE . equallike($_GET['itemtype'], "string");
}
if (isset($_GET['priority'])) {
    $where .= " AND " . C_FEATUREDITEM_PRIORITY . equallike($_GET['priority'], "int");
}
if (isset($_GET['id'])) {
    $where .= " AND " . C_FEATUREDITEM_ID . equallike($_GET['id'], "int");
}
if (isset($_GET['pending'])) {
    $where .= " AND " . C_FEATUREDITEM_PENDING . equallike($_GET['pending'], "int");
}
if (isset($_GET['enabled'])) {
    $where .= " AND " . C_FEATUREDITEM_ENABLED . equallike($_GET['enabled'], "int");
}
//======================================================
if (isset($_GET['limit'])) {
    $limit = " LIMIT " . $_GET['limit'] . " ";
}
if (isset($_GET['sortby']) && isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . " " . $_GET['sortorder'] . " ";
}
if (isset($_GET['sortby']) && !isset($_GET['sortorder'])) {
    $sort = " ORDER BY " . $_GET['sortby'] . $sortorder . " ";
}
//======================================================
$sql = "SELECT * FROM " . T_FEATUREDITEMS . " WHERE " . $where . $sort . $limit;
//echo $sql."<br />";
$items = FeaturedItem::get_by_sql($sql);