本文整理汇总了PHP中content_table函数的典型用法代码示例。如果您正苦于以下问题:PHP content_table函数的具体用法?PHP content_table怎么用?PHP content_table使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了content_table函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
if (!$MOD['show_html'] || !$itemid) {
return false;
}
$item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
if (!$item || $item['status'] < 3 || $item['islink'] > 0) {
return false;
}
extract($item);
$CAT = get_cat($catid);
$content_table = content_table($moduleid, $itemid, $MOD['split'], $table_data);
$t = $db->get_one("SELECT content FROM {$content_table} WHERE itemid={$itemid}");
$content = $t['content'];
if ($lazy) {
$content = img_lazy($content);
}
$CP = $MOD['cat_property'] && $CAT['property'];
if ($CP) {
require_once DT_ROOT . '/include/property.func.php';
$options = property_option($catid);
$values = property_value($moduleid, $itemid);
}
$adddate = timetodate($addtime, 3);
$editdate = timetodate($edittime, 3);
if ($voteid) {
$voteid = explode(' ', $voteid);
}
if ($fromurl) {
$fromurl = fix_link($fromurl);
示例2: dheader
$table = $DT_PRE . 'page';
$table_data = $DT_PRE . 'page_data';
if ($itemid) {
$item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}");
if (!$item || $item['status'] < 3 || $item['username'] != $username) {
dheader($MENU[$menuid]['linkurl']);
}
extract($item);
$t = $db->get_one("SELECT content FROM {$table_data} WHERE itemid={$itemid}");
$content = $t['content'];
if (!$DT_BOT) {
$db->query("UPDATE LOW_PRIORITY {$table} SET hits=hits+1 WHERE itemid={$itemid}", 'UNBUFFERED');
}
$head_title = $title . $DT['seo_delimiter'] . $head_title;
$head_keywords = $title . ',' . $COM['company'];
$head_description = get_intro($content, 200);
} else {
$content_table = content_table(4, $userid, is_file(DT_CACHE . '/4.part'), $DT_PRE . 'company_data');
$t = $db->get_one("SELECT content FROM {$content_table} WHERE userid={$userid}");
$content = $t['content'];
$COM['thumb'] = $COM['thumb'] ? $COM['thumb'] : DT_SKIN . 'image/company.jpg';
}
$TYPE = array();
$result = $db->query("SELECT itemid,title,style FROM {$table} WHERE status=3 AND username='{$username}' ORDER BY listorder DESC,addtime DESC");
while ($r = $db->fetch_array($result)) {
$r['alt'] = $r['title'];
$r['title'] = set_style($r['title'], $r['style']);
$r['linkurl'] = userurl($username, "file={$file}&itemid={$r['itemid']}", $domain);
$TYPE[] = $r;
}
include template('introduce', $template);
示例3: delete
function delete($itemid, $all = true)
{
global $MOD;
if (is_array($itemid)) {
foreach ($itemid as $v) {
$this->delete($v, $all);
}
} else {
$this->itemid = $itemid;
$r = $this->get_one();
if ($MOD['show_html']) {
$_file = DT_ROOT . '/' . $MOD['moduledir'] . '/' . $r['linkurl'];
if (is_file($_file)) {
unlink($_file);
}
}
if ($all) {
$userid = get_user($r['username']);
if ($r['thumb']) {
delete_upload($r['thumb'], $userid);
}
if ($r['video']) {
delete_upload($r['video'], $userid);
}
if ($r['content']) {
delete_local($r['content'], $userid);
}
$this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
$content_table = content_table($this->moduleid, $this->itemid, $this->split, $this->table_data);
$this->db->query("DELETE FROM {$content_table} WHERE itemid={$itemid}");
if ($MOD['cat_property']) {
$this->db->query("DELETE FROM {$this->db->pre}category_value WHERE moduleid={$this->moduleid} AND itemid={$itemid}");
}
if ($r['username'] && $MOD['credit_del']) {
credit_add($r['username'], -$MOD['credit_del']);
credit_record($r['username'], -$MOD['credit_del'], 'system', lang('my->credit_record_del', array($MOD['name'])), 'ID:' . $this->itemid);
}
}
}
}
示例4: usersMenus
<?php
include_once 'ressources/class.templates.inc';
$users = new usersMenus();
if (!$users->AsArticaMetaAdmin) {
$tpl = new templates();
echo FATAL_WARNING_SHOW_128("{ERROR_NO_PRIVS}");
die;
}
if (isset($_GET["content-js"])) {
content_js();
exit;
}
if (isset($_GET["content-table"])) {
content_table();
exit;
}
if (isset($_GET["content-search"])) {
content_search();
exit;
}
if (isset($_GET["unlink-js"])) {
unlink_js();
exit;
}
if (isset($_POST["unlink"])) {
unlink_perform();
exit;
}
if (isset($_GET["search"])) {
search();
示例5: substr
$sqlv = substr($sqlv, 1);
$db->query("INSERT INTO {$table_member} ({$sqlk}) VALUES ({$sqlv})");
$userid = $db->insert_id();
$T['userid'] = $userid;
$sqlk = $sqlv = '';
foreach ($T as $k => $v) {
if (!in_array($k, $cfs)) {
continue;
}
$sqlk .= ',' . $k;
$sqlv .= ",'{$v}'";
}
$sqlk = substr($sqlk, 1);
$sqlv = substr($sqlv, 1);
$db->query("INSERT INTO {$table_company} ({$sqlk}) VALUES ({$sqlv})");
$content_table = content_table(4, $userid, is_file(DT_CACHE . '/4.part'), $table_company_data);
$db->query("INSERT INTO {$content_table} (userid,content) VALUES ('{$userid}', '{$content}')");
} else {
if ($type == 2) {
$sqlk = $sqlv = '';
foreach ($T as $k => $v) {
$sqlk .= ',' . $k;
$sqlv .= ",'{$v}'";
}
$sqlk = substr($sqlk, 1);
$sqlv = substr($sqlv, 1);
$db->query("INSERT INTO {$DT_PRE}{$tb} ({$sqlk}) VALUES ({$sqlv})");
}
}
}
$total++;
示例6: deluser
function deluser($table, $user, $name = true, $data = false, $moduleid = 0)
{
global $DT_PRE, $MODULE;
if (!$user) {
return;
}
$fields = $name ? 'username' : 'userid';
if ($data) {
$result = $this->db->query("SELECT * FROM {$DT_PRE}{$table} WHERE `{$fields}`='{$user}'");
while ($r = $this->db->fetch_array($result)) {
$itemid = $r['itemid'];
$this->db->query("DELETE FROM {$DT_PRE}{$table} WHERE itemid='{$itemid}'");
$table_data = strpos($table, '_') === false ? $table . '_data' : str_replace('_', '_data_', $table);
$table_data = $DT_PRE . $table_data;
if ($moduleid) {
$table_data = content_table($moduleid, $itemid, is_file(DT_CACHE . '/' . $moduleid . '.part'), $table_data);
}
$this->db->query("DELETE FROM {$table_data} WHERE itemid='{$itemid}'");
if ($MODULE[$moduleid]['module'] == 'sell') {
$this->db->query("DELETE FROM {$this->db->pre}sell_search_{$moduleid} WHERE itemid={$itemid}");
}
if ($moduleid && $r['linkurl'] && strpos($r['linkurl'], '://') === false && strpos($r['linkurl'], '.php') === false && strpos($r['linkurl'], 'show-') === false) {
$html = DT_ROOT . '/' . $MODULE[$moduleid]['moduledir'] . '/' . $r['linkurl'];
if (is_file($html)) {
file_del($html);
}
}
}
} else {
$this->db->query("DELETE FROM {$DT_PRE}{$table} WHERE `{$fields}`='{$user}'");
}
}
示例7: include_once
<?php
include_once('ressources/class.templates.inc');
$users=new usersMenus();
if(!$users->AsSystemAdministrator){
$tpl=new templates();
echo FATAL_WARNING_SHOW_128("{ERROR_NO_PRIVS}");die();
}
if(isset($_GET["content-js"])){content_js();exit;}
if(isset($_GET["content-table"])){content_table();exit;}
if(isset($_GET["content-search"])){content_search();exit;}
if(isset($_GET["unlink-js"])){unlink_js();exit;}
if(isset($_POST["unlink"])){unlink_perform();exit;}
if(isset($_GET["search"])){search();exit;}
page();
function content_js(){
header("content-type: application/x-javascript");
$tpl=new templates();
$table="snapshots";
$database="artica_snapshots";
$page=CurrentPageName();
$ID=$_GET["ID"];