本文整理汇总了PHP中Backend::changeTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::changeTitle方法的具体用法?PHP Backend::changeTitle怎么用?PHP Backend::changeTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend
的用法示例。
在下文中一共展示了Backend::changeTitle方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
示例2: 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;
示例3: Backend
<?php
$url = "../index.php?mod=banner&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['banner_id'];
$name_event = $model->processData($_POST['name_event']);
$name_en = $model->changeTitle($name_event);
$status = $_POST['status'] == null ? 1 : 0;
$position_id = (int) $_POST['position_id'];
$description = $_POST['description'];
$link_url = $_POST['link_url'];
$start_time = $_POST['start_time'] != '' ? strtotime($_POST['start_time']) : 0;
$end_time = $_POST['end_time'] != '' ? strtotime($_POST['end_time']) : 0;
$link_url = $_POST['link_url'];
$type_id = (int) $_POST['type_id'];
if ($type_id != 3) {
$link_url = '';
}
$size_default = $_POST['size_default'];
$content = mysql_escape_string($_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']);
}
if ($id > 0) {
$model->updateBanner($id, $name_event, $name_en, $start_time, $end_time, $position_id, $description, $content, $image_url, $link_url, $type_id, $size_default, $status);
header('location:' . $url . '&position_id=' . $position_id);
示例4: Backend
<?php
$url = "../index.php?mod=manu&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['manu_id'];
$manu_name = $model->processData($_POST['manu_name']);
$manu_alias = $model->changeTitle($manu_name);
$catetype_id = $_POST['catetype_id'];
$is_hot = (int) $_POST['is_hot'];
$hidden = (int) $_POST['hidden'];
if ($id > 0) {
$display_order = $_POST['display_order'];
} else {
$display_order = $model->getOrderMax("manu") + 1;
}
$description = $_POST['description'];
$meta_title = $model->processData($_POST['meta_title']);
$meta_description = $model->processData($_POST['meta_description']);
$meta_keyword = $model->processData($_POST['meta_keyword']);
if ($meta_title == '') {
$meta_title = $manu_name;
}
if ($meta_description == '') {
$meta_description = $manu_name;
}
if ($meta_keyword == '') {
$meta_keyword = $manu_name;
}
$image_url_upload = $_FILES['image_url_upload'];
if ($image_url_upload['name'] != '') {
示例5: 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);
}
示例6: Backend
<?php
$url = "../index.php?mod=articles&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$arrData['name'] = $name = $model->processData($_POST['name']);
$arrData['alias'] = $model->changeTitle($name);
$arrData['description'] = $model->processData($_POST['description']);
$arrData['source'] = $model->processData($_POST['source']);
$arrData['content'] = addslashes($_POST['content']);
$arrData['is_hot'] = (int) $_POST['is_hot'];
$arrData['category_id'] = (int) $_POST['category_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']);
}
$meta_title = $model->processData($_POST['meta_title']);
$meta_keyword = $model->processData($_POST['meta_keyword']);
$meta_description = $model->processData($_POST['meta_description']);
$arrData['meta_title'] = $meta_title == '' ? $name : $meta_title;
$arrData['meta_keyword'] = $meta_keyword == '' ? $name : $meta_keyword;
$arrData['meta_description'] = $meta_description == '' ? $name : $meta_description;
$arrData['image_url'] = $image_url;
$table = "articles";
if ($id > 0) {
$arrData['id'] = $id;
$arrData['updated_at'] = time();
示例7: Backend
<?php
session_start();
require_once "../model/Backend.php";
$model = new Backend();
$url = "../index.php?mod=state&act=list";
$arrParam['state_name'] = $model->processData($_POST['state_name']);
$arrParam['state_alias'] = $model->changeTitle($arrParam['state_name']);
$arrParam['city_id'] = $city_id = (int) $_POST['city_id'];
$state_id = (int) $_POST['state_id'];
$arrParam['display_order'] = $model->getOrderMaxState("state", $city_id);
$table = "state";
if ($state_id > 0) {
$arrParam['id'] = $state_id;
$model->update($table, $arrParam);
} else {
$model->insert($table, $arrParam);
}
header('location:' . $url . "&city_id=" . $city_id);
示例8: Backend
$model = new Backend();
$action = $_POST['action'];
if ($action == 'ajax-checkbox') {
$value = (int) $_POST['val'];
$product_id = (int) $_POST['product_id'];
$col = $_POST['type'];
$model->updateTypeProduct($product_id, $col, $value);
}
if ($action == 'ten-kd') {
$name = $_POST['name'];
echo $a = $model->stripUnicode($name);
exit;
}
if ($action == 'ten-slug') {
$name = $_POST['name'];
echo $a = $model->changeTitle($name);
exit;
}
if ($action == 'cate_menu') {
$value = (int) $_POST['val'];
$cate_id = (int) $_POST['cate_id'];
$model->updateHoteCate($cate_id, $value);
}
if ($action == "get-cate-by-type-product") {
if (isset($_POST['type'])) {
$type = $_POST['type'];
} else {
$type = "form";
}
$cate_type_id = (int) $_POST['cate_type_id'];
$arrCate = $model->getListCate($cate_type_id);
示例9: Backend
$url = "../index.php?mod=product&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['product_id'];
$table = "product";
$cateTypeArr = $_POST['cate_type_id'];
$arrCate = $_POST['cate_id'];
$arr['deal_amount'] = $deal_amount = (int) $_POST['deal_amount'];
$arr['da_ban'] = $da_ban = (int) $_POST['da_ban'];
$arr['start_date'] = $start_date = $_POST['start_date'] != '' ? strtotime($_POST['start_date']) : 0;
$arr['end_date'] = $end_date = $_POST['end_date'] != '' ? strtotime($_POST['end_date']) : 0;
$arr['product_code'] = $product_code = $model->processData($_POST['product_code']);
$arr['product_name'] = $product_name = $model->processData($_POST['product_name']);
$arr['name_en'] = $name_en = $model->processData($_POST['name_en']);
$arr['product_alias'] = $product_alias = $model->changeTitle($product_name);
$arr['is_hot'] = $is_hot = (int) $_POST['is_hot'];
$arr['is_new'] = $is_new = (int) $_POST['is_new'];
$arr['hidden'] = $hidden = (int) $_POST['hidden'];
$arr['trangthai'] = $trangthai = (int) $_POST['trangthai'];
$arr['is_saleoff'] = $is_saleoff = (int) $_POST['is_saleoff'];
$arr['percent_deal'] = $percent_deal = $_POST['percent_deal'];
$arr['size'] = $size = $_POST['size'];
$arr['color'] = $color = $_POST['color'];
$arr['price'] = $price = str_replace(",", "", $_POST['price']);
$arr['price_saleoff'] = $price_saleoff = str_replace(",", "", $_POST['price_saleoff']);
$arr['display_order'] = 1;
$arr['description'] = $description = nl2br($_POST['description']);
$arr['content'] = $content = mysql_real_escape_string($_POST['content']);
$arr['guide_use'] = $guide_use = mysql_real_escape_string($_POST['guide_use']);
$arr['guarantee'] = $guarantee = $_POST['guarantee'];
示例10: 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);
示例11: count
$data = new Spreadsheet_Excel_Reader($_FILES['file']['tmp_name'], true, "UTF-8");
$numCol = $data->colcount();
$rowCol = $data->rowcount();
for ($j = 1; $j <= $numCol; $j++) {
for ($i = 2; $i < $rowCol; $i++) {
$dataArr[$arrColumn[$j - 1]][] = $data->val($i, $j);
}
}
}
if (!empty($dataArr)) {
$count = count($dataArr['product_code']);
for ($k = 0; $k <= $count; $k++) {
foreach ($arrColumn as $value) {
$dataInsert[$value] = $dataArr[$value][$k];
$dataInsert['name_en'] = $model->stripUnicode($dataArr['product_name'][$k]);
$dataInsert['product_alias'] = $model->changeTitle($dataArr['product_name'][$k]);
$id = $model->getProductIdByCode($dataArr['product_code'][$k]);
if ($id > 0) {
$dataInsert['id'] = $id;
}
}
if ($dataInsert['product_code'] != '' && $dataInsert['product_name'] != '' && $dataInsert['cate_type_id'] != '' && $dataInsert['cate_id'] != '') {
if ($dataInsert['id'] > 0) {
$model->update('product', $dataInsert);
echo "Cập nhật thành công sản phẩm '" . $dataInsert['product_name'] . "'" . "<br />";
} else {
$model->insert('product', $dataInsert);
echo "Thêm mới thành công sản phẩm '" . $dataInsert['product_name'] . "'" . "<br />";
}
}
}
示例12: 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']);
示例13: Backend
<?php
$url = "../index.php?mod=team&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['id'];
$name_vi = $model->processData($_POST['name_vi']);
$name_en = $model->processData($_POST['name_en']);
$job_en = $model->processData($_POST['job_en']);
$alias = $model->changeTitle($name_vi);
$job_vi = $model->processData($_POST['job_vi']);
$twitter_url = $_POST['twitter_url'];
$fb_url = $_POST['fb_url'];
$display_order = (int) $_POST['display_order'];
$image_url = str_replace('../', '', $_POST['image_url']);
if ($id > 0) {
$model->updateTeam($id, $name_vi, $name_en, $alias, $job_vi, $job_en, $image_url, $twitter_url, $fb_url, $display_order);
header('location:' . $url);
} else {
$model->insertTeam($name_vi, $name_en, $alias, $job_vi, $job_en, $image_url, $twitter_url, $fb_url, $display_order);
header('location:' . $url);
}
示例14: Backend
<?php
$url = "../index.php?mod=portfolio_cate&act=list";
require_once "../model/Backend.php";
$model = new Backend();
$id = (int) $_POST['cate_id'];
$cate_name_vi = $model->processData($_POST['cate_name_vi']);
$cate_name_en = $model->processData($_POST['cate_name_en']);
$cate_alias = $model->changeTitle($cate_name_vi);
if ($id > 0) {
$model->updatePortfolioCate($id, $cate_name_vi, $cate_name_en, $cate_alias);
header('location:' . $url);
} else {
$model->insertPortfolioCate($cate_name_vi, $cate_name_en, $cate_alias);
header('location:' . $url);
}