本文整理汇总了PHP中Backend::processData方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::processData方法的具体用法?PHP Backend::processData怎么用?PHP Backend::processData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend
的用法示例。
在下文中一共展示了Backend::processData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Backend
<?php
require_once "model/Backend.php";
$model = new Backend();
$link = "index.php?mod=articles&act=list";
if (isset($_GET['keyword'])) {
$keyword = $model->processData($_GET['keyword']);
$link .= '&keyword=' . $keyword;
} else {
$keyword = '';
}
if (isset($_GET['category_id'])) {
$category_id = $model->processData($_GET['category_id']);
$link .= '&category_id=' . $category_id;
} else {
$category_id = -1;
}
$limit = 20;
$arrTotal = $model->getListArticle($keyword, $category_id, -1, -1);
$total_page = ceil($arrTotal['total'] / $limit);
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$offset = $limit * ($page - 1);
$arrList = $model->getListArticle($keyword, $category_id, $offset, $limit);
?>
<div class="row">
<div class="col-md-12">
<button class="btn btn-primary btn-sm right" onclick="location.href='index.php?mod=articles&act=form'">Tạo mới</button>
<div class="box-header">
<h3 class="box-title">Danh sách bài viết</h3>
</div>
<!-- /.box-header -->
示例2: Backend
<?php
session_start();
$list_url = "../index.php?mod=house&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = isset($_POST['id']) ? (int) $_POST['id'] : 0;
$arrData['name'] = $name = $model->processData($_POST['name']);
$arrData['description'] = $_POST['description'];
$arrData['city_id'] = (int) $_POST['city_id'];
$arrData['district_id'] = (int) $_POST['district_id'];
$arrData['ward_id'] = (int) $_POST['ward_id'];
$arrData['address'] = $_POST['address'];
$arrData['no_room'] = (int) $_POST['no_room'];
$arrData['video_url'] = $_POST['video_url'];
$arrData['image_url'] = isset($_POST['image_url']) ? str_replace('../', '', $_POST['image_url']) : "";
$arrData['longitude'] = $_POST['longitude'];
$arrData['latitude'] = $_POST['latitude'];
$arrData['type'] = 1;
$arrData['user_id'] = $_SESSION['user_id'];
$str_image = isset($_POST['str_image']) ? $_POST['str_image'] : "";
$arrAddon = $_POST['addon'];
$arrServiceId = $_POST['service_id'];
//var_dump($arrServiceId);die;
$table = "house";
if ($id > 0) {
$arrData['id'] = $id;
$arrData['updated_at'] = time();
$model->update($table, $arrData);
} else {
$arrData['created_at'] = time();
示例3: Backend
<?php
$url = "../index.php?mod=articles&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$arrData['name_vi'] = $name_vi = $model->processData($_POST['name_vi']);
$arrData['name_en'] = $name_en = $model->processData($_POST['name_en']);
$arrData['alias_vi'] = $model->changeTitle($name_vi);
$arrData['alias_en'] = $model->changeTitle($name_en);
$arrData['description_vi'] = addslashes($_POST['description_vi']);
$arrData['description_en'] = addslashes($_POST['description_en']);
$arrData['content_vi'] = addslashes($_POST['content_vi']);
$arrData['content_en'] = addslashes($_POST['content_en']);
$arrData['is_hot'] = (int) $_POST['is_hot'];
$arrData['cate_id'] = (int) $_POST['cate_id'];
$image_url_upload = $_FILES['image_url_upload'];
if ($image_url_upload['name'] != '') {
$arrRe = $model->uploadImages($image_url_upload);
$image_url = $arrRe['filename'];
} else {
$image_url = str_replace('../', '', $_POST['image_url']);
}
$arrData['image_url'] = $image_url;
$meta_title_vi = $model->processData($_POST['meta_title_vi']);
if ($meta_title_vi == '') {
$meta_title_vi = $name_vi;
}
$meta_title_en = $model->processData($_POST['meta_title_en']);
if ($meta_title_en == '') {
$meta_title_en = $name_en;
示例4: Backend
<?php
require_once "model/Backend.php";
$model = new Backend();
$link = $link_back = "index.php?mod=product&act=list";
$link_form = "index.php?mod=product&act=form";
if (isset($_GET['name']) && $_GET['name'] != '') {
$name = $model->processData($_GET['name']);
$link .= "&name=" . $name;
$link_back .= "&name=" . $name;
} else {
$name = '';
}
if (isset($_GET['parent_id']) && $_GET['parent_id'] > 0) {
$parent_id = $_GET['parent_id'];
$link .= "&parent_id=" . $parent_id;
$link_form .= "&parent_id=" . $parent_id;
$detailParent = $model->getDetail('cate', $parent_id);
} else {
$parent_id = 0;
}
if (isset($_GET['cate_type_id']) && $_GET['cate_type_id'] > 0) {
$arrCustom['cate_type_id'] = $_GET['cate_type_id'];
$link .= "&cate_type_id=" . $arrCustom['cate_type_id'];
$link_form .= "&cate_type_id=" . $arrCustom['cate_type_id'];
} else {
$arrCustom['cate_type_id'] = 1;
}
if (isset($_GET['menu_type']) && $_GET['menu_type'] > 0) {
$menu_type = $_GET['menu_type'];
} else {
示例5: Backend
<?php
$url = "../index.php?mod=page&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$arrData['page_name'] = $page_name = $model->processData($_POST['page_name']);
$arrData['page_alias'] = $page_alias = $model->changeTitle($page_name);
$arrData['description'] = $description = addslashes($_POST['description']);
$arrData['content'] = $content = addslashes($_POST['content']);
$image_url_upload = $_FILES['image_url_upload'];
if ($image_url_upload['name'] != '') {
$arrRe = $model->uploadImages($image_url_upload);
$image_url = $arrRe['filename'];
} else {
$image_url = str_replace('../', '', $_POST['image_url']);
}
$arrData['image_url'] = $image_url;
$meta_title = $model->processData($_POST['meta_title']);
$meta_keyword = $model->processData($_POST['meta_keyword']);
$meta_description = $model->processData($_POST['meta_description']);
if ($meta_title == '') {
$meta_title = $page_name;
}
if ($meta_keyword == '') {
$meta_keyword = $page_name;
}
if ($meta_description == '') {
$meta_description = $page_name;
}
$arrData['meta_title'] = $meta_title;
示例6: json_encode
<?php
ini_set('display_errors', 0);
require_once "../model/Backend.php";
$model = new Backend();
$arrResult = array();
$term = $model->processData($_GET['term']);
$sql = "SELECT tag_id, tag_name FROM tag WHERE tag_name LIKE '%" . $term . "%' LIMIT 10 ";
$rs = mysql_query($sql) or die(mysql_error());
while ($row = mysql_fetch_assoc($rs)) {
$arrResult[] = array('id' => $row['tag_id'], 'value' => $row['tag_name']);
}
echo json_encode($arrResult);
示例7: Backend
<?php
$url = "../index.php?mod=portfolio&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$portfolio_name_vi = $model->processData($_POST['portfolio_name_vi']);
$portfolio_name_en = $model->processData($_POST['portfolio_name_en']);
$portfolio_alias = $model->changeTitle($portfolio_name_vi);
$description_vi = $model->processData($_POST['description_vi']);
$client_en = $_POST['client_en'];
$description_en = $model->processData($_POST['description_en']);
$client_vi = $_POST['client_vi'];
$text_link_vi = $_POST['text_link_vi'];
$text_link_en = $_POST['text_link_en'];
$link_url = $_POST['link_url'];
$cate_id = (int) $_POST['cate_id'];
$image_url = str_replace('../', '', $_POST['image_url']);
if ($id > 0) {
$model->updatePortfolio($id, $portfolio_name_vi, $portfolio_name_en, $portfolio_alias, $image_url, $description_vi, $description_en, $text_link_vi, $text_link_en, $client_vi, $client_en, $link_url, $cate_id);
header('location:' . $url . '&cate_id=' . $cate_id);
} else {
$model->insertPortfolio($portfolio_name_vi, $portfolio_name_en, $portfolio_alias, $image_url, $description_vi, $description_en, $text_link_vi, $text_link_en, $client_vi, $client_en, $link_url, $cate_id);
header('location:' . $url . '&cate_id=' . $cate_id);
}
示例8: Backend
<?php
session_start();
require_once "../model/Backend.php";
$model = new Backend();
$url = "../index.php?mod=city&act=list";
$arrParam['city_name'] = $model->processData($_POST['city_name']);
$arrParam['city_alias'] = $model->changeTitle($arrParam['city_name']);
$arrParam['display_order'] = $model->getOrderMax("city");
$city_id = (int) $_POST['city_id'];
$table = "city";
if ($city_id > 0) {
$arrParam['city_id'] = $city_id;
$model->update($table, $arrParam);
} else {
$model->insert($table, $arrParam);
}
header('location:' . $url);
示例9: Backend
<?php
$url = "../index.php?mod=age&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$range = $model->processData($_POST['range']);
if ($id > 0) {
$model->updateAgeRange($id, $range);
header('location:' . $url);
} else {
$model->insertAgeRange($range);
header('location:' . $url);
}
示例10: Backend
<?php
$url = "../index.php?mod=catetype&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['cate_type_id'];
$cate_type_name = $model->processData($_POST['cate_type_name']);
$description = $model->processData($_POST['description']);
$cate_type_alias = $model->changeTitle($cate_type_name);
$is_menu = (int) $_POST['is_menu'];
$hidden = (int) $_POST['hidden'];
if ($id > 0) {
$display_order = $_POST['display_order'];
} else {
$display_order = $model->getOrderMax("cate_type") + 1;
}
$image_url_upload = $_FILES['image_url_upload'];
$icon_url_upload = $_FILES['icon_url_upload'];
if ($image_url_upload['name'] != "") {
$arrRe = $model->uploadImages($image_url_upload);
$image_url = $arrRe['filename'];
} else {
$image_url = str_replace('../', '', $_POST['image_url']);
}
if ($icon_url_upload['name'] != "") {
$arrRe = $model->uploadImages($icon_url_upload);
$icon_url = $arrRe['filename'];
} else {
$icon_url = str_replace('../', '', $_POST['icon_url']);
}
$meta_title = $model->processData($_POST['meta_title']);
示例11: Backend
<?php
$url = "../index.php?mod=about&act=form&id=1";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$name_1_vi = $model->processData($_POST['name_1_vi']);
$name_2_vi = $model->processData($_POST['name_2_vi']);
$content_1_vi = $_POST['content_1_vi'];
$content_2_vi = $_POST['content_2_vi'];
$name_1_en = $model->processData($_POST['name_1_en']);
$name_2_en = $model->processData($_POST['name_2_en']);
$content_1_en = $_POST['content_1_en'];
$content_2_en = $_POST['content_2_en'];
$image_url = str_replace('../', '', $_POST['image_url']);
if ($id > 0) {
$model->updateAbout($id, $name_1_vi, $content_1_vi, $image_url, $name_2_vi, $content_2_vi, $name_1_en, $name_2_en, $content_1_en, $content_2_en);
header('location:' . $url . '&mess=Success');
}
示例12: Backend
<?php
$url = "../index.php?mod=articles&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['article_id'];
$dataArr['article_title'] = $article_title = $model->processData($_POST['article_title']);
$dataArr['title_en'] = $title_en = $model->processData($_POST['title_en']);
$dataArr['article_alias'] = $article_alias = $model->processData($_POST['article_alias']);
$dataArr['description'] = $description = $model->processData($_POST['description']);
$dataArr['content'] = $content = mysql_escape_string($_POST['content']);
$dataArr['source'] = $source = mysql_escape_string($_POST['source']);
$dataArr['seo_text'] = $seo_text = mysql_escape_string($_POST['seo_text']);
$dataArr['cate_id'] = $cate_id = (int) $_POST['cate_id'];
$dataArr['is_hot'] = $is_hot = (int) $_POST['is_hot'];
$dataArr['hidden'] = $hidden = (int) $_POST['hidden'];
$image_url_upload = $_FILES['image_url_upload'];
if ($image_url_upload['name'] != '') {
$arrRe = $model->uploadImages($image_url_upload);
$image_url = $arrRe['filename'];
} else {
$image_url = str_replace('../', '', $_POST['image_url']);
}
$dataArr['image_url'] = $image_url;
$meta_title = $model->processData($_POST['meta_title']);
$seo_title = $model->processData($_POST['seo_title']);
$dataArr['seo_title'] = $seo_title;
$meta_keyword = $model->processData($_POST['meta_keyword']);
$meta_description = $model->processData($_POST['meta_description']);
if ($meta_title == '') {
$meta_title = $page_name;
示例13: Backend
<?php
$url = "../index.php?mod=convenient&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$arrData['name'] = $name = $model->processData($_POST['name']);
$arrData['price'] = str_replace(",", "", $model->processData($_POST['price']));
$arrData['description'] = $model->processData($_POST['description']);
$arrData['display_order'] = 1;
$image_url_upload = $_FILES['image_url_upload'];
if ($image_url_upload['name'] != '') {
$arrRe = $model->uploadImages($image_url_upload);
$image_url = $arrRe['filename'];
} else {
$image_url = str_replace('../', '', $_POST['image_url']);
}
$arrData['image_url'] = $image_url;
$table = "convenient";
if ($id > 0) {
$arrData['id'] = $id;
$arrData['updated_at'] = time();
$model->update($table, $arrData);
} else {
$arrData['created_at'] = time();
$arrData['updated_at'] = time();
$model->insert($table, $arrData);
}
header('location:' . $url);
示例14: Backend
<?php
$list_url = "../index.php?mod=product&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = isset($_POST['id']) ? (int) $_POST['id'] : 0;
$arrData['name_vi'] = $name_vi = $model->processData($_POST['name_vi']);
$arrData['name_en'] = $name_en = $model->processData($_POST['name_en']);
$arrData['alias_vi'] = $model->changeTitle($name_vi);
$arrData['alias_en'] = $model->changeTitle($name_en);
$arrData['description_vi'] = $model->processData($_POST['description_vi']);
$arrData['description_en'] = $model->processData($_POST['description_en']);
$arrData['gift_vi'] = $model->processData($_POST['gift_vi']);
$arrData['gift_en'] = $model->processData($_POST['gift_en']);
$price = $model->processData($_POST['price']);
$arrData['price'] = str_replace(",", "", $price);
$price_sale = $model->processData($_POST['price_sale']);
$arrData['price_sale'] = str_replace(",", "", $price_sale);
$arrData['content_vi'] = addslashes($_POST['content_vi']);
$arrData['content_en'] = addslashes($_POST['content_en']);
$arrData['note_1_vi'] = addslashes($_POST['note_1_vi']);
$arrData['note_1_en'] = addslashes($_POST['note_1_en']);
$arrData['note_2_vi'] = addslashes($_POST['note_2_vi']);
$arrData['note_2_en'] = addslashes($_POST['note_2_en']);
$image_url_upload = $_FILES['image_url_upload'];
$image_url = "";
if ($image_url_upload['name'] != '') {
$arrRe = $model->uploadImages($image_url_upload);
$image_url = $arrRe['filename'];
} else {
$image_url = str_replace("../", "", $_POST['image_url']);
示例15: Backend
<?php
$url = "../index.php?mod=client&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$name_vi = $model->processData($_POST['name_vi']);
$job_vi = $model->processData($_POST['job_vi']);
$content_vi = $model->processData($_POST['content_vi']);
$name_en = $model->processData($_POST['name_en']);
$job_en = $model->processData($_POST['job_en']);
$content_en = $model->processData($_POST['content_en']);
$image_url = str_replace('../', '', $_POST['image_url']);
if ($id > 0) {
$model->updateClient($id, $name_vi, $job_vi, $content_vi, $name_en, $job_en, $content_en, $image_url);
header('location:' . $url);
} else {
$model->insertClient($name_vi, $job_vi, $content_vi, $name_en, $job_en, $content_en, $image_url);
header('location:' . $url);
}