function isExistsID($id) { $id = urlencode($id); $config = array('HEADER' => true, 'NOBODY' => true); $contents = getContents('http://manage.members.yahoo.com/index_deny.html?id=' . $id, $config); if (!strstr($contents, 'error.html')) { return true; } return false; }
function getSongInfo($id, $name) { global $hashKey, $serverUrl; $sig = md5($hashKey . $id); $url = $serverUrl . "songstreaming?id=" . $id . "&output=xml&sig=" . $sig; $str = getContents($url); $doc = new DOMDocument(); @$doc->loadXML($str); $v = $doc->getElementsByTagName($name); if ($v->length == 0) { return; } return $v->item(0)->nodeValue; }
public function loadAPI() { $result = $this->api->xpath("/eveapi/result/rowset[@name='assets']/row"); $this->assets = array(); foreach ($result as $entry) { $contents = getContents($entry); uasort($contents, "sortfunc_contents"); $this->assets[(double) $entry["itemID"]] = $contents; } $itemTypes = array(); $itemGroups = array(); $allLocs = array(); foreach ($this->assets as $item) { $itemTypes = add_items($itemTypes, $item); $allLocs[locationTranslate($item["locationID"])] = 1; } $this->Db->cacheItemTypes(array_keys($itemTypes)); $this->Db->cacheLocationIds(array_keys($allLocs)); foreach ($this->assets as $item) { $itemGroups = add_groups($this->Db, $itemGroups, $item); } $this->Db->cacheGroupTypes(array_keys($itemGroups)); global $sortDb; $sortDb = $this->Db; uasort($this->assets, "sortfunc_locname"); $this->assetsByLocation = array(); foreach ($this->assets as $itemId => $item) { $locid = locationTranslate($item["locationID"]); if (!isset($this->assetsByLocation[$locid])) { $this->assetsByLocation[locationTranslate($locid)] = array($item['itemID'] => $item); } else { $this->assetsByLocation[locationTranslate($locid)][$item['itemID']] = $item; } } $this->totalCt = count($this->api->xpath("//row")); //print_r($this->assets); return true; }
header("Content-Type: text/plain"); set_time_limit(0); $url = "https://kmgy.localwiki.org/api/v4/maps/?format=json&points__within=%7B%22type%22%3A%22Polygon%22%2C%22coordinates%22%3A%5B%5B%5B139.44677%2C36.083669%5D%2C%5B139.300618%2C36.111246%5D%2C%5B139.314815%2C36.146557%5D%2C%5B139.289754%2C36.160663%5D%2C%5B139.333038%2C36.179971%5D%2C%5B139.347251%2C36.253626%5D%2C%5B139.444139%2C36.196797%5D%2C%5B139.41663%2C36.188097%5D%2C%5B139.44677%2C36.083669%5D%5D%5D%7D"; $main_ary = array(); //タグとiconの読み替え $icons = array("portal" => "/images/portal.png", "coolshare" => "/images/cool.png", "直実武蔵武士史跡" => "/images/naozane.gif"); $iconkeys = array_keys($icons); getUrlToArray($url); //必要なものに限定 $result_ary = array(); foreach ($main_ary as $data) { $location = $data["points"]["coordinates"][0]; $data["location"] = $location; $page = $data["page"]; $data["contents"] = getContents($page); $tags = $data["contents"]["tags"]; $data["contents"]["icon"] = tags2icon($tags); unset($data["url"]); unset($data["region"]); unset($data["geom"]); unset($data["lines"]); unset($data["polys"]); unset($data["length"]); unset($data["points"]); $result_ary[] = $data; } $fp = fopen("/var/www/vhosts/kumagaya.code4saitama.org/httpdocs/js/kumagaya.json", "w"); fwrite($fp, json_encode($result_ary)); fclose($fp); echo "end";
<table width="100%" cellspacing="0" cellpadding="0" style="border:solid 1px #dfdfdf;padding:10px 10px 10px 10px;"> <tr> <td bgcolor="#efefef" style="padding:10px 10px 10px 10px;border-bottom:1px solid #dfdfdf;"><strong>공지 및 유의사항</strong></td> </tr> <tr> <td valign="top" style="padding:10px 10px 10px 10px;border-bottom:1px solid #dfdfdf;line-height:17px;"><?php echo $R['add_txt12']; ?> </td> </tr> </table> </div> <div class="detail_contents"> <?php echo getContents($R['content'], $R['html'], $keyword); ?> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right"><a href="#" onClick="history.go(0)"><img src="<?php echo $g['img_module_skin']; ?> /topicon.jpg" border="0"></a> </td> </tr> </table> </div>
$dom = new DOMDocument(); @$dom->loadHTML($html); // grab all the on the page $xpath = new DOMXPath($dom); $hrefs = $xpath->evaluate('/html/body//div[@id="ImgCont"]//td//a'); for ($i = 0; $i < $hrefs->length; $i++) { $url = $hrefs->item($i)->getAttribute('href'); list(, $querystring) = explode('?', $url); $neturl = new Net_URL2("http://example.com/?{$querystring}"); $vars = $neturl->getQueryVariables(); if (isset($vars['imgurl'])) { $images[] = $vars['imgurl']; } } } foreach ($images as $count => $image) { preg_match_all('/([.][^.]+)$/', $image, $foo); if (!isset($foo[0][0])) { continue; } $ext = strtolower($foo[0][0]); $filename = "images/kittens/{$count}{$ext}"; echo $filename . "\n"; try { $contents = getContents($image, 0, $userAgent)->getBody(); } catch (HTTP_Request2_Exception $e) { echo $e->getMessage() . "\n"; continue; } file_put_contents($filename, $contents); }
<div id="content"> <div class="pqMain"> <?php include_once 'panelmenu.php'; ?> <div class="cntHolder"> <?php //////////////////////////////////////////////////////////////// /********************* Get Page ******************************/ if ($_GET['action'] == 'getpage' && !empty($_GET['page'])) { @(include_once $_GET['page'] . '.php'); } else { echo getContents($db, 'my_panel'); } ?> </div> </div> </div> <!-- content End --> <!-- Footer Include --> <div id="footer"><?php include_once 'footer.php'; ?> </div> <!-- wrraper End -->
/** * getNumLoggedIn * * @access private * @return number of logged in users with shells */ private function getNumLoggedIn() { // Snag command line of every process in system $procs = glob('/proc/*/cmdline', GLOB_NOSORT); // Store unqiue users here $users = array(); // Each process foreach ($procs as $proc) { // Does the process match a popular shell, such as bash, csh, etc? if (preg_match('/(?:bash|csh|zsh|ksh)$/', getContents($proc, ''))) { // Who the f**k owns it, anyway? $owner = fileowner(dirname($proc)); // Careful.. if (!is_numeric($owner)) { continue; } // Have we not seen this user before? if (!in_array($owner, $users)) { $users[] = $owner; } } } // Give number of unique users with shells running return count($users); }
?> " target="_action_frame_<?php echo $m; ?> " onclick="return confirm('정말로 신고하시겠습니까? ');">신고</a></span> </div> <div class="comment_reply"> <?php if ($O['hidden'] && $my['nic'] == $O['nic']) { ?> <span class="st_secret">비밀답글입니다.</span><br /><?php } ?> <?php if (!$O['hidden'] or $my['admin'] or $my['nic'] == $R['nic']) { echo getContents($O['content'], $O['html']); if (getNew($O['d_regis'], 24)) { ?> <span class="new"><img src="<?php echo $g['img_module_skin']; ?> /new.gif"></span><?php } } else { ?> <span class="st_secret">비공개 답글입니다. ^^*</span><br /><?php } ?> </div> </div> <div class="clear"></div>
<?php $ViewPerm = getEnterPerm($bbs[ViewPm], "", true, true); if (!$ViewPerm) { putErrPage(getErrorMsg(2)); } $RCD = db_fetch_array(db_query("SELECT * FROM kimsbod7_{$table}_dat WHERE BB_UID='{$uid}'", $DB_CONNECT)); if (!$RCD[BB_UID]) { putErrPage(getErrorMsg(3)); } if ($RCD[BB_SECRET]) { isSecretPass($HTTP_SESSION_VARS[kimsboard7_secr], $RCD[BB_UID], $RCD[BB_MB_ID]); } $g_Mail_Content = @implode('', @file('./bbs/lib/module/mailform/sendmail.txt')); $g_Mail_Content = str_replace('[본문]', getContents($RCD[BB_CONTENT], $RCD[BB_HTML], $bbs[TextHLight]), $g_Mail_Content); $g_Mail_Content = str_replace('[멘트]', nl2br(htmlspecialchars($content)), $g_Mail_Content); $g_Mail_Content = str_replace('[경로]', $root[base], $g_Mail_Content); $g_Mail_Content = str_replace('[제목]', $subject, $g_Mail_Content); $g_Mail_Content = str_replace('[출처]', $root[title], $g_Mail_Content); $g_Mail_Content = str_replace('[원문]', $root[base] . '/bbs.php?table=' . $table . '&query=view&uid=' . $uid, $g_Mail_Content); $g_Mail_Content = str_replace('[원제]', $RCD[BB_SUBJECT], $g_Mail_Content); $To = "\"{$to_name}\" <{$to_email}>"; $Frm = "\"{$from_name}\" <{$from_email}>"; $Header = "From:{$Frm}\nContent-Type:text/html\nReply-To:{$frm}\nX-Mailer:PHP/" . phpversion(); $result = @mail($To, $subject, stripslashes($g_Mail_Content), $Header); $alert = $result ? "It was sent out in the normality." : "This mail is not sent out."; ?> <meta http-equiv="content-type" content="text/html; charset=euc-kr">
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>'; } }
/** * getServices * * @access private * @return array the services */ public function getServices() { // Time? if (!empty($this->settings['timer'])) { $t = new LinfoTimerStart('Services'); } // We allowed? if (!empty($settings['show']['services']) || !is_array($this->settings['services']) || count($this->settings['services']) == 0) { return array(); } // Temporarily keep statuses here $statuses = array(); // A bit of unfucking potential missing values in config file $this->settings['services']['executables'] = (array) $this->settings['services']['executables']; $this->settings['services']['pidFiles'] = (array) $this->settings['services']['pidFiles']; // Convert paths of executables to PID files $pids = array(); $do_process_search = false; if (count($this->settings['services']['executables']) > 0) { $potential_paths = @glob('/proc/*/cmdline'); if (is_array($potential_paths)) { $num_paths = count($potential_paths); $do_process_search = true; } } // Should we go ahead and do the PID search based on executables? if ($do_process_search) { // Precache all process cmdlines for ($i = 0; $i < $num_paths; $i++) { $cmdline_cache[$i] = explode("", getContents($potential_paths[$i])); } // Go through the list of executables to search for foreach ($this->settings['services']['executables'] as $service => $exec) { // Go through pid file list. for loops are faster than foreach for ($i = 0; $i < $num_paths; $i++) { $cmdline = $cmdline_cache[$i]; $match = false; if (is_array($exec)) { $match = true; foreach ($exec as $argn => $argv) { if ($cmdline[$argn] != $argv) { $match = false; } } } else { if ($cmdline[0] == $exec) { $match = true; } } // If this one matches, stop here and save it if ($match) { // Get pid out of path to cmdline file $pids[$service] = substr($potential_paths[$i], 6, strpos($potential_paths[$i], '/', 7) - 6); break; } } } } // PID files foreach ($this->settings['services']['pidFiles'] as $service => $file) { $pid = getContents($file, false); if ($pid != false && is_numeric($pid)) { $pids[$service] = $pid; } } // Deal with PIDs foreach ($pids as $service => $pid) { $path = '/proc/' . $pid . '/status'; $status_contents = getContents($path, false); if ($status_contents == false) { $statuses[$service] = array('state' => 'Down', 'threads' => 'N/A', 'pid' => $pid); continue; } // Attempt getting info out of it if (!preg_match_all('/^(\\w+):\\s+(\\w+)/m', $status_contents, $status_matches, PREG_SET_ORDER)) { continue; } // Initially set these as pointless $state = false; $threads = false; $mem = false; // Go through //foreach ($status_matches as $status_match) { for ($i = 0, $num = count($status_matches); $i < $num; $i++) { // What have we here? switch ($status_matches[$i][1]) { // State section case 'State': switch ($status_matches[$i][2]) { case 'D': // disk sleep? wtf? // disk sleep? wtf? case 'S': $state = 'Up (Sleeping)'; break; case 'Z': $state = 'Zombie'; break; // running // running case 'R': $state = 'Up (Running)'; break; // stopped // stopped case 'T': $state = 'Up (Stopped)'; break; default: continue; break; } break; // Mem usage // Mem usage case 'VmRSS': if (is_numeric($status_matches[$i][2])) { $mem = $status_matches[$i][2] * 1024; } // Measured in kilobytes; we want bytes break; // Thread count // Thread count case 'Threads': if (is_numeric($status_matches[$i][2])) { $threads = $status_matches[$i][2]; } // Thread count should be last. Stop here to possibly save time assuming we have the other values if ($state !== false && $mem !== false && $threads !== false) { break; } break; } } // Save info $statuses[$service] = array('state' => $state ? $state : '?', 'threads' => $threads, 'pid' => $pid, 'memory_usage' => $mem); } return $statuses; }
echo $adddata['honeymoon']; ?> </dd> </dl> <div class="clear"></div> <?php // 내용 쪼개기 $arrContent = explode("[bc_separator]", $R['content']); if ($_GET['dp'] == "resort" || $_GET['dp'] == "") { echo getContents($arrContent[0], $R['html']) . "\n<br><br>\n"; } if ($_GET['dp'] == "room" || $_GET['dp'] == "") { echo getContents($arrContent[1], $R['html']) . "\n<br><br>\n"; } if ($_GET['dp'] == "facility" || $_GET['dp'] == "") { echo getContents($arrContent[2], $R['html']) . "\n<br><br>\n"; } ?> <?php if ($_GET['dp'] == "sdetail") { ?> <table class="miniboard"> <colgroup> <col width="100" /> <col width="70" /> <col width="80" /> <col width="" /> <col width="120" /> </colgroup> <thead>
function getNews() { $url = "http://rss.sina.com.cn/news/marquee/ddt.xml"; $content = getContents($url); // $rss =& new XML_RSS($content); // $rss->parse(); // $news_str = ""; // foreach ($rss->getItems() as $item) // { // $news_str .= $item['title']." "; // } return $content; }
exit; } @ini_set('magic_quotes_runtime', 0); // 2) PIWIK.PHP PROXY: GET parameters found, this is a tracking request, we redirect it to Piwik $url = sprintf("%spiwik.php?cip=%s&token_auth=%s&", $PIWIK_URL, getVisitIp(), $TOKEN_AUTH); foreach ($_GET as $key => $value) { $url .= urlencode($key) . '=' . urlencode($value) . '&'; } sendHeader("Content-Type: image/gif"); $stream_options = array('http' => array('user_agent' => arrayValue($_SERVER, 'HTTP_USER_AGENT', ''), 'header' => sprintf("Accept-Language: %s\r\n", str_replace(array("\n", "\t", "\r"), "", arrayValue($_SERVER, 'HTTP_ACCEPT_LANGUAGE', ''))), 'timeout' => $timeout)); if (version_compare(PHP_VERSION, '5.3.0', '<')) { // PHP 5.2 breaks with the new 204 status code so we force returning the image every time echo getContents($url . '&send_image=1', $stream_options); } else { // PHP 5.3 and above $content = getContents($url, $stream_options); // Forward the HTTP response code if (!headers_sent() && isset($http_response_header[0])) { header($http_response_header[0]); } echo $content; } function getVisitIp() { $matchIp = '/^([0-9]{1,3}\\.){3}[0-9]{1,3}$/'; $ipKeys = array('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_CF_CONNECTING_IP'); foreach ($ipKeys as $ipKey) { if (isset($_SERVER[$ipKey]) && preg_match($matchIp, $_SERVER[$ipKey])) { return $_SERVER[$ipKey]; } }
protected function loadDmesg() { $this->dmesg = getContents('/var/run/dmesg.boot'); }
function getPage($page_id) { $result = mysql_query("select * from cms_pages where id='{$page_id}' "); $numrows = mysql_num_rows($result); if ($numrows) { $page_title = mysql_result($result, $i, 'title'); $page_html = mysql_result($result, $i, 'html'); $page_type = mysql_result($result, $i, 'type'); $widget_id = mysql_result($result, $i, 'widget_id'); $widget_arr = getContents($page_html, '##wid_start##', '##wid_end##'); $final_html = $page_html; foreach ($widget_arr as $widget_content) { $widget_id = getContents($widget_content, '##wid_id_start##', '##wid_id_end##')[0]; $widget_condition = getContents($widget_content, '##wid_con_start##', '##wid_con_end##')[0]; $template_html = getWidget($widget_id, $page_id, $widget_condition); $final_html = str_replace('##wid_start##', '', str_replace('##wid_end##', '', replaceContents($final_html, '##wid_start##', '##wid_end##', $template_html))); } return $final_html; } }
/** * Get the PCI ids from /sys * * @access private */ private function _fetchPciIdsLinux() { $pci_paths = (array) @glob('/sys/bus/pci/devices/*', GLOB_NOSORT); $num_pci_paths = count($pci_paths); for ($i = 0; $i < $num_pci_paths; $i++) { $path = $pci_paths[$i]; // See if we can use simple vendor/device files and avoid taking time with regex if (($f_device = getContents($path . '/device', '')) && ($f_vend = getContents($path . '/vendor', '')) && $f_device != '' && $f_vend != '') { list(, $v_id) = explode('x', $f_vend, 2); list(, $d_id) = explode('x', $f_device, 2); $this->_pci_entries[$v_id][$d_id] = 1; } elseif (is_readable($path . '/uevent') && preg_match('/pci\\_(?:subsys_)?id=(\\w+):(\\w+)/', strtolower(getContents($path . '/uevent')), $match)) { $this->_pci_entries[$match[1]][$match[2]] = 1; } elseif (is_readable($path . '/modalias') && preg_match('/^pci:v0{4}([0-9A-Z]{4})d0{4}([0-9A-Z]{4})/', getContents($path . '/modalias'), $match)) { $this->_pci_entries[strtolower($match[1])][strtolower($match[2])] = 1; } } }
/** * Function to: sort, exclude keys, and format content string * @param array $array * @param array $sort * @return string */ function parse_form($array, $sort = "") { // reserved keyword array $reserved_keys = array('alink_color', 'allowedFileTypes', 'bcc', 'bgcolor', 'cc', 'cs_config_country_field', 'cs_config_state_field', 'cs_config_country_default', 'cs_config_state_default', 'countryDefault', 'env_report', 'fixedFromEmail', 'fixedFromName', 'form_notice', 'Helo', 'Host', 'IP', 'link_color', 'Mailer', 'MAX_FILE_SIZE', 'missing_fields_redirect', 'path_to_file', 'Password', 'Port', 'print_blank_fields', 'recipient', 'redirect', 'redirectOnBan', 'redirectOnFail', 'referer', 'replyEmailOnFail', 'replyEmailOnSuccess', 'require', 'required', 'reserved_key_words', 'reset', 'reset_x', 'reset_y', 'return_link_url', 'return_link_title', 'send', 'SMTPKeepAlive', 'sort', 'stateDefault', 'style_sheet', 'subject', 'submit', 'submit_x', 'submit_y', 'text_color', 'Timeout', 'title', 'useAsAutoResponder', 'useEnvRpt', 'Username', 'vlink_color', 'WorxTuringTest'); if (isset($_POST['reserved_key_words'])) { $reserved_key_words = $_POST['reserved_key_words']; $resarray = explode(',', $reserved_key_words); if (count($resarray) == 1) { $reserved_keys[] = $reserved_key_words; } else { for ($ra = 0; $ra < count($resarray); $ra++) { $reserved_keys[] = $resarray[$ra]; } } } $content = array(); $content["text"] = ''; $content["html"] = ''; $content['csv'] = ''; if (count($array)) { if (is_array($sort)) { foreach ($sort as $field) { $reserved_violation = 0; for ($ri = 0; $ri < count($reserved_keys); $ri++) { if ($array[$field] == $reserved_keys[$ri]) { $reserved_violation = 1; } } if ($reserved_violation != 1) { if (is_array($array[$field])) { for ($z = 0; $z < count($array[$field]); $z++) { $content["text"] .= $field . SEPARATOR . str_replace("<br />", "\n", $array[$field][$z]) . NEWLINE; $content["html"] .= '<tr><td align="right" valign="top" style="border: 1px #E0E0E0 solid;">' . $field . '</td><td valign="top" style="border: 1px #E0E0E0 solid;">' . str_replace("\n", "<br>", $array[$field][$z]) . '</td></tr>'; $content['csv'] .= $array[$field][$z] . ','; } } else { $content["text"] .= $field . SEPARATOR . str_replace("<br />", "\n", $array[$field]) . NEWLINE; $content["html"] .= '<tr><td align="right" valign="top" style="border: 1px #E0E0E0 solid;">' . $field . '</td><td valign="top" style="border: 1px #E0E0E0 solid;">' . str_replace("\n", "<br>", $array[$field]) . '</td></tr>'; $content['csv'] .= $array[$field] . ','; } } } } foreach ($array as $key => $val) { $reserved_violation = 0; for ($ri = 0; $ri < count($reserved_keys); $ri++) { if ($key == $reserved_keys[$ri]) { $reserved_violation = 1; } } if (is_array($sort)) { for ($ri = 0; $ri < count($sort); $ri++) { if ($key == $sort[$ri]) { $reserved_violation = 1; } } } // prepare content if ($reserved_violation != 1) { if (is_array($val)) { for ($z = 0; $z < count($val); $z++) { if (strlen($val[$z]) > 0 || $print_blank_fields) { $content["text"] .= $key . SEPARATOR . str_replace("<br />", "\n", $val[$z]) . NEWLINE; $content["html"] .= '<tr><td align="right" valign="top" bgcolor="#ffffff" style="border: 1px #E0E0E0 solid;">' . $key . '</td><td valign="top" bgcolor="#ffffff" style="border: 1px #E0E0E0 solid;">' . str_replace("\n", "<br>", $val[$z]) . '</td></tr>'; } $content['csv'] .= $array[$field][$z] . ','; } } else { if (strlen($val) > 0) { $content["text"] .= $key . SEPARATOR . str_replace("<br />", "\n", $val) . NEWLINE; $content["html"] .= '<tr><td valign="top" align="right" bgcolor="#ffffff" style="border: 1px #E0E0E0 solid;">' . $key . '</td><td valign="top" bgcolor="#ffffff" style="border: 1px #E0E0E0 solid;">' . str_replace("\n", "<br>", $val) . '</td></tr>'; } $content['csv'] .= $val . ','; } } } } /* code to send customized email - note, the customized email file name must be * identical to the first part of the form filename, with the extension .tpl * example: form is named "form.php" * custom email is named "form.tpl" */ $adminEmailTpl = ''; if (getenv('HTTP_REFERER') != '' || isset($_POST['referer'])) { if (isset($_POST['referer'])) { $path_parts = pathinfo(trim($_POST["referer"])); } else { $path_parts = pathinfo(getenv('HTTP_REFERER')); } if (isset($_POST["admin_tpl"])) { $adminEmailTpl = $_POST["admin_tpl"]; } else { $filearr = explode('.', $path_parts["basename"]); if (count($filearr) > 1) { $adminEmailTpl = ''; $tplDir = ''; for ($i = 0; $i < count($filearr) - 1; $i++) { $adminEmailTpl .= $filearr[$i] . "."; $tplDir .= $filearr[$i]; } $adminEmailTpl .= 'tpl'; $tplDir .= '/'; } $adminEmailTpl = FEPATH . $tplDir . $adminEmailTpl; } } if (file_exists($adminEmailTpl)) { $adminEmailHTML = getContents('', $adminEmailTpl); $content["text"] = stripslashes(html_entity_decode(strip_tags($adminEmailHTML))); $content["html"] = $adminEmailHTML; } else { $content["html"] = '<table border="0" cellpadding="2" cellspacing="0" style="border: 1px #E0E0E0 solid;"><tr><th bgcolor="#ffffd2" style="border: 1px #E0E0E0 solid;">Form Field</th><th bgcolor="#ffffd2" style="border: 1px #E0E0E0 solid;">User Input</th></tr>' . $content["html"] . '</table>'; } $content['csv'] = substr($content['csv'], 0, -1); // END code to send customized email return $content; }
$data = $db->query_first($sql); return $data['value']; } // Get Content List function getCntList($db, $str = 'all') { $sql = "SELECT * FROM " . CONTENTS; if ($str != 'all') { $sql .= " WHERE `name` = '" . $str . "'"; } $data = $db->fetch_all_array($sql); return $data; } /// Get Contents Ajax if ($_POST['action'] == 'getCntDetails' && !empty($_POST['cnt'])) { echo getContents($db, $_POST['cnt']); } // Edit Contents if ($_GET['subaction'] == 'editcnt' && !empty($_POST['cnt_name']) && !empty($_POST['cnt_value']) && $_SESSION['UA_DETAILS']['level'] == 'admin') { $data['value'] = $_POST['cnt_value']; if ($db->query_update(CONTENTS, $data, " `name` = '" . $_POST['cnt_name'] . "'")) { $_SESSION['ERROR']['type'] = 'Done'; $_SESSION['ERROR']['reason'] = "Sucsessfully Edited Content."; } else { $_SESSION['ERROR']['type'] = 'Error'; $_SESSION['ERROR']['reason'] = "Operation Incomplete.Try Again Later."; } } // Update Profile Rating function updateProRating($db, $randid) {
<div id="content"> <div class="pqMain"> <?php include_once 'adminmenu.php'; ?> <div class="cntHolder"> <?php //////////////////////////////////////////////////////////////// /********************* Get Page ******************************/ if ($_GET['action'] == 'getpage' && !empty($_GET['page'])) { @(include_once $_GET['page'] . '.php'); } else { echo getContents($db, 'admin_panel'); } ?> </div> </div> </div> <!-- content End --> <!-- Footer Include --> <div id="footer"><?php include_once 'footer.php'; ?> </div> <!-- wrraper End -->
/** * getDistro * * @access private * @return array the distro,version or false */ private function getDistro() { // Time? if (!empty($this->settings['timer'])) { $t = new LinfoTimerStart('Determining Distrobution'); } // Seems the best way of doing it, as opposed to calling 'lsb_release -a', parsing /etc/issue, or // just checking if distro specific version files exist without actually parsing them: // - Allows multiple files of the same name for different distros/versions of distros, provided each // - uses different regular expression syntax. // - Also permits files that contain only the distro release version and nothing else, // - in which case passing false instead of a regex string snags the contents. // - And even also supports empty files, and just uses said file to identify the distro and ignore version // Store the distribution's files we check for, optional regex parsing string, and name of said distro here: $distros = array(array('/etc/lsb-release', '/^DISTRIB_ID=([^$]+)$\\n^DISTRIB_RELEASE=([^$]+)$\\n^DISTRIB_CODENAME=([^$]+)$\\n/m', false), array('/etc/redhat-release', '/^CentOS release ([\\d\\.]+) \\(([^)]+)\\)$/', 'CentOS'), array('/etc/redhat-release', '/^Red Hat.+release (\\S+) \\(([^)]+)\\)$/', 'RedHat'), array('/etc/fedora-release', '/^Fedora(?: Core)? release (\\d+) \\(([^)]+)\\)$/', 'Fedora'), array('/etc/gentoo-release', '([\\d\\.]+)$/', 'Gentoo'), array('/etc/SuSE-release', '/^VERSION = ([\\d\\.]+)$/m', 'openSUSE'), array('/etc/slackware-version', '/([\\d\\.]+)$/', 'Slackware'), array('/etc/arch-release', '', 'Arch'), array('/etc/mklinux-release', '', 'MkLinux'), array('/etc/tinysofa-release ', '', 'TinySofa'), array('/etc/turbolinux-release ', '', 'TurboLinux'), array('/etc/yellowdog-release ', '', 'YellowDog'), array('/etc/annvix-release ', '', 'Annvix'), array('/etc/arklinux-release ', '', 'Arklinux'), array('/etc/aurox-release ', '', 'AuroxLinux'), array('/etc/blackcat-release ', '', 'BlackCat'), array('/etc/cobalt-release ', '', 'Cobalt'), array('/etc/immunix-release ', '', 'Immunix'), array('/etc/lfs-release ', '', 'Linux-From-Scratch'), array('/etc/linuxppc-release ', '', 'Linux-PPC'), array('/etc/mklinux-release ', '', 'MkLinux'), array('/etc/nld-release ', '', 'NovellLinuxDesktop'), array('/etc/debian_version', false, 'Debian')); // Hunt foreach ($distros as $distro) { // File we're checking for exists and is readable if (file_exists($distro[0]) && is_readable($distro[0])) { // Get it $contents = $distro[1] !== '' ? getContents($distro[0], '') : ''; // Don't use regex, this is enough; say version is the file's contents if ($distro[1] === false) { return array('name' => $distro[2], 'version' => $contents == '' ? false : $contents); } elseif ($distro[1] === '') { return array('name' => $distro[2], 'version' => false); } elseif ($distro[2] === false && preg_match($distro[1], $contents, $m)) { return array('name' => $m[1], 'version' => $m[2] . (isset($m[3]) ? ' (' . $m[3] . ')' : '')); } elseif (preg_match($distro[1], $contents, $m)) { return array('name' => $distro[2], 'version' => $m[1] . (isset($m[2]) ? ' (' . $m[2] . ')' : '')); } } } // Return lack of result if we didn't find it return false; }
echo $gvComment_Pm; ?> ,'<?php echo $RPL[RP_MB_ID]; ?> ','<?php echo $RPL[RP_UID]; ?> ')</script> </td> </tr> <tr> <td colspan=2 style='padding:5px;'> <font color='#727272'><?php echo getContents($RPL[RP_CONTENT], $RPL[RP_HTML], $bbs[TextHLight]); ?> </font><p> <script>LayerUpfile(<?php echo $Enable_Down; ?> ,'<?php echo $gvUpfileStr; ?> ','<?php echo $table; ?> ',<?php echo $RPL[RP_UID]; ?> ,'rpl',3,'write')</script>
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; } foreach ($RCD as $C) { $C['mobile'] = isMobileConnect($C['agent']); if ($C['mbruid']) { $M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*'); $M1 = getUidData($table['s_mbrid'], $C['mbruid']); } $isSECRETCHECK = true; $compare_time = $C['d_modify'] ? $C['d_modify'] : $C['d_regis']; $JN_time = getJNTime($compare_time); // 지난시간 얻기 함수 호출 // 아바타 사진 url 세팅 if ($M['photo']) { $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo']; } else { $avatar_img = $g['url_root'] . '/_var/avatar/0.gif'; } echo ' <a name="one-write2-' . $C['uid'] . '"></a> <li id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '" class="list-group-item comment-list"> <div class="media" 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="media-left"> <a target="_blank" title="프로필 보기" data-toggle="tooltip" href="' . $g['s'] . '/profile/' . $M1['id'] . '" class="pull-left hidden-xs rb-avatar"> <img src="' . $avatar_img . '" class="media-object img-rounded" alt="48x48" data-src="holder.js/48x48" style="width: 48px; height: 48px;"> </a> </div> <div class="media-body"> <h5 class="media-heading"> <a class="a-muted" href="' . $g['s'] . '/profile/' . $M1['id'] . '">' . ($C[$_HS['nametype']] ? $C[$_HS['nametype']] : $C['name']) . '</a> <span class="text-muted small time-wrap"><time title="' . getDateFormat($compare_time, 'Y년 m월 d일 H시 i분') . '" data-toggle="tooltip" class="timeago live-tooltip">' . $JN_time . '</time></span> <span></span> <span class="pull-right top-tools">'; if ($my['admin'] || $C['mbruid'] == $my['uid']) { echo '<span class="text-muted"><a href="#" id="delete-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="삭제" ><i class="fa fa-trash-o"></i></a></span>'; echo '<span class="text-muted"><a href="#" id="edit-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="수정" ><i class="fa fa-edit"></i></a></span>'; } else { echo '<span class="text-muted"><a href="#" id="report-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="신고" ><i class="fa fa-frown-o"></i></a></span>'; } echo '</span> </h5> <hr class="cmt-hr">'; echo '<div class="panel-body nopd-left comment-content" id="comment-content-' . $C['uid'] . '" >'; if (!$C['hidden'] || $my['admin'] || $my['id'] && $my['id'] == $C['id'] || strstr($_SESSION['module_' . $m . '_view'], '[' . $C['uid'] . ']')) { echo getContents($C['content'], $C['html'], $keyword); } else { $isSECRETCHECK = false; echo '<i class="fa fa-lock-o"></i> <a href="' . $g['cment_modify'] . $C['uid'] . '" onclick="return cmentHidden(\'' . $C['id'] . '\',\'' . $C['uid'] . '\',event);">비공개 댓글입니다.</a>'; } echo '</div>'; echo '<div class="clearfix"> <div class="pull-left" style="margin-top:4px;"> <a class="small live-tooltip" href="#comments-' . $C['uid'] . '-reply" data-parent="#comments-' . $C['uid'] . '" data-toggle="collapse">답글 <span id="one-num-' . $C['uid'] . '">' . $C['oneline'] . '</span> <i class="fa fa-sort-desc"></i></a> <span class="thumb-wrap" style="margin-left:15px;"> <a class="live-tooltip cmt-tools" title="공감" data-toggle="tooltip" id="good-' . $C['uid'] . '"><i class="fa fa-thumbs-up fa-sm"></i> <span id="good-num-' . $C['uid'] . '">' . $C['score1'] . '</span></a> <a class="live-tooltip cmt-tools" title="비공감" data-toggle="tooltip" id="bad-' . $C['uid'] . '" style="margin-left:7px;"><i class="fa fa-thumbs-down fa-sm"></i> <span id="bad-num-' . $C['uid'] . '">' . $C['score2'] . '</span></a> </span> </div> <div class="pull-right"> <div class="clearfix cmt-modify-btn-wrap" style="display:none;margin:5px 0" id="btn-cmt-modify-wrap-' . $C['uid'] . '"> <button class="btn btn-default btn-sm cmt-modify-cancel" id="' . $C['uid'] . '" >취소</button> <button class="btn btn-primary btn-sm cmt-modify" id="' . $C['uid'] . '" >수정</button> </div> </div> </div> <!-- nested --> <div class="rb-comment-reply collapse" id="comments-' . $C['uid'] . '-reply"> <!-- 의견쓰기 --> <div class="media"> <div class="media-body"> <input type="hidden" name="parent" value="' . $C['uid'] . '" /> <input type="hidden" name="theme" value="' . $theme . '" /> <input type="hidden" name="ouid" value="" /> <fieldset> <p class="col-sm-11 nopd-left"> <textarea placeholder="답글을 입력하세요..." name="oneline" rows="1" class="form-control rb-commnet-reply"></textarea> </p> <div class="col-sm-1 nopd-left pull-right"> <div><button class="btn btn-primary btn-md one-regis" id="one-regis-' . $C['uid'] . '">등록</button> </div> </fieldset> </div> </div>'; echo '<div id="oneline-box-' . $C['uid'] . '" class="one-list-wrap">'; // 한줄 의견 리스트 출력함수 호출 getOnelineList($theme, $C['uid']); echo '</div>'; // 한 줄 의견 출력 박스 echo '</div> </div> </div> </li>'; $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>'; } }
</td> <td>유류항증료(예상)</td> <td><?php echo $add29[2]; ?> </td> </tr> </table> <!--작업자리 2222222222222222222222222--> <!-- <?php echo getContents($R['content'], $R['html']); ?> <?php if ($d['theme']['show_score1'] || $d['theme']['show_score2']) { ?> <div class="scorebox"> <?php if ($d['theme']['show_score1']) { ?> <a href="<?php echo $g['bbs_action']; ?> score&value=good&uid=<?php echo $R['uid']; ?>
for ($x = 0; $x < sizeof($wSetUpArry); $x++) { if (!trim($wSetUpArry[$x])) { continue; } $tmp_Size = @filesize("./data/" . $wSetUpArry[$x]); echo "<tr>"; echo "<td><a href='./data/" . $wSetUpArry[$x] . "'><img src='" . getFileIcon($wSetUpArry[$x]) . "' align=absmiddle> <font class=Blink>" . $wSetUpArry[$x] . "</font></a></td>"; echo "<td>(" . getSizeFormat($tmp_Size, 1) . ")</td>"; echo "</tr>"; } echo "</table></div><p>"; } ?> <?php echo getContents($CA[CA_CONTENT], $CA[CA_HTML]); ?> <p> </td> </tr> </table> <p> <?php $j++; } ?> <?php if (!$j) { ?> <font color=gray>등록된 일정이 없습니다.</font>
</form> <?php if (is_file($g['path_switch'] . $switchdir . '/readme.txt')) { ?> <br> <br> <div id="_guide_area_" class="collapse well<?php if ($_SESSION['sh_admin_switch2']) { ?> in<?php } ?> "> <small><?php echo getContents(nl2br(implode('', file($g['path_switch'] . $switchdir . '/readme.txt'))), 'HTML'); ?> </small> </div> <?php } ?> <?php } else { ?> <div class="page-header"> <h4><?php echo _LANG('a6022', 'admin'); ?>
</div> <!-- sidebar End --> <div id="content"> <div class="pqMain"> <div class="pqTitle"><a href="#">ProQuiz </a>V2</div> <div class="pqSubTitle">A Quiz Apart.</div> <!-- Error Display Box Start --> <?php include 'error.php'; ?> <!-- Error Box End --> <div class="cntHolder"> <div style="font-size: 1.2em;"> <?php echo getContents($db, 'index_contents'); ?> </div> </div> </div> </div> <!-- content End --> <!-- Footer Include --> <div id="footer"><?php include_once 'footer.php'; ?> </div> <!-- wrraper End --> </body> </html>
include './bbs/skin/' . $bbs[Skin] . '/lib/option_view.php'; } ?> <div id='ContentsLayer<?php echo $RCD[BB_UID]; ?> ' STYLE='padding:2pt;width:100%;' onclick="getFuncImg(event,'func_img<?php echo $RCD[BB_UID]; ?> ')"> <table align=right><tr><td><?php echo getCharacter($RCD[BB_MB_ID], $RCD[BB_ROOT], $bbs[view_char]); ?> </td></tr></table> <?php echo getContents($RCD[BB_CONTENT], $RCD[BB_HTML], $bbs[TextHLight]); ?> <?php echo Skin_LastUpdate($RCD[BB_DATE1]); ?> </div> <p> </td> </tr> </table> </span> <?php if (!$m) {
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; } 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; $compare_time = $C['d_modify'] ? $C['d_modify'] : $C['d_regis']; $JN_time = getJNTime($compare_time); // 지난시간 얻기 함수 호출 // 아바타 사진 url 세팅 if ($M['photo']) { $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo']; } else { $avatar_img = $g['url_root'] . '/_var/avatar/0.gif'; } echo ' <a name="one-write2-' . $C['uid'] . '"></a> <li id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '" class="list-group-item comment-list"> <div class="media" 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="media-left"> <a target="_blank" title="프로필 새창 열림" data-toggle="tooltip" href="#" class="pull-left hidden-xs rb-avatar"> <img src="' . $avatar_img . '" class="media-object img-rounded" alt="48x48" data-src="holder.js/48x48" style="width: 48px; height: 48px;"> </a> </div> <div class="media-body"> <h5 class="media-heading"> <a class="a-muted" data-toggle="popover" href="">' . ($C[$_HS['nametype']] ? $C[$_HS['nametype']] : $C['name']) . '</a> <span class="text-muted small time-wrap"><time title="' . getDateFormat($compare_time, 'Y년 m월 d일 H시 i분') . '" data-toggle="tooltip" class="timeago live-tooltip">' . $JN_time . '</time></span> <span></span> <span class="pull-right top-tools">'; if ($my['admin'] || $C['mbruid'] == $my['uid']) { echo '<span class="text-muted"><a href="#" id="delete-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="삭제" ><i class="fa fa-trash-o"></i></a></span>'; echo '<span class="text-muted"><a href="#" id="edit-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="수정" ><i class="fa fa-edit"></i></a></span>'; } else { echo '<span class="text-muted"><a href="#" id="report-' . $C['uid'] . '" class="live-tooltip cmt-tools" title="신고" ><i class="fa fa-frown-o"></i></a></span>'; } echo '</span> </h5>'; echo '<hr class="cmt-hr"> <div class="panel-body nopd-left comment-content" id="comment-content-' . $C['uid'] . '">'; if (!$C['hidden'] || $my['admin'] || $my['id'] && $my['id'] == $C['id'] || strstr($_SESSION['module_' . $m . '_view'], '[' . $C['uid'] . ']')) { echo autolink(getContents($C['content'], $C['html'], $keyword)); } else { $isSECRETCHECK = false; echo '<i class="fa fa-lock-o"></i> <a href="' . $g['cment_modify'] . $C['uid'] . '" onclick="return cmentHidden(\'' . $C['id'] . '\',\'' . $C['uid'] . '\',event);">비공개 댓글입니다.</a>'; } echo '</div>'; if ($C['is_link']) { $links_arr = explode('^^', $C['links']); $link_title = $links_arr[0]; $link_url = $links_arr[1]; $link_desc = $links_arr[2]; $link_thumb = $links_arr[3]; echo '<div class="rb-comment-links clearfix"> <div class="media"> <div class="media-left" id="extracted_thumb"><img src="' . $link_thumb . '" width="100" height="100"></div> <div class="media-body"> <h4 class="media-heading"><a href="' . $link_url . '" target="_blank">' . $link_title . '</a></h4> <p class="rb-description">' . $link_desc . '</p> </div> </div> </div>'; } // 링크 출력부 // 포토출력 if ($C['is_photo']) { $upArray = getArrayString($C['upload']); $_pque = '('; foreach ($upArray['data'] as $val) { $_pque .= 'uid=' . $val . ' or '; } $_pque = substr($_pque, 0, -4) . ')'; $_UCD = getDbArray($table['s_upload'], $_pque, '*', 'gid', 'asc', 10, 1); echo '<ul class="rb-img-wrapper list-inline">'; while ($_U = db_fetch_array($_UCD)) { $img = str_replace('.', '', $_U['url']) . $_U['folder'] . '/' . $_U['tmpname']; $img_src = '/_core/opensrc/thumb/thumb.php?width=100&cropratio=2:1.5&image=' . $img; $img_alt = $_U['caption'] ? $_U['caption'] : $_U['name']; echo '<li><a href="#"><img src="' . $img . '" class="img-responsive" alt="' . $img_alt . '" width="100px" height="100px" /></a></li>'; } echo '</ul>'; } // 포토 출력부 // 지도 출력 if ($C['is_place']) { $P = getDbData($table['s_place'], 'parent=' . $C['uid'], '*'); // Lat, Lng 은 숫자형으로 적용해야 한다. echo '<script> $(\'document\').ready(function(){ var Lat=' . $P['lat'] . ';var Lng=' . $P['lng'] . ';var name=\'' . $P['name'] . '\';var addr=\'' . $P['addr'] . '\';var map_id=\'cmap_' . $C['uid'] . '\'; PlaceToMap(Lat,Lng,name,addr,map_id); }); </script> <div id="cmap_' . $C['uid'] . '" style="height:200px;"></div>'; } // 지도 출력 echo '<div class="clearfix"> <div class="pull-left" style="margin-top:4px;"> <a class="small live-tooltip" href="#comments-' . $C['uid'] . '-reply" data-parent="#comments-' . $C['uid'] . '" data-toggle="collapse">답글 <span id="one-num-' . $C['uid'] . '">' . $C['oneline'] . '</span> <i class="fa fa-sort-desc"></i></a> <span class="thumb-wrap" style="margin-left:15px;"> <a class="live-tooltip cmt-tools" title="공감" data-toggle="tooltip" id="good-' . $C['uid'] . '"><i class="fa fa-thumbs-up fa-sm"></i> <span id="good-num-' . $C['uid'] . '">' . $C['score1'] . '</span></a> <a class="live-tooltip cmt-tools" title="비공감" data-toggle="tooltip" id="bad-' . $C['uid'] . '" style="margin-left:7px;"><i class="fa fa-thumbs-down fa-sm"></i> <span id="bad-num-' . $C['uid'] . '">' . $C['score2'] . '</span></a> </span> </div> <div class="pull-right"> <div class="clearfix cmt-modify-btn-wrap" style="display:none;margin:5px 0" id="btn-cmt-modify-wrap-' . $C['uid'] . '"> <button class="btn btn-default btn-sm cmt-modify-cancel" id="' . $C['uid'] . '" >취소</button> <button class="btn btn-primary btn-sm cmt-modify" id="' . $C['uid'] . '" >수정</button> </div> </div> </div> <!-- nested --> <div class="rb-comment-reply collapse" id="comments-' . $C['uid'] . '-reply"> <!-- 의견쓰기 --> <div class="media"> <div class="media-left" style="width:90%;"> <input type="hidden" name="parent" value="' . $C['uid'] . '" /> <input type="hidden" name="theme" value="' . $theme . '" /> <input type="hidden" name="ouid" value="" /> <textarea placeholder="답글을 입력하세요..." name="oneline" rows="1" class="form-control rb-commnet-reply"></textarea> </div> <div class="media-body"> <button class="btn btn-primary btn-md one-regis" id="one-regis-' . $C['uid'] . '">등록</button> </div> </div>'; echo '<div id="oneline-box-' . $C['uid'] . '" class="one-list-wrap">'; // 한줄 의견 리스트 출력함수 호출 getOnelineList($theme, $C['uid']); echo '</div>'; // 한 줄 의견 출력 박스 echo '</div> </div> </div> </li>'; $i++; } //endforeach // 더보기 버튼 설정시 if ($NUM && $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>'; } // if(!$NUM){ // echo '<div class="rb-timeline"> // <div class="rb-nopost"> // <i class="fa fa-exclamation-circle"></i> // 등록된 소식이 없습니다. // </div> // </div>'; // } }