本文整理汇总了PHP中getDbData函数的典型用法代码示例。如果您正苦于以下问题:PHP getDbData函数的具体用法?PHP getDbData怎么用?PHP getDbData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getDbData函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: view
/**
*
* view()
*
* Loads the view
*
*/
public function view($view, $data = NULL, $return = FALSE)
{
$CI =& get_instance();
$CI->load->library("session");
$CI->load->model('common_model');
$loaded_data = array();
$loaded_data['content'] = $this->obj->load->view($view, $data, true);
$loaded_data['user_details'] = '';
$loaded_data['logo_name'] = 'KTi Basic Audit';
if ($CI->session->userdata('user_id')) {
$user_cond = array('where' => array('id' => $CI->session->userdata('user_id')), 'row' => 1);
$user_details = $CI->common_model->get_rows($user_cond, 'users');
$loaded_data['user_details'] = $user_details;
if ($CI->session->userdata('user_type') == 3 && !is_null($user_details->agent)) {
$loaded_data['logo_name'] = getDbData('users', array('id' => $user_details->agent), 'username');
} elseif ($CI->session->userdata('user_type') == 2) {
$loaded_data['logo_name'] = $user_details->username;
}
}
if ($return) {
$output = $this->obj->load->view($this->template, $loaded_data, true);
return $output;
} else {
$this->obj->load->view($this->template, $loaded_data, false);
}
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:33,代码来源:Template.php
示例2: index
public function index()
{
$this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'page/setting.js'), 'type' => 'text/javascript'));
$user_id = $this->session->userdata('user_id');
$user_data = getDbData('users', array('id' => $user_id));
$this->template->view('settings/index', array('user_data' => $user_data));
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:7,代码来源:Settings.php
示例3: letter_content
public function letter_content()
{
$this->check_post_ajax_request();
$return_data = array('status' => 0);
$sales_letter_id = $this->secure_data($this->input->post('id'));
$sales_letter_data = getDbData('sales_letters', array('id' => $sales_letter_id));
if ($sales_letter_id !== '' && $sales_letter_data) {
$return_data['sales_letter'] = $sales_letter_data;
$return_data['content'] = stripslashes($sales_letter_data['content']);
$return_data['status'] = 1;
} else {
$return_data['message'] = 'This letter is not available.';
}
echo json_encode($return_data);
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:15,代码来源:Salesletters.php
示例4: template_content
public function template_content()
{
$this->check_post_ajax_request();
$return_data = array('status' => 0);
$template_id = $this->secure_data($this->input->post('id'));
$template_data = getDbData('templates', array('id' => $template_id));
if ($template_id !== '' && $template_data) {
$return_data['template'] = $template_data;
$return_data['content'] = stripslashes($template_data['body']);
$return_data['status'] = 1;
} else {
$return_data['message'] = 'This funnel is not available.';
}
echo json_encode($return_data);
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:15,代码来源:LeadTemplates.php
示例5: basekit
public function basekit($code = '')
{
$auth_code = $this->secure_data($code);
$this->session->unset_userdata('user_id');
$this->session->unset_userdata('user_type');
$this->session->unset_userdata('admin_user_id');
$this->session->unset_userdata('admin_access');
$redirect = base_url() . 'login';
if ($auth_code) {
$user_data = getDbData('users', array('auth_code' => $auth_code));
if ($user_data) {
$this->session->set_userdata("user_id", $user_data['id']);
$this->session->set_userdata("user_type", $user_data['user_type']);
$redirect = base_url() . 'dashboard';
}
}
redirect($redirect);
exit;
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:19,代码来源:Remoteaccess.php
示例6: gmbp
public function gmbp($catid = '', $leadid = '')
{
$this->dynamic_load->add_js('footer', array('src' => 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places', 'type' => 'text/javascript'));
$this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'core/angular.min.js'), 'type' => 'text/javascript'));
$this->dynamic_load->add_js('footer', array('src' => '//ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-sanitize.js', 'type' => 'text/javascript'));
$this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'core/jquery.raty.js'), 'type' => 'text/javascript'));
$this->dynamic_load->add_js('footer', array('src' => asset_url('js', 'leadprocess/gmbp.js'), 'type' => 'text/javascript'));
$this->dynamic_load->add_css(array('href' => asset_url('css', 'jquery.raty.css'), 'rel' => 'stylesheet', 'type' => 'text/css'));
$catid = $this->secure_data($catid);
$leadid = $this->secure_data($leadid);
$lead_data = getDbData('leads', array('md5(id)' => $leadid));
if ($lead_data) {
$user_data = getDbData('users', array('id' => $lead_data['agent_id']));
if ($user_data) {
$this->template->view('leadprocess/gmbp', array('user_data' => $user_data, 'lead_data' => $lead_data, 'islead' => 1));
} else {
show_404();
exit;
}
} else {
show_404();
exit;
}
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:24,代码来源:Leadprocess.php
示例7: sprintf
<?php
for ($i = 1; $i <= $numofmonth; $i++) {
?>
<tr class="looptr">
<td class="datetd"><?php
echo sprintf('%02d', $month);
?>
/<?php
echo sprintf('%02d', $i);
?>
(<?php
echo getWeekday(date('w', mktime(0, 0, 0, $month, $i, $year)));
?>
)</td>
<?php
$DayOf1 = getDbData($table['s_counter'], $accountQue . "date='" . $year . sprintf('%02d', $month) . sprintf('%02d', $i) . "'", '*');
?>
<?php
$DayOf2 = getDbCnt($table['s_browser'], 'sum(hit)', $accountQue . "date='" . $year . sprintf('%02d', $month) . sprintf('%02d', $i) . "' and browser='Mobile'");
?>
<?php
$TOT1 += $DayOf1['hit'];
?>
<?php
$TOT2 += $DayOf1['page'];
?>
<?php
$TOT3 += $DayOf2;
?>
<td class="sumtd1"><?php
开发者ID:kieregh,项目名称:rb1.2,代码行数:31,代码来源:main.desk.php
示例8: unlink
if ($U['type'] == 2) {
unlink($g['path_file'] . $U['folder'] . '/' . $U['thumbname']);
}
}
}
}
}
//태그삭제
if ($R['tag']) {
$_tagdate = substr($R['d_regis'], 0, 8);
$_tagarr1 = explode(',', $R['tag']);
foreach ($_tagarr1 as $_t) {
if (!$_t) {
continue;
}
$_TAG = getDbData($table['s_tag'], "site=" . $R['site'] . " and date='" . $_tagdate . "' and keyword='" . $_t . "'", '*');
if ($_TAG['uid']) {
if ($_TAG['hit'] > 1) {
getDbUpdate($table['s_tag'], 'hit=hit-1', 'uid=' . $_TAG['uid']);
} else {
getDbDelete($table['s_tag'], 'uid=' . $_TAG['uid']);
}
}
}
}
getDbUpdate($table[$m . 'month'], 'num=num-1', "date='" . substr($R['d_regis'], 0, 6) . "' and site=" . $R['site'] . ' and bbs=' . $R['bbs']);
getDbUpdate($table[$m . 'day'], 'num=num-1', "date='" . substr($R['d_regis'], 0, 8) . "' and site=" . $R['site'] . ' and bbs=' . $R['bbs']);
getDbDelete($table[$m . 'idx'], 'gid=' . $R['gid']);
getDbDelete($table[$m . 'data'], 'uid=' . $R['uid']);
getDbUpdate($table[$m . 'list'], 'num_r=num_r-1', 'uid=' . $R['bbs']);
if ($cuid) {
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:a.delete.php
示例9: getDbArray
<?php
$sort = $sort ? $sort : 'gid';
$orderby = $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 91 ? $recnum : 30;
$RCD = getDbArray($table['s_module'], '', '*', $sort, $orderby, $recnum, $p);
$NUM = getDbRows($table['s_module'], '');
$TPG = getTotalPage($NUM, $recnum);
if (!$id) {
$id = 'home';
}
$R = getDbData($table['s_module'], "id='" . $id . "'", '*');
?>
<div id="catebody">
<div id="category">
<form name="mform1" action="<?php
echo $g['s'];
?>
/" method="post" target="_action_frame_<?php
echo $m;
?>
">
<input type="hidden" name="r" value="<?php
echo $r;
?>
" />
<input type="hidden" name="m" value="<?php
echo $module;
?>
" />
开发者ID:kieregh,项目名称:rb1.2,代码行数:31,代码来源:main.php
示例10: array
@chmod($_tmptfile, 0707);
include $_tmptfile;
$gid = 0;
$mdlarray = array('dashboard', 'market', 'admin', 'module', 'site', 'layout', 'domain', 'device');
foreach ($mdlarray as $_val) {
$QUE = "insert into " . $table['s_module'] . " \n\t(gid,system,hidden,mobile,name,id,tblnum,icon,d_regis) \n\tvalues \n\t('" . $gid . "','1','" . (strstr('[market][admin][site][layout]', '[' . $_val . ']') ? 0 : 1) . "','1','" . getFolderName($g['path_module'] . $moduledir[$_val][0]) . "','" . $moduledir[$_val][0] . "','" . $moduledir[$_val][1] . "','kf-" . ($_val == 'site' ? 'home' : $_val) . "','" . $date['totime'] . "')";
db_query($QUE, $DB_CONNECT);
$gid++;
}
$siteid = 'home';
$layout = 'b-dash/default.php';
$QKEY = "gid,id,name,title,titlefix,icon,layout,startpage,m_layout,m_startpage,lang,open,dtd,nametype,timecal,rewrite,buffer,usescode,headercode,footercode";
$QVAL = "'0','" . $siteid . "','{$sitename}','{$sitename}','0','','{$layout}','0','mobile/default.php','0','{$sitelang}','1','','nic','0','0','0','0','',''";
getDbInsert($table['s_site'], $QKEY, $QVAL);
db_query("OPTIMIZE TABLE " . $table['s_site'], $DB_CONNECT);
$S = getDbData($table['s_site'], "id='" . $siteid . "'", '*');
$LASTUID = $S['uid'];
$pagesarray = array('main' => array('메인화면', '3', ''));
foreach ($pagesarray as $_key => $_val) {
$QUE = "insert into " . $table['s_page'] . " \n\t(pagetype,ismain,mobile,id,category,name,perm_g,perm_l,layout,joint,hit,d_regis,d_update)\n\tvalues\n\t('{$_val['1']}','" . ($_key == 'main' ? 1 : 0) . "','" . ($_key == 'main' ? 1 : 0) . "','{$_key}','기본페이지','{$_val['0']}','','0','','{$_val['2']}','0','" . $date['totime'] . "','')";
db_query($QUE, $DB_CONNECT);
/*
$mfile = $g['path_page'].$_key.'.php';
$fp = fopen($mfile,'w');
fwrite($fp,$_val[0]);
fclose($fp);
@chmod($mfile,0707);
$mfile = $g['path_page'].$_key.'.widget.php';
$fp = fopen($mfile,'w');
fwrite($fp,'');
fclose($fp);
开发者ID:eosliebe,项目名称:rb,代码行数:31,代码来源:a.install.php
示例11: searchPages
/**
* Do the pages search
* @access public
* @param queries The search query (array)
*/
function searchPages($queries)
{
global $imSettings;
$html = "";
$found_content = array();
$found_count = array();
if (is_array($this->scope)) {
foreach ($this->scope as $filename) {
$count = 0;
$weight = 0;
$file_content = @implode("\n", file($filename));
// Replace the nonbreaking space with a white space
// to avoid that is converted to a 196+160 UTF8 char
$file_content = str_replace(" ", " ", $file_content);
if (function_exists("html_entity_decode")) {
$file_content = html_entity_decode($file_content, ENT_COMPAT, 'UTF-8');
}
// Remove the page menu
while (stristr($file_content, "<div id=\"imPgMn\"") !== false) {
$style_start = imstripos($file_content, "<div id=\"imPgMn\"");
$style_end = imstripos($file_content, "</div", $style_start);
$style = substr($file_content, $style_start, $style_end - $style_start);
$file_content = str_replace($style, "", $file_content);
}
// Remove the breadcrumbs
while (stristr($file_content, "<div id=\"imBreadcrumb\"") !== false) {
$style_start = imstripos($file_content, "<div id=\"imBreadcrumb\"");
$style_end = imstripos($file_content, "</div", $style_start);
$style = substr($file_content, $style_start, $style_end - $style_start);
$file_content = str_replace($style, "", $file_content);
}
// Remove CSS
while (stristr($file_content, "<style") !== false) {
$style_start = imstripos($file_content, "<style");
$style_end = imstripos($file_content, "</style", $style_start);
$style = substr($file_content, $style_start, $style_end - $style_start);
$file_content = str_replace($style, "", $file_content);
}
// Remove JS
while (stristr($file_content, "<script") !== false) {
$style_start = imstripos($file_content, "<script");
$style_end = imstripos($file_content, "</script", $style_start);
$style = substr($file_content, $style_start, $style_end - $style_start);
$file_content = str_replace($style, "", $file_content);
}
// Remove PHP
while (stristr($file_content, "<?php") !== false) {
$style_start = imstripos($file_content, "<?php");
$style_end = imstripos($file_content, "?>", $style_start) !== false ? imstripos($file_content, "?>", $style_start) + 2 : strlen($file_content);
$style = substr($file_content, $style_start, $style_end - $style_start);
$file_content = str_replace($style, "", $file_content);
}
$file_title = "";
// Replace the dynamic objects with their content
if (is_array($imSettings['search']['dynamicobjects'])) {
foreach ($imSettings['search']['dynamicobjects'] as $id => $object) {
// Only if the object is in the current scope
if ($object['Page'] != $filename) {
continue;
}
// Load the object's content
$dynobj = new DynamicObject($object['ObjectId']);
$dynobj->setDefaultText($object['DefaultText']);
if (isset($object['Folder'])) {
// Load from file
$dynobj->loadFromFile(pathCombine(array($imSettings['general']['public_folder'], $object['Folder'])));
} else {
if (isset($object['Database']) && isset($object['Table'])) {
// Load from db
$db = getDbData($object['Database']);
$dynobj->loadFromDb($db['host'], $db['user'], $db['password'], $db['database'], $object['Table']);
}
}
// Replace the content
$needle_start = "<!-- search-tag " . $object['ObjectId'] . " start -->";
$needle_end = "<!-- search-tag " . $object['ObjectId'] . " end -->";
$find_start = strpos($file_content, $needle_start);
$find_end = strpos($file_content, $needle_end) + strlen($needle_end);
$file_content = substr($file_content, 0, $find_start) . $dynobj->getContent() . substr($file_content, $find_end);
}
}
// Get the title of the page
preg_match('/\\<title\\>([^\\<]*)\\<\\/title\\>/', $file_content, $matches);
if (count($matches) > 1) {
$file_title = $matches[1];
} else {
preg_match('/\\<h2\\>([^\\<]*)\\<\\/h2\\>/', $file_content, $matches);
if (count($matches) > 1) {
$file_title = $matches[1];
}
}
if ($file_title != "") {
foreach ($queries as $query) {
$title = imstrtolower($file_title);
while (($title = stristr($title, $query)) !== false) {
//.........这里部分代码省略.........
开发者ID:NourSoft,项目名称:noursoft.github.io,代码行数:101,代码来源:x5engine.php
示例12: l10n
><?php
echo l10n('cart_plot_cumulative', 'Cumulative amounts');
?>
</option>
<option value="?plot_type=products"<?php
echo $plot_type == 'products' ? " selected" : "";
?>
><?php
echo l10n('cart_plot_productscount', 'Products count');
?>
</option>
</select>
</div>
<?php
if (isset($imSettings['ecommerce']) && isset($imSettings['ecommerce']['database'])) {
$dbconf = getDbData($imSettings['ecommerce']['database']['id']);
$prefix = $imSettings['ecommerce']['database']['table'];
$pagination_length = 15;
$pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
$ecommerce = new ImCart();
// Clean the temp files
$ecommerce->deleteTemporaryFiles("../");
if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
// Connection check
// Build the plot data
$json = "";
$colors = array("rgb(250,164,58)", "rgb(96,189,104)", "rgb(77,77,77)", "rgb(93,165,218)", "rgb(241,124,176)", "rgb(222,207,63)", "rgb(178,118,178)", "rgb(178,145,47)", "rgb(241,88,84)");
$bgcolors = array("rgba(250,164,58,0.2)", "rgba(96,189,104,0.2)", "rgba(77,77,77,0.2)", "rgba(93,165,218,0.2)", "rgba(241,124,176,0.2)", "rgba(222,207,63,0.2)", "rgba(178,118,178,0.2)", "rgba(178,145,47,0.2)", "rgba(241,88,84,0.2)");
switch ($plot_type) {
/**
* -------------------
开发者ID:helixum,项目名称:kevinsplace1,代码行数:31,代码来源:orders-charts.php
示例13: trim
$name = trim($name);
$codhead = trim($codhead);
$codfoot = trim($codfoot);
$category = trim($category);
$addinfo = trim($addinfo);
$writecode = trim($writecode);
$puthead = $inc_head_list . $inc_head_view . $inc_head_write;
$putfoot = $inc_foot_list . $inc_foot_view . $inc_foot_write;
if (!$name) {
getLink('', '', '게시판이름을 입력해 주세요.', '');
}
if (!$id) {
getLink('', '', '아이디를 입력해 주세요.', '');
}
if ($bid) {
$R = getDbData($table[$m . 'list'], "id='" . $bid . "'", '*');
$imghead = $R['imghead'];
$imgfoot = $R['imgfoot'];
$imgset = array('head', 'foot');
for ($i = 0; $i < 2; $i++) {
$tmpname = $_FILES['img' . $imgset[$i]]['tmp_name'];
$realname = $_FILES['img' . $imgset[$i]]['name'];
$fileExt = strtolower(getExt($realname));
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
$userimg = $R['id'] . '_' . $imgset[$i] . '.' . $fileExt;
$saveFile = $g['dir_module'] . 'var/files/' . $userimg;
if (is_uploaded_file($tmpname)) {
if (!strstr('[gif][jpg][png][swf]', $fileExt)) {
getLink('', '', '헤더/풋터파일은 gif/jpg/png/swf 파일만 등록할 수 있습니다.', '');
}
move_uploaded_file($tmpname, $saveFile);
开发者ID:kiminmug,项目名称:rb_module_bbs,代码行数:31,代码来源:a.makebbs.php
示例14: checkAdmin
<?php
if (!defined('__KIMS__')) {
exit;
}
checkAdmin(0);
$admin_id = trim($admin_id);
$R = getDbData($table['s_mbrid'], "id='" . $admin_id . "'", '*');
if (!$R['uid']) {
getLink('', '', '존재하지 않는 회원아이디입니다.', '');
}
$M = getDbData($table['s_mbrdata'], 'memberuid=' . $R['uid'], '*');
if ($M['admin']) {
getLink('', '', '이미 관리자로 지정된 회원입니다.', '');
}
getDbUpdate($table['s_mbrdata'], "admin=1,adm_view=''", 'memberuid=' . $R['uid']);
$fp = fopen($g['dir_module'] . 'var/users/' . $R['id'] . '.widget.php', 'w');
fwrite($fp, '');
fclose($fp);
@chmod($g['dir_module'] . 'var/users/' . $R['id'] . '.widget.php', 0707);
getLink('reload', 'parent.', '', '');
开发者ID:eosliebe,项目名称:rb,代码行数:21,代码来源:a.admin_regis.php
示例15: checkAdmin
if (!defined('__KIMS__')) {
exit;
}
checkAdmin(0);
$id = trim($id);
$category = trim($category);
$name = trim($name);
$joint = trim(str_replace('&', '&', $joint));
$hit = 0;
$d_regis = $date['totime'];
$d_update = '';
if (strstr($joint, '&c=') || strstr($joint, '?c=')) {
getLink('', '', '연결주소에 사용할 수 없는 파라미터가 있습니다.', '');
}
if ($orign_id && $orign_id != $id || !$orign_id) {
$R = getDbData($table['s_page'], "id='" . $id . "'", '*');
if ($R['uid']) {
getLink('', '', '동일한 아이디의 페이지가 존재합니다.', '');
}
}
if ($uid) {
if ($orign_id != $id) {
$mfile1 = $g['path_page'] . $orign_id . '.php';
$mfile2 = $g['path_page'] . $id . '.php';
@rename($mfile1, $mfile2);
@chmod($mfile2, 0707);
$mfile1 = $g['path_page'] . $orign_id . '.widget.php';
$mfile2 = $g['path_page'] . $id . '.widget.php';
@rename($mfile1, $mfile2);
@chmod($mfile2, 0707);
@unlink($g['path_page'] . $orign_id . '.txt');
开发者ID:kieregh,项目名称:rb1.2,代码行数:31,代码来源:a.regispage.php
示例16: checkAdmin
<?php
if (!defined('__KIMS__')) {
exit;
}
checkAdmin(0);
if ($deltype == 'hidden') {
$memberuid = $my['uid'];
$url = $g['s'] . '/?r=' . $r . '&m=' . $m . '&module=' . $_addmodule . '&front=' . $_addfront;
$bookmark_rcd = getDbData($table['s_admpage'], 'memberuid=' . $memberuid . " and url='" . $url . "'", 'uid');
$bookmark_uid = $bookmark_rcd['uid'];
if (!$bookmark_uid) {
getLink('', '', '등록되지 않았거나 이미 삭제된 북마크입니다.', '');
}
getDbDelete($table['s_admpage'], 'uid=' . $bookmark_uid);
?>
<script>
parent.getId('_bookmark_star_').className = 'fa fa-lg fa-star-o';
parent.getId('_bookmark_notyet_').className = 'btn-group btn-group-sm dropdown';
parent.getId('_bookmark_already_').className = 'btn-group btn-group-sm dropdown hidden';
parent.getId('_now_bookmark_<?php
echo $bookmark_uid;
?>
').className = 'list-group-item hidden';
<?php
if (!getDbRows($table['s_admpage'], 'memberuid=' . $my['uid'])) {
?>
parent.getId('_add_bookmark_').innerHTML = '<a class="list-group-item"><i class="fa fa-fw fa-file-text-o"></i>등록된 북마크가 없습니다</a>';
<?php
}
?>
开发者ID:eosliebe,项目名称:rb,代码行数:31,代码来源:a.bookmark_delete.php
示例17: foreach
<?php
foreach ($RCD as $R) {
?>
<?php
$post_link = $g['s'] . '/?r=' . $r . '&c=' . $c . '&uid=' . $R['uid'];
?>
<?php
$UP = getArrayString($R['upload']);
?>
<!-- 첫번째 이미지 uid 찾기-->
<?php
$FU = $UP['data'][0];
?>
<?php
$f_data = getDbData($table[$m . 'upload'], 'uid=' . $FU, '*');
?>
<?php
$f_img = '/modules/bbs/upload/' . $f_data['folder'] . '/' . $f_data['tmpname'];
?>
<div class="col-xs-6 col-md-3">
<a href="<?php
echo $post_link;
?>
" class="thumbnail">
<img class="img-thumbnail" src="/_core/opensrc/thumb/image.php?width=171&height=&cropratio=2:1.4&image=<?php
echo $f_img;
?>
" alt="<?php
echo $R['subject'];
?>
开发者ID:kiminmug,项目名称:rb_module_bbs,代码行数:31,代码来源:list.php
示例18: getCommentList
function getCommentList($theme, $parent, $_where, $recnum, $sort, $orderby1, $orderby2, $cp)
{
global $g, $table, $_HS, $m, $my;
include $theme . '_var.php';
// 설정파일 인클루드
$g['img_module_skin'] = $theme . 'image/';
$NCD = array();
$RCD = array();
$cp = $cp ? $cp : 1;
$sort = $sort ? $sort : 'uid';
$orderby1 = $orderby1 ? $orderby1 : $d['comment']['orderby1'];
$orderby2 = $orderby2 ? $orderby2 : $d['comment']['orderby2'];
$recnum = $recnum ? $recnum : $d['comment']['recnum'];
$cmentque = " and parent='" . str_replace('-', '', $parent) . "'";
if ($_where) {
$cmentque .= " and " . $_where;
}
$PCD = getDbArray($table['s_comment'], 'notice=1' . $cmentque, '*', $sort, $orderby1, 0, 0);
$TCD = getDbArray($table['s_comment'], 'notice=0' . $cmentque, '*', $sort, $orderby2, $recnum, $cp);
$NUM = getDbRows($table['s_comment'], 'notice=0' . $cmentque);
$TPG = getTotalPage($NUM, $recnum);
while ($_R = db_fetch_array($PCD)) {
$NCD[] = $_R;
}
while ($_R = db_fetch_array($TCD)) {
$RCD[] = $_R;
}
//echo $cmentque;
$RCD = $NCD + $RCD;
$i = 1;
$namegi = $NUM - $cp * $recnum;
if ($namegi > 0) {
$namegi_ment = '총 <span class="text-danger namegi">' . $namegi . '</span> 개의 댓글이 더 있습니다.';
$btn_more = 'btn-more';
$is_namegi = 1;
} else {
$namegi_ment = '더이상 댓글이 없습니다.';
$btn_more = 'disabled';
$is_namegi = 0;
}
// 한줄의견 쓰는(현재 로그인한) 사용자 아바타 사진 url 세팅
if ($my['photo']) {
$avatar_img = $g['url_root'] . '/_var/avatar/' . $my['photo'];
} else {
$avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
}
foreach ($RCD as $C) {
$C['mobile'] = isMobileConnect($C['agent']);
if ($C['mbruid']) {
$M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*');
} else {
$M = array();
}
$isSECRETCHECK = true;
$JN_time = getJNTime($C['d_regis']);
// 지난시간 얻기 함수 호출
// 댓글 작성자 아바타 사진 url 세팅
if ($M['photo']) {
$avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo'];
} else {
$avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
}
echo '
<section id="pinBoot" class="rb-pinterest-grid">
<article class="panel panel-default panel-google-plus comment-list" id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '">
<div id="cuid-' . $C['uid'] . '">
<input type="hidden" name="is_namegi" value="' . $is_namegi . '"/>
<input type="hidden" name="TPG" value="' . $TPG . '"/>
<input type="hidden" name="theme" class="theme" value="' . $theme . '" />
<input type="hidden" name="parent" class="parent" value="' . $parent . '" />
<input type="hidden" name="c_content" class="c_content" value="' . htmlspecialchars(getContents($C['content'], $C['html'], $keyword)) . '" />
<div class="dropdown">
<span class="dropdown-toggle" type="button" data-toggle="dropdown">
<span class="[ glyphicon glyphicon-chevron-down ]"></span>
</span>
<ul class="dropdown-menu" role="menu">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</div>
<div class="panel-google-plus-tags">
<ul>
<li>#자동차</li>
<li>#귀성길</li>
</ul>
</div>
<div class="panel-heading">
<img class="img-circle pull-left" src="/_core/opensrc/thumb/image.php?width=46&height:46&cropratio=1:1&image=' . $avatar_img . '" alt="' . $M[$_HS['nametype']] . ' 아바타 " />
<h3>소비자와 함께</h3>
<h5><span>제한적으로 공유함</span> - <span>' . getDateFormat($C['d_regis'], 'Y. m. d') . '</span> </h5>
</div>
<div class="panel-body">
<p>' . getContents($C['content'], $C['html'], $keyword) . '</p>
</div>
<div class="panel-footer">
<button type="button" class="btn btn-default">+1</button>
<button type="button" class="btn btn-default">
//.........这里部分代码省略.........
开发者ID:kieregh,项目名称:test_comment,代码行数:101,代码来源:function.php
示例19: save_config
public function save_config()
{
if ($this->input->server('REQUEST_METHOD') === 'POST' && $this->input->is_ajax_request()) {
$return_data = array('status' => 0);
$user_id = $this->secure_data($this->input->post('user_id'));
$agent_id = $this->session->userdata('user_id');
$isMyClient = getDbData('users', array('id' => $user_id, 'agent' => $agent_id, 'user_type' => 3));
if ($user_id && $isMyClient) {
$update_data = array();
$fields = array('clicky_username', 'clicky_password', 'clicky_siteid');
foreach ($fields as $field) {
$update_data[$field] = $this->secure_data($this->input->post($field));
}
$this->common_model->update_table($update_data, array('user_id' => $user_id), 'user_config');
$return_data['status'] = 1;
$return_data['message'] = 'Successfully saved setting.';
}
echo json_encode($return_data);
}
}
开发者ID:ArpanTanna,项目名称:seo,代码行数:20,代码来源:Clients.php
示例20: getDbData
<?php
$R = getDbData($table['s_mobile'], '', '*');
?>
<div id="mobilebox">
<form class="form-horizontal rb-form" name="procForm" action="<?php
echo $g['s'];
?>
/" method="post" onsubmit="return saveCheck(this);">
<input type="hidden" name="r" value="<?php
echo $r;
?>
" />
<input type="hidden" name="m" value="<?php
echo $module;
?>
" />
<input type="hidden" name="a" value="mobile" />
<input type="hidden" name="checkm" value="<?php
echo $R['usemobile'] ? $R['usemobile'] : 0;
?>
" />
<div class="page-header">
<h4><?php
echo _LANG('a1001', 'device');
?>
</h4>
</div>
<div class="form-group">
<label for="" class="sr-only"><?php
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:main.php
注:本文中的getDbData函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论