/** * * 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); } }
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)); }
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); }
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); }
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; }
public function letter_content() { $this->check_post_ajax_request(); $return_data = array('status' => 0); $user_id = $this->session->userdata("user_id"); $letter_id = $this->secure_data($this->input->post('letter_id')); $lang_id = $this->secure_data($this->input->post('lang')); $sales_letter_data = getDbData('sales_letters', array('id' => $letter_id)); if ($sales_letter_data) { $lang_temp_cond = array('select' => array('`sales_letters_lang`.*'), 'where' => array('user_id' => $user_id, 'letter_id' => $letter_id, 'language_id' => $lang_id, 'status' => 1), 'row' => 2); $language_sales_letter = $this->common_model->get_rows($lang_temp_cond, 'sales_letters_lang'); if (!$language_sales_letter) { $language_sales_letter = $sales_letter_data; } $html = $this->load->view('agent/salesletters/letter_content', array('language_sales_letter' => $language_sales_letter), true); $return_data['status'] = 1; $return_data['html'] = $html; } else { $return_data['message'] = 'This letter may removed, please try again with different letter.'; } echo json_encode($return_data); }
public function template_content() { $this->check_post_ajax_request(); $return_data = array('status' => 0); $user_id = $this->session->userdata("user_id"); $template_id = $this->secure_data($this->input->post('template_id')); $lang_id = $this->secure_data($this->input->post('lang')); $template_data = getDbData('templates', array('id' => $template_id)); if ($template_data) { $lang_temp_cond = array('select' => array('`lang_templates`.*'), 'where' => array('user_id' => $user_id, 'template_id' => $template_id, 'language_id' => $lang_id, 'status' => 1), 'row' => 2); $language_template = $this->common_model->get_rows($lang_temp_cond, 'lang_templates'); if (!$language_template) { $language_template = $template_data; } $html = $this->load->view('agent/leadtemplates/template_content', array('language_template' => $language_template), true); $return_data['status'] = 1; $return_data['html'] = $html; } else { $return_data['message'] = 'This funnel may removed, please try again with different funnel.'; } echo json_encode($return_data); }
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; } }
<?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
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) {
<?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; ?> " />
@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);
/** * 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) { $weight += 5; $count++; $title = substr($title, strlen($query)); } } } // Get the keywords preg_match('/\\<meta name\\=\\"keywords\\" content\\=\\"([^\\"]*)\\" \\/>/', $file_content, $matches); if (count($matches) > 1) { $keywords = $matches[1]; foreach ($queries as $query) { $tkeywords = imstrtolower($keywords); while (($tkeywords = stristr($tkeywords, $query)) !== false) { $weight += 4; $count++; $tkeywords = substr($tkeywords, strlen($query)); } } } // Get the description preg_match('/\\<meta name\\=\\"description\\" content\\=\\"([^\\"]*)\\" \\/>/', $file_content, $matches); if (count($matches) > 1) { $keywords = $matches[1]; foreach ($queries as $query) { $tkeywords = imstrtolower($keywords); while (($tkeywords = stristr($tkeywords, $query)) !== false) { $weight += 3; $count++; $tkeywords = substr($tkeywords, strlen($query)); } } } // Remove the page title from the result while (stristr($file_content, "<h2") !== false) { $style_start = imstripos($file_content, "<h2"); $style_end = imstripos($file_content, "</h2", $style_start); $style = substr($file_content, $style_start, $style_end - $style_start); $file_content = str_replace($style, "", $file_content); } $page_pos = strpos($file_content, "<div id=\"imContent\">") + strlen("<div id=\"imContent\">"); $page_end = strpos($file_content, "<div id=\"imBtMn\">"); if ($page_end == false) { $page_end = strpos($file_content, "</body>"); } $file_content = strip_tags(substr($file_content, $page_pos, $page_end - $page_pos)); $t_file_content = imstrtolower($file_content); foreach ($queries as $query) { $file = $t_file_content; while (($file = stristr($file, $query)) !== false) { $count++; $weight++; $file = substr($file, strlen($query)); } } if ($count > 0) { $found_count[$filename] = $count; $found_weight[$filename] = $weight; $found_content[$filename] = $file_content; if ($file_title == "") { $found_title[$filename] = $filename; } else { $found_title[$filename] = $file_title; } } } } if (count($found_count)) { arsort($found_weight); $i = 0; foreach ($found_weight as $name => $weight) { $count = $found_count[$name]; $i++; if ($i > $this->page * $this->results_per_page && $i <= ($this->page + 1) * $this->results_per_page) { $title = strip_tags($found_title[$name]); $file = $found_content[$name]; $file = strip_tags($file); $ap = 0; $filelen = strlen($file); $text = ""; for ($j = 0; $j < ($count > 6 ? 6 : $count); $j++) { $minpos = $filelen; $word = ""; foreach ($queries as $query) { if ($ap < $filelen && ($pos = strpos(strtoupper($file), strtoupper($query), $ap)) !== false) { if ($pos < $minpos) { $minpos = $pos; $word = $query; } } } $prev = explode(" ", substr($file, $ap, $minpos - $ap)); if (count($prev) > ($ap > 0 ? 9 : 8)) { $prev = ($ap > 0 ? implode(" ", array_slice($prev, 0, 8)) : "") . " ... " . implode(" ", array_slice($prev, -8)); } else { $prev = implode(" ", $prev); } if (strlen($word)) { $text .= $prev . "<strong>" . substr($file, $minpos, strlen($word)) . "</strong>"; $ap = $minpos + strlen($word); } } $next = explode(" ", substr($file, $ap)); if (count($next) > 9) { $text .= implode(" ", array_slice($next, 0, 8)) . "..."; } else { $text .= implode(" ", $next); } $text = str_replace("|", "", $text); $text = str_replace("<br />", " ", $text); $text = str_replace("<br>", " ", $text); $text = str_replace("\n", " ", $text); $text = str_replace("\t", " ", $text); $text = trim($text); $html .= "<div class=\"imSearchPageResult\"><h3><a class=\"imCssLink\" href=\"" . $name . "\">" . strip_tags($title, "<b><strong>") . "</a></h3>" . strip_tags($text, "<b><strong>") . "<div class=\"imSearchLink\"><a class=\"imCssLink\" href=\"" . $name . "\">" . $imSettings['general']['url'] . "/" . $name . "</a></div></div>\n"; } } $html = preg_replace_callback('/\\s+/', create_function('$matches', 'return implode(\' \', $matches);'), $html); $html .= "<div class=\"imSLabel\"> </div>\n"; } return array("content" => $html, "count" => count($found_content)); }
><?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) { /** * -------------------
$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);
<?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.', '', '');
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');
<?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 } ?>
<?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']; ?>
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"> <span class="glyphicon glyphicon-share-alt"></span> </button> <div class="input-placeholder">댓글 추가...</div> </div> <div class="panel-google-plus-comment" id="comments-' . $C['uid'] . '-reply"> <input type="hidden" name="parent" value="' . $C['uid'] . '" /> <input type="hidden" name="theme" value="' . $theme . '" /> <input type="hidden" name="ouid" value="" /> <img class="img-circle pull-left" src="/_core/opensrc/thumb/image.php?width=46&height:46&cropratio=1:1&image=' . $avatar_img . '" alt="' . $my[$_HS['nametype']] . ' 아바타 " /> <div class="panel-google-plus-textarea"> <textarea rows="4"></textarea> <button type="button" class="btn btn-success disabled" id="one-regis-' . $C['uid'] . '">댓글 올리기</button> <button type="reset" class="btn btn-default">취소</button> </div> <div class="clearfix"></div> </div>'; echo '<div id="oneline-box-' . $C['uid'] . '" class="one-list-wrap">'; // 한줄 의견 리스트 출력함수 호출 getOnelineList($theme, $C['uid']); echo '</div>'; // 한 줄 의견 출력 박스 echo '</div> </article> </section>'; $i++; } //endforeach $R = array(); // 더보기 버튼 설정시 if ($d['comment']['show_more']) { echo '<button class="text-center btn btn-default btn-block ' . $btn_more . '"><i class="fa fa-sort-desc fa-lg"></i><span class="text-muted small"> 더 보기 ( ' . $namegi_ment . ' ) </span></button>'; } }
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); } }
<?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
$email = trim($email); if (!$name || !$email) { getLink('', '', '정상적인 접근이 아닙니다.', ''); } include_once $g['dir_module'] . 'var/var.join.php'; if (!$d['member']['join_email']) { getLink('', '', '죄송합니다. 대표이메일이 등록되지 않았습니다. 관리자에게 문의해 주세요.', ''); } if ($d['member']['login_emailid']) { $R = getDbData($table['s_mbrid'], "id='" . $email . "'", '*'); if (!$R['uid']) { getLink('', '', '입력하신 정보로 일치하는 회원데이터가 없습니다.', ''); } $M = getDbData($table['s_mbrdata'], 'memberuid=' . $R['uid'], '*'); } else { $M = getDbData($table['s_mbrdata'], "email='" . $email . "'", '*'); if (!$M['email']) { getLink('', '', '입력하신 정보로 일치하는 회원데이터가 없습니다.', ''); } $R = getUidData($table['s_mbrid'], $M['memberuid']); } if ($M['name'] != $name) { getLink('', '', '입력하신 정보로 일치하는 회원데이터가 없습니다.', ''); } if ($M['tmpcode']) { getLink('', '', '이미 회원님의 이메일[' . $M['email'] . ']로 \\n임시 비밀번호를 발송해 드렸습니다.', ''); } $auth_pw = 'rb' . date('His'); include_once $g['path_core'] . 'function/email.func.php'; $content = implode('', file($g['dir_module'] . 'doc/_pw.txt')); $content = str_replace('{NAME}', $M['name'], $content);
$d['page']['cctime'] = $g['path_page'] . $_HP['id'] . '.txt'; $d['page']['source'] = $g['main']; } if ($_HP['sosokmenu']) { $_CA = explode('/', $_HP['sosokmenu']); $g['location'] = '<a href="' . RW(0) . '">HOME</a>'; $_tmp['count'] = count($_CA); $_tmp['split_id'] = ''; for ($_i = 0; $_i < $_tmp['count']; $_i++) { $_tmp['location'] = getDbData($table['s_menu'], "id='" . $_CA[$_i] . "'", '*'); $_tmp['split_id'] .= ($_i ? '/' : '') . $_tmp['location']['id']; $g['location'] .= ' > <a href="' . RW('c=' . $_tmp['split_id']) . '">' . $_tmp['location']['name'] . '</a>'; } $g['location'] .= ' > <a href="' . RW('mod=' . $_HP['id']) . '">' . $_HP['name'] . '</a>'; } $_SEO = getDbData($table['s_seo'], 'rel=2 and parent=' . $_HP['uid'], '*'); if ($_SEO['uid']) { $g['meta_tit'] = $_SEO['title']; $g['meta_sbj'] = $_SEO['subject']; $g['meta_key'] = $_SEO['keywords']; $g['meta_des'] = $_SEO['description']; $g['meta_cla'] = $_SEO['classification']; $g['meta_rep'] = $_SEO['replyto']; $g['meta_lan'] = $_SEO['language']; $g['meta_bui'] = $_SEO['build']; } else { $g['meta_tit'] = $_HP['name']; $g['meta_key'] = $_HP['name'] . ',' . $_HP['name']; } } if (!is_file($g['main'])) {
if (getNew($R['d_regis'], 24)) { ?> <span class="new">new</span><?php } ?> </td> <td class="name"><span class="hand" onclick="getMemberLayer('<?php echo $R['mbruid']; ?> ',event);"><?php echo $R[$_HS['nametype']]; ?> </span></td> <?php $infoConfirm2 = getDbData("rb_bbs_confirm", "bbsdatauid='" . $R['uid'] . "'", "*"); ?> <td class="confirm"><?php if (is_array($infoConfirm2)) { ?> 접수<?php } else { ?> 대기<?php } ?> </td> <td class="hit b"><?php echo $R['hit']; ?> </td>
$resResort = getDbArray($table['bbsdata'], "bbsid='resort'", "uid, subject, upload", "uid", "desc", "", ""); } } } } $rcdCount = mysql_num_rows($resResort); $perCol = ceil($rcdCount / 4); ?> <div class="list"> <ul class="resort"> <?php for ($i = 1; $infoResort = db_fetch_array($resResort); $i++) { ?> <?php $uploadUid = substr($infoResort['upload'], 1, strpos($infoResort['upload'], "]") - 1); $infoUpload = getDbData($table['s_upload'], "uid = " . $uploadUid, "url, folder, thumbname "); $uploadSrc = $infoUpload[0] . $infoUpload[1] . "/" . $infoUpload[2]; ?> <li><a href="<?php echo RW("m=bbs&uid=" . $infoResort['uid']); ?> &dp=resort"<?php if ($uid == $infoResort['uid']) { ?> class="over"<?php } ?> onmouseover="swapResortThumb('<?php echo $uploadSrc; ?> ');"><?php
?> /_public/ico_check_01.gif" class="hand" alt="" onclick="chkFlag('members[]');" /></th> <th scope="col">번호</th> <th scope="col">이름</th> <th scope="col">관계</th> <th scope="col">그룹</th> <th scope="col" class="side2">날짜</th> </tr> </thead> <tbody> <?php while ($R = db_fetch_array($RCD)) { ?> <?php $M = getDbData($table['s_mbrdata'], 'memberuid=' . $R[($type == 'follower' ? 'm' : 'b') . 'y_mbruid'], '*'); ?> <?php $M1 = getUidData($table['s_mbrid'], $M['memberuid']); ?> <tr> <td> <input type="checkbox" name="members[]" value="<?php echo $R['uid']; ?> " /> <input type="hidden" id="members_<?php echo $R['uid']; ?> " value="<?php echo $d['member']['login_emailid'] ? $M['email'] : $M1['id'];
</table> </form> </div> <div class="onebox"> <?php foreach ($OCD as $O) { ?> <?php $O['mobile'] = isMobileConnect($O['agent']); ?> <?php $g['member'] = getDbData($table['s_mbrdata'], 'memberuid=' . $O['mbruid'], '*'); ?> <div class="oneline<?php if ($R['oneline'] == ++$_oi) { ?> none<?php } ?> "> <div class="cont"> <div> <?php if ($O['mobile']) {
$_tmparr = explode('&', $_tmpexp[1]); foreach ($_tmparr as $_tmpval) { if (!$_tmpval) { continue; } $_tmparr = explode('=', $_tmpval); ${$_tmparr[0]} = $_tmparr[1]; } } } } if (!$c && $m == $g['sys_module']) { if (!$mod) { $_HP = getUidData($table['s_page'], $g['mobile'] && $_SESSION['pcmode'] != 'Y' ? $_HS['m_startpage'] ? $_HS['m_startpage'] : $_HS['startpage'] : $_HS['startpage']); } else { $_HP = getDbData($table['s_page'], "id='" . $mod . "'", '*'); } if ($_HP['uid']) { $_HM['layout'] = $_HP['layout']; } if ($_mod) { $g['location'] .= ' > <a href="' . RW('mod=' . $_HP['id']) . '">' . $_HP['name'] . '</a>'; if (!$_HS['titlefix']) { $g['browtitle'] = $_HS['title'] . ' - ' . $_HP['name']; } } if ($_HP['pagetype'] == 1) { $_HM['layout'] = $_HP['layout']; $_tmpexp = explode('?', $_HP['joint']); if ($_tmpexp[1]) { $_tmparr = explode('&', $_tmpexp[1]);
} } if ((!$uid || $reply == 'Y') && $snsCallBack && is_file($g['path_module'] . $snsCallBack)) { $xcync = "[][][][][][m:" . $m . ",bid:" . $bbsid . ",uid:" . $NOWUID . "]"; $orignSubject = strip_tags($subject); $orignContent = getStrCut($orignSubject, 60, '..'); $orignUrl = 'http://' . $_SERVER['SERVER_NAME'] . str_replace('./', '/', getCyncUrl($xcync)) . '#CMT'; include_once $g['path_module'] . $snsCallBack; if ($snsSendResult) { getDbUpdate($table[$m . 'data'], "sns='" . $snsSendResult . "'", 'uid=' . $LASTUID); } } include_once $g['dir_module'] . 'theme/_pc/' . $bid . '/_var.php'; // 메일 발송 if ($d['theme']['email_send'] && !$my['admin']) { $AD = getDbData($table['s_mbrdata'], "nic='관리자'", '*'); $email = $AD['email']; $to = $AD['name']; include_once $g['path_core'] . 'function/email.func.php'; include_once $g['path_module'] . 'member/var/var.join.php'; getSendMail($email . '|' . $to, $d['member']['join_email'] . '|' . $_HS['name'], '[' . $_HS['name'] . ']의 [' . $B['name'] . ']게시판에 [' . $name . ']님께서 아래와 같은 내용의 글을 등록하셨습니다. ', $content, 'HTML'); } $_SESSION['bbsback'] = $backtype; if ($backtype == 'list') { getLink($nlist, 'parent.', '', ''); } else { if ($backtype == 'view') { if ($_HS['rewrite'] && !strstr($nlist, '&')) { getLink($nlist . '/' . $NOWUID, 'parent.', '', ''); } else { getLink($nlist . '&mod=view&uid=' . $NOWUID, 'parent.', '', '');