function generateFiles($sufffix) { for ($i = 0; $i < 300; $i++) { $content = getContent($i . $sufffix); file_put_contents(dirname(__FILE__) . '/temp/MyClass' . $i . $sufffix . '.class.php', '<?php ' . $content . ' ?>'); } }
function sendServiceMail($weChartPost) { //******************** 配置信息 ******************************** $smtpserver = constant('SMTP_SERVER'); //SMTP服务器 $smtpserverport = constant('SMTP_SERVER_PORT'); //SMTP服务器端口 $smtpusermail = constant('SMTP_USER_MAIL'); //SMTP服务器的用户邮箱 $smtpemailto = constant('SERVICE_MAIL'); //发送给谁 $smtpuser = constant('SMTP_USER'); //SMTP服务器的用户帐号 $smtppass = constant('SMTP_PASS'); //SMTP服务器的用户密码 $mailtitle = '我在照相馆预约信息'; //邮件主题 //$mailcontent = json_encode($weChartPost);//邮件内容 $mailcontent = getContent($weChartPost); $mailtype = constant('MAIL_TYPE'); //邮件格式(HTML/TXT),TXT为文本邮件 //************************ 配置信息 **************************** $smtp = new smtp($smtpserver, $smtpserverport, true, $smtpuser, $smtppass); //这里面的一个true是表示使用身份验证,否则不使用身份验证. $smtp->debug = false; //是否显示发送的调试信息 $state = $smtp->sendmail($smtpemailto, $smtpusermail, $mailtitle, $mailcontent, $mailtype); if ($state == "") { return $state; } return "OK"; }
function showTemplate() { ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta name="robots" content="noindex,nofollow" /> <meta name="author" content="Aron Heinecke" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="Stylesheet" media="all" type="text/css" href="css/bootstrap.min.css"> <link rel="Stylesheet" media="all" type="text/css" href="css/default.css"> <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script> <link rel="icon" href="data:;base64,="> <title>YAYD Frontend demonstration</title> <?php if (function_exists('getHead')) { // include mod exclusive head content if function exists getHead(); } ?> </head> <body> <!--site--> <?php echo getContent(); ?> <!--/site--> <script src="js/bootstrap.min.js" type="text/javascript"></script> </body> </html> <?php }
function smarty_function_get_url($params, &$smarty) { // Default options $opts = array( 'default' => 'Not found', 'fix' => 'src|href|action' ); $opts = array_merge($opts, $params); // Make sure they passed a source url if (isset($opts['url'])) { $opts['url'] = $opts['url']; } else { die($opts['default']); } $sParam = ''; if (isset($opts['param'])) $sParam = $opts['param']; // Retrieve the remote file $content = @getContent($opts, $sParam); // Make sure we actually got something // if (!$content) die($opts['default']); if (!$content); // Output the contents to the template return $content; }
function _moduleContent(&$smarty, $module_name) { require_once "modules/{$module_name}/libs/contentFreePBX.php"; $smarty->assign("title", _tr("PBX Configuration")); $smarty->assign("icon", "/modules/{$module_name}/images/pbx_configuration.png"); $salida = getContent($smarty, $module_name, true); return $salida; }
function getSomething($selector) { $content = getContent(); $features = $content->find($selector); echo '<hr>'; foreach ($features as $feature) { echo $feature->plaintext . '<p>'; } }
public function renderSidebar() { if (!$this->shouldRender()) { return; } startbox(); echo getContent('sbWiki.' . $this->getCurrentPage()); stopbox(); }
function getEvent($meeting, $u_ID, $level) { $query = mysql_query("select distinct content.e_ID, event.content from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.meeting = '{$meeting}' order by content.e_ID asc"); while ($ans = mysql_fetch_array($query)) { if ($level > 2) { getContent($ans['e_ID'], $u_ID); } } }
function parseInfo($post, $ignoreQuotes = true, $deadline) { $info = array(); $info['time'] = extractDate($post[0]->childNodes->item(6)->textContent); $info['daynum'] = getGameDay($post[0]->childNodes->item(6)->textContent, $deadline); $info['poster'] = $post[0]->childNodes->item(4)->textContent; $info['content'] = getContent($post[1], $ignoreQuotes); return $info; }
function getColor($id, $field, $im) { $data = getContent($id, $field); if (!$data) { die("ERROR: Could not retrieve team color for title id {$id} field {$field}."); } $rgb = explode(",", $data); $color = imagecolorallocate($im, $rgb[0], $rgb[1], $rgb[2]); return $color; }
function deleteMassage() { /* Функция удаления коментария */ if (isset($_POST['remove'])) { $massage = array_reverse(getContent()); $id = $_POST['remove']; unset($massage[$id]); $massageDB = serialize($massage); file_put_contents("1massage.db", $massageDB); } }
function upperCaseAuthors($xml) { do { $aut = getContent('author', $xml); if (strlen($aut) > 0) { $names = explode(',', $aut); $upperCaseAuthorsXML = '<AUTHOR key="' . $aut . '" SEARCH="' . str_replace(',', ',+', strtoupper(removeAccent(str_replace(' ', '+', $aut)))) . '"><NAME>' . $names[1] . '</NAME><SURNAME>' . $names[0] . '</SURNAME><UPP_NAME>' . strtoupper($names[1]) . '</UPP_NAME><UPP_SURNAME>' . strtoupper($names[0]) . '</UPP_SURNAME></AUTHOR>'; $xml = str_replace('<author>' . $aut . '</author>', $upperCaseAuthorsXML, $xml); } } while (strlen($aut) > 0); return $xml; }
function getEvent($meeting, $u_ID, $level) { $query = mysql_query("select distinct content.e_ID, event.content from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.meeting = '{$meeting}' order by content.e_ID asc"); while ($ans = mysql_fetch_array($query)) { $result = getEventCompletion($ans['e_ID']); echo "<div class='col-lg-12 lv-event'>"; echo "<div class='panel panel-success' style='margin-top:10px;'>"; echo "<div class='panel-heading' style='font-size:2em'>议题: " . $ans['content'] . "<span class='pull-right' style='font-size:0.5em; padding-top:10px;'>实际完成率:{$result['0']}%; 参考完成率: {$result['1']}%;</span></div>"; echo "<div class='panel-body'>"; getContent($ans['e_ID'], $u_ID); echo "</div></div></div>"; } }
function getEvent($meeting, $u_ID, $level) { $query = mysql_query("select distinct content.e_ID, event.content from content, event, content_user, meeting where content_user.u_ID = '{$u_ID}' and content_user.c_ID = content.c_ID and content.e_ID = event.e_ID and event.m_ID = meeting.m_ID and meeting.meeting = '{$meeting}' order by content.e_ID asc"); while ($ans = mysql_fetch_array($query)) { echo "<div style='border:1px solid #000;padding:5px 15px;margin-top:5px'>"; echo "<h4>议题:</h4> "; echo $ans['content']; if ($level > 2) { getContent($ans['e_ID'], $u_ID); } echo "</div>"; } }
function processAction() { $action = assign_input('action', 'R'); $folderID = assign_input('folderID', 'R'); $noteID = assign_input('noteID', 'R'); $parentFolder = assign_input('parentFolder', 'R'); $date = assign_input('date', 'R'); $name = assign_input('name', 'R'); $note = assign_input('note', 'P', 1); $sortByDate = assign_input('sortByDate', 'R'); switch ($action) { case 'newFolder': $res = newFolder($name, $parentFolder); break; case 'newNote': $res = newNote($name, $note, $parentFolder); break; case 'toNewFolder': $res = addToNewFolder($parentFolder, $noteID); break; case 'delete': $res = delete_($noteID ? $noteID : $folderID, $folderID); break; case 'rename': $res = rename_($name, $noteID ? $noteID : $folderID, $folderID); break; case 'save': $res = save($noteID, $note); break; case 'get': $res = getContent($parentFolder, $sortByDate ? 1 : 0); break; case 'loadNote': $res = loadNote($noteID); break; case 'search': break; default: $res = array("error" => "no action"); } /* if(( isset($res['error']))&&($res['error'])){echo 'Error occured : '.$res['error'].'<br/>';} if($action=='get'){ echo json_encode($res); } */ echo json_encode($res); }
/** * Function takes data form csv file, proccesses it, creates and modifies array - prepares * data for futher writing to files by product, returns modified array */ function createArray() { //$array = array_diff($array, array('')); //разбили данные на массив -> один продукт - одна строка $raw_data_1 = explode("\n", getContent()); //создаем массив и записываем каждый товар в подмассив $raw_data_2 = []; foreach ($raw_data_1 as $value) { $value = explode(";", $value); $value = array_push($raw_data_2, $value); } // var_dump($raw_data_2); // echo "<br><br>"; return $raw_data_2; }
public function index() { // session(null); //检查登录情况 if (checkLogin()) { $this->assign('log', true); $this->assign('username', session('name')); } else { $this->assign('log', false); } //从文本获取首页内容 $arr = getContent(); $this->assign('arr', $arr); //显示首页 // dump($arr); $this->display('index'); }
function parseContenDetail($url, $data, &$x) { global $logger, $filename, $conf; $content = getContent($url); if ($content != "") { $row_data = array(); foreach ($data as $key => $value) { $row_data[] = StringHelper::handleStrNewline(parseTag($value, $content)); } $row_data[] = $url; if (trim($row_data[0]) || trim($row_data[1]) || trim($row_data[2])) { File_CSV::write($filename, $row_data, $conf); echo "{$x} [Ok].\n"; $logger->log("Get {$url} content.[Ok]"); } else { echo "{$x} [Fail].\n"; $logger->log("Get {$url} content.[Fail]"); } $x++; } }
/** * @todo: 新增评论 * @author Saki <*****@*****.**> * @date 2014-12-26 下午5:45:28 * @version V1.0 */ public function createComment($post) { $isadd = 0; $model = D('Admin/ArticleComment'); if ($post['content'] != '') { $data = $post; $data['content'] = getContent($data['content']); $data['name'] = htmlspecialchars($post['name']); $data['ctm'] = date('Y-m-d H:i:s', time()); try { $isadd = $model->data($data)->add($data); if ($isadd) { //评论数+1 $article_list_model = new \Admin\Model\ArticleListModel(); $article_list_model->addComment($post['aid']); } } catch (Exception $e) { } } return $isadd; }
<head> <meta charset="UTF-8"> <title><?php echo getTitle(); ?> </title> <link rel="stylesheet" href="templates/template.php"> <link href="css/night.css" rel="stylesheet" type="text/css"> </head> <body> <div class="wraper"> <header> <section> <nav> <?php echo getMenu(); ?> </nav> </header> <article> <?php echo getContent(); ?> </article> </section> <footer> @ Remco de Zwart 2016 </footer> </div> </body> </html>
function getContent($page, $params, $cnt, $tag_counts) { $photo_cnt = $cnt; if ($page > 0) { $params['page'] = $page; } $encoded_params = array(); foreach ($params as $k => $v) { $encoded_params[] = urlencode($k) . '=' . urlencode($v); } $url = "http://api.flickr.com/services/rest/?" . implode('&', $encoded_params); $rsp = file_get_contents($url); $rsp_obj = unserialize($rsp); if ($rsp_obj['stat'] == 'ok') { $rows_p = array(); $rows_u = array(); $photo_rows = array(); foreach ($rsp_obj['photos']['photo'] as $photo) { $photo_rows[] = $photo; $photo_cnt++; $tags = explode(' ', trim($photo['tags'])); foreach ($tags as $t) { if ($t != '') { $row_u[] = array('tag' => $t, 'user' => $photo['owner']); $row_p[] = array('tag' => $t, 'photo' => $photo['id']); foreach ($tags as $t2) { if ($t != $t2) { $label = "{$t}<>{$t2}"; $entry = false; if (isset($tag_counts[$label])) { $entry = $tag_counts[$label]; } else { if (isset($tag_counts["{$t2}<>{$t}"])) { $label = "{$t2}<>{$t}"; $entry = $tag_counts[$label]; } } if (!$entry) { $entry = array("tag1" => $t, "tag2" => $t2, "count" => 1); } else { $entry['count']++; } $tag_counts[$label] = $entry; } } } } } scraperwiki::save_sqlite(array('id'), $photo_rows, $table_name = "photos"); scraperwiki::save_sqlite(array(), $row_u, $table_name = "tag_user"); scraperwiki::save_sqlite(array(), $row_p, $table_name = "tag_photo"); if ($page < $rsp_obj['photos']['pages']) { getContent($page + 1, $params, $photo_cnt, $tag_counts); } else { scraperwiki::save_sqlite(array('tag1', 'tag2'), array_values($tag_counts), $table_name = "tag_tag"); print "photos: {$photo_cnt}\n"; } } else { echo "Call failed: {$page}!"; } }
} // adaption to new google layout //if ($num==2)var_dump($ar); //if ($num==3)var_dump($ar); if (isset($ar['div'][1])) { $ar['div'] =& $ar['div'][0]; } if (isset($ar['div'][1])) { $ar['div'] =& $ar['div'][0]; } //$ar=&$ar['div']['span']; // Google removed the span $ar =& $ar['div']; // adaption finished $divs = $list->getElementsByTagName('div'); $div = $divs->item(1); getContent($cont, $div); $num++; $result['title'] =& $ar['h3']['a']['textContent']; $tmp = strstr(&$ar['h3']['a']['@attributes']['href'], "http"); $result['url'] = $tmp; if (strstr(&$ar['h3']['a']['@attributes']['href'], "interstitial")) { echo "!"; } $tmp = parse_url(&$result['url']); $result['host'] =& $tmp['host']; if (strstr($cont, "<b >...</b><br >")) { $result['desc'] = substr($cont, 0, strpos($cont, "<b >...</b><br >")); } else { if (strstr($cont, "<cite")) { $result['desc'] = substr($cont, 0, strpos($cont, "<span class='f'><cite")); } else {
public function parseTopic($_G, $postlist, $forumclass, $uid, $temp) { foreach ($postlist as $pid => $post) { //print_r($postlist);exit; if (!empty($post['tid'])) { $topicRemote = DB::fetch(DB::query("SELECT remote FROM " . DB::table('forum_threadimage') . " where tid=" . $post['tid'])); //print_r($topicRemote);exit; } $uids[] = $post['authorid']; preg_match_all("/\\[attach\\](\\d+)\\[\\/attach\\]/i", $postlist[$pid]['message'], $matches); $aids = $matches['1']; $matches = array_filter($matches); foreach (C::t('forum_attachment_n')->fetch_all_by_id('tid:' . $post['tid'], 'pid', $post['pid']) as $attach) { $Allaids[] = $attach['aid']; } if (count($aids) !== count($Allaids)) { $tableid = getattachtableid($post['tid']); $attachmentAid = C::t('forum_attachment')->fetch_all_by_id('pid', $post['pid']); foreach ($attachmentAid as $key => $val) { if (in_array($key, $aids)) { continue; } $path = DB::fetch_first("SELECT * FROM %t WHERE %i AND isimage IN ('1', '-1') ", array('forum_attachment_' . $tableid, DB::field('aid', $val['aid']))); if (!empty($path)) { $filename = $this->parseTargeImage($path); $imgs[] = '<img src="' . $filename . '" />'; $attachmentId = $key; $attachmentAId[] = $path['aid']; $postlist[$pid]['message'] = $postlist[$pid]['message'] . '[attach]' . $key . '[/attach]'; $pattern[] = "#\\[attach\\]" . $key . "\\[\\/attach\\]#i"; } } } if (!empty($matches) && is_array($matches)) { foreach ($matches[1] as $k => $v) { $dataImg['attachment'] = $post['attachments'][$v]['attachment']; $dataImg['dateline'] = $post['dateline']; $dataImg['remote'] = $post['attachments'][$v]['remote']; $filename = $this->parseTargeImage($dataImg); $imgs[] = '<img src="' . $filename . '" />'; $attachmentId = $v; } } foreach ($matches[1] as $k => $v) { $pattern[] = "#\\[attach\\]" . $v . "\\[\\/attach\\]#i"; } $message_string = preg_replace($pattern, $imgs, $postlist[$pid]['message']); if ($message_string) { $postlist[$pid]['message'] = $message_string; } $tempPostlist = $forumclass->viewthread_procpost($postlist[$pid], $_G['member']['lastvisit'], 2, 2); /*$ti1=Common::get_web_unicode_charset('\u6e38\u5ba2'); $tempPostlist[message]=str_replace($ti1,'',$tempPostlist[message]); echo ($tempPostlist[message]);exit;*/ $topicContent = text_replace($tempPostlist['message']); $topicContent = discuzcode($topicContent, $post['smileyoff'], $post['bbcodeoff']); $topicContent = str_replace('<img src="static/', '<img src="/static/', $topicContent); $postlist[$pid]['message'] = text_replace($topicContent); $postlist[$pid]['message'] = preg_replace("/\\<font class=\"jammer\">.+\\<\\/font>/i", '', $postlist[$pid]['message']); $postlist[$pid]['message'] = preg_replace("/\\<span style=\"display:none\">.+\\<\\/span>/i", '', $postlist[$pid]['message']); $img_url = $post['attachments'][$attachmentId]['url']; $font[$pid]['quote_content'] = getContent($post['quotemessage']); $font[$pid]['quote_content'] = preg_replace("/\\[attach\\]\\d+\\[\\/attach\\]/i", '', $font[$pid]['quote_content']); $tempPostlist_quote_content = $forumclass->viewthread_procpost($post, $_G['member']['lastvisit'], 2, 2); $topicContent_quote_content = text_replace($tempPostlist_quote_content['quotemessage']); $topicContent_quote_content = discuzcode($topicContent_quote_content, $post['smileyoff'], $post['bbcodeoff']); $topicContent_quote_content = str_replace('<img src="static/', '<img src="/static/', $topicContent_quote_content); $font[$pid]['quote_content'] = text_replace($topicContent_quote_content); } $uids = array_unique($uids); empty($uid) ? 0 : $uid; $uidsql = ' AND ' . DB::field('uid', $uid); $fav = DB::fetch_first("SELECT * FROM %t WHERE id=%d AND idtype=%s {$uidsql}", array('home_favorite', $_G['tid'], 'tid')); if ($fav) { $is_favor = 1; } else { $is_favor = 0; } $profile = new memberProfile(); $profile_list = $profile->get_profile_by_uid($uids, 'gender'); foreach ($profile_list as $k => $v) { $data_profile[$v['uid']]['gender'] = $v['gender']; $data_profile[$v['uid']]['level'] = (int) $v['stars']; } $member = commonMember::getUserStatus($uids); $special = get_special_by_tid($_G['tid']); if ($special == 2) { $i = 0; foreach ($postlist as $key => $val) { if ($i == 1) { $key1 = $key; } $i++; } } unset($postlist[$key1]); $_user = Anonymous_User($_G['tid']); $content = $this->parseTradeTopic($_G, $post); foreach ($postlist as $key => $val) { $post = $tags = array(); $thread = C::t('forum_thread')->fetch($val['tid']); $post['gender'] = $data_profile[$val['authorid']]['gender']; $post['level'] = $data_profile[$val['authorid']]['level']; $tags = explode(',', $val['tags']); global $_G; preg_match_all("/\\[(\\d+)\\]+/i", $val['message'], $smailyArr); $thisUrl = dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']) . '/../../'; foreach ($smailyArr[1] as $key => $Sval) { /*rx 20131016 tie zi xiang qing biao qing chu li*/ $smArr = DB::fetch(DB::query("SELECT * FROM " . DB::table('common_smiley') . " where id=" . $Sval)); $smTypeArr = DB::fetch(DB::query("SELECT directory FROM " . DB::table('forum_imagetype') . " where typeid=" . $smArr['typeid'])); $smUrl = $thisUrl . 'static/image/' . $smArr['type'] . '/' . $smTypeArr['directory'] . '/' . $smArr['url']; $smile .= "[mobcent_phiz=" . $smUrl . "]"; /*end rx 20131016*/ $_G['cache']['smilies']['searcharray'][$Sval] = str_replace('/', "", $_G['cache']['smilies']['searcharray'][$Sval]); $val['message'] = str_replace($smailyArr[0][$key], $smile, $val['message']); unset($smile); } if ($tags[0] > 0 || $val['position'] == 1) { $message1 = doContent($val['message'], $val[imagelist]); $message2 = getContentFont($val['message']); foreach ($message1 as $k => $v) { if ($v['type'] == 0) { unset($message1[$k]); } else { } } $message_array2 = explode('|~|', $message2); $message2 = str_replace('[', '1', $message2); $message2 = str_replace(']', '1', $message2); if (is_array($message_array2) && count($message_array2) > 0) { foreach ($message_array2 as $k => $v) { $message[] = array("infor" => $v, "originalInfo" => '', "type" => 0); if ($message1[$k]["infor"] && !empty($message1)) { $message[] = $message1[$k]; } } } else { $message = getContentFont($val['message']); } $post['hits'] = (int) $thread['views']; $post['replies'] = (int) $thread['replies']; $post['essence'] = (int) $thread['digest'] > 0 || (int) $thread['icon'] == 9 || (int) $thread['stamp'] == 0 ? 1 : 0; $post['content'] = $message; $post['create_date'] = $val['dateline'] . "000"; $post['icon'] = userIconImg($val['authorid']); $post['is_favor'] = (int) $is_favor; if ($val['invisible'] == -5 || $val['invisible'] == -1) { $post['status'] = (int) 0; $arr['rs'] = 0; $arr['errcode'] = '01040007'; return $arr; exit; } else { if ($thread['closed'] == 1) { $post['status'] = 2; } else { $post['status'] = 1; } } $post['title'] = $val['subject']; $post['topic_id'] = (int) $val['tid']; $post['user_id'] = (int) $val['authorid']; if (empty($val['author']) && isset($val['authorid']) && !empty($val['authorid'])) { $post['reply_status'] = (int) '-1 '; $post['user_nick_name'] = Common::get_unicode_charset('\\u8be5\\u7528\\u6237\\u5df2\\u88ab\\u5220\\u9664'); } else { if (empty($val['author']) && empty($val['authorid'])) { $post['reply_status'] = (int) '0 '; $post['user_nick_name'] = Common::get_unicode_charset('\\u533f\\u540d\\u7528\\u6237'); } else { $post['reply_status'] = (int) '1 '; $post['user_nick_name'] = $val['author']; } } $post['reply_posts_id'] = (int) $val['pid']; $info = surround_user::fetch_all_by_pid($val['tid']); if (empty($info)) { $post['location'] = ''; } else { $post['location'] = $info['location']; } $data_post["topic"] = $post; } else { $message1 = doContent($val['message'], $val[imagelist]); $message2 = getContentFont($val['message']); foreach ($message1 as $k => $v) { if ($v['type'] == 0) { unset($message1[$k]); } else { } } $message_array2 = explode('|~|', $message2); $message2 = str_replace('[', '1', $message2); $message2 = str_replace(']', '1', $message2); if (is_array($message_array2) && count($message_array2) > 0) { foreach ($message_array2 as $k => $v) { $message[] = array("infor" => $v, "originalInfo" => '', "type" => 0); if ($message1[$k]["infor"] && !empty($message1)) { $message[] = $message1[$k]; } } } else { $message = getContentFont($val['message']); } $post['location'] = ""; $post['icon'] = userIconImg($val['authorid']); $post['posts_date'] = $val['dateline'] . "000"; $post['reply_content'] = $message; $post['reply_id'] = (int) $val['authorid']; if (empty($val['author']) && isset($val['authorid']) && !empty($val['authorid'])) { $post['reply_status'] = (int) '-1 '; $post['reply_name'] = Common::get_unicode_charset('\\u8be5\\u7528\\u6237\\u5df2\\u88ab\\u5220\\u9664'); } else { if (empty($val['author']) && empty($val['authorid'])) { $post['reply_status'] = (int) '0 '; $post['reply_name'] = Common::get_unicode_charset('\\u533f\\u540d\\u7528\\u6237'); } else { $post['reply_status'] = (int) '1 '; $post['reply_name'] = $val['author']; } } $post['reply_posts_id'] = (int) $val['pid']; if ($val['invisible'] == -5) { $post['status'] = (int) 0; } else { if ($thread['closed'] == 1) { $post['status'] = 2; } else { $post['status'] = 1; } } $post['title'] = preg_replace("#(\\w*)\\<.*?\\>(\\w*)#", "\$1\$2", $val['subject']); $post['role_num'] = $val['groupid']; $post['is_quote'] = (bool) $val['is_quote']; $post['quote_pid'] = $val['quote_pid']; if ((bool) $val['is_quote'] != false) { $post["quote_content"] = preg_replace("/\\[attach\\]\\d+\\[\\/attach\\]/i", '', preg_replace("#(\\w*)\\<.*?\\>(\\w*)#", "\$1\$2", $font[$post['reply_posts_id']]['quote_content'])); } else { $post["quote_content"] = ''; } $post["quote_user_name"] = null; $post['position'] = $val['position']; $info = surround_user::fetch_all_by_pid($val['tid']); if (empty($info)) { $post['location'] = ''; } else { $post['location'] = $info['location']; } $data_post['list'][] = $post; unset($quote); unset($pid); $temp++; } unset($post); unset($message); } return $data_post; }
<div style="position:absolute;height:25px;width:640px;background-color:#FF7722;opacity:.3;left:0px;top:0px;"></div> <div style="position:absolute;height:25px;width:640px;background-color:#FF7722;opacity:.3;left:0px;bottom:0px;"></div> <img style="position:absolute;bottom:0px;<?php if ($row["h"] < 455) { ?> margin-bottom:25px<?php } ?> " width="640" src="render_title.php?id=<?php echo $row["id"]; ?> " /> <?php foreach ($commands as $c) { if ($c["command"] == "text") { $content = getContent($id, $c["content"]); $font = getFontFamily($c["font"]); if ($c["align"] == "r") { $align = "right"; $dist = 640 - $c["points"][0]; } else { $align = "left"; $dist = $c["points"][0]; } echo "<div class=\"floater\" style=\"{$align}:" . $dist . "px;top:" . ($c["points"][1] - $c["size"]) . "px;height:" . ($c["size"] - $c["size"] / 4) . "pt;width:" . $c["max"] . "px\">\n"; echo "\t<input class=\"input\" type=\"text\" name=\"" . $c["content"] . "\"style=\"font-family:{$font};"; echo "font-size:" . $c["size"] . "pt;text-align:{$align};margin-top:-" . $c["size"] / 3 . "px;width:" . $c["max"] . "px\" value=\"{$content}\"/>\n</div>\n"; } } ?> <input type="hidden" name="id" value="<?php
<?php require_once '../configuration.php'; // start the session $session = getSession(); // get smarty handle $smarty = getSmartyHandle(); // set ad for template $tracker = new AdTracking(); $smarty->assign('ad', $tracker->getAdsForTemplate()); // set other content areas for template $smarty->assign('content', getContent($session->product, 'landing')); // set error flag for templates $smarty->assign('error', $error); // determine version and mobile suffix for different templates $version = $session->product ? $session->product : 'instantinternet'; $mobile = $session->mobile ? '_iphone' : ''; $smarty->display('landingpage_' . $version . $mobile . '.tpl');
include_once "msgs.lib"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="linkCes"> <a href="Cens.php">Администрирование сайта</a></div><br> <div class="inputMessage"> <form method="post" action="index.php"> <h2>Введите свое имя</h2> <input class="textarea" type = "text" name = "userName"> <h3>Оставьте свой коментарий</h3> <textarea class="textarea" name="userMessage" rows="7" cols="75" placeholder="Введите сообщение"></textarea> <br><br> <input type="submit" name="submit" value="Отправить"><br><br> </form> </div> <div class="chat"> <?php $messages = getContent(); $messages = addContent($messages); $messages = censContent($messages); showContent($messages); ?> </div> </body> </html>
} // end if('issue_')... else... } // end if('include_')... else... } // end $ar loop if ($printable) { echo "<br /><br />" . xl('Signature') . ": _______________________________<br />"; } ?> </div> <!-- end of report_custom DIV --> <?php if ($PDF_OUTPUT) { $content = getContent(); // $pdf->setDefaultFont('Arial'); $pdf->writeHTML($content, false); if ($PDF_OUTPUT == 1) { $pdf->Output('report.pdf', $GLOBALS['pdf_output']); // D = Download, I = Inline } else { // This is the case of writing the PDF as a message to the CMS portal. $ptdata = getPatientData($pid, 'cmsportal_login'); $contents = $pdf->Output('', true); echo "<html><head>\n"; echo "<link rel='stylesheet' href='{$css_header}' type='text/css'>\n"; echo "</head><body class='body_top'>\n"; $result = cms_portal_call(array('action' => 'putmessage', 'user' => $ptdata['cmsportal_login'], 'title' => xl('Your Clinical Report'), 'message' => xl('Please see the attached PDF.'), 'filename' => 'report.pdf', 'mimetype' => 'application/pdf', 'contents' => base64_encode($contents))); if ($result['errmsg']) { die(text($result['errmsg']));
/** * function actionView: * @returns HTML View of the Book according to the properties set */ public function actionView() { global $INFOSTRING, $WARNINGSTRING, $ERRORSTRING; $childrenQuery = 'SELECT `page_title`, `page_id`, `page_module`, `page_modulecomponentid`, `page_name` FROM `' . MYSQL_DATABASE_PREFIX . 'pages` WHERE `page_parentid` = ' . $this->pageId . ' AND `page_id` IN (' . $this->bookProps['list'] . ') ORDER BY `page_menurank`'; $result = mysql_query($childrenQuery); $ret = $this->tabScript(); $ret .= <<<RET <h2>{$this->bookProps['page_title']}</h2> <div class='tabEnvelope'> RET; $navigate = $this->bookProps['initial']; if (isset($_GET['navigate']) && $this->isPresent($this->pageId, $_GET['navigate'])) { $navigate = escape($_GET['navigate']); } $tabList = "<div id='tabList'>"; $contentList = ""; $backup_info = $INFOSTRING; $backup_warning = $WARNINGSTRING; $backup_error = $ERRORSTRING; while ($row = mysql_fetch_assoc($result)) { if (getPermissions($this->userId, $row['page_id'], "view")) { $INFOSTRING = ""; $WARNINGSTRING = ""; $ERRORSTRING = ""; $moduleType = $row['page_module']; $active = ""; if ($navigate == $row['page_id'] || getPageModule($row['page_id']) == 'book' && $this->isPresent($row['page_id'], $navigate)) { $active = ' active'; } $tabList .= "<div class='tabElement'><a id='Content{$this->pageId}_{$row['page_id']}' href='./+view&navigate={$row['page_id']}'><span class='tabItem' id='cms-tabItem'>{$row['page_title']}</span></a></div>"; $content = getContent($row['page_id'], "view", $this->userId, true); $content = preg_replace('/<a(.*)href=[\'"](.\\/)+(.*)[\'"](.*)>(.*)<\\/a>/i', '<a$1href="./' . $row['page_name'] . '/$3"$4>$5</a>', $content); $content = preg_replace('/<form(.*)action=[\'"](.\\/)+(.*)[\'"](.*)>/i', '<form$1action="./' . $row['page_name'] . '/$3"$4>', $content); $content = preg_replace('/<img(.*)src=[\'"](.\\/)+(.*)[\'"](.*)>/i', '<img$1src="./' . $row['page_name'] . '/$3"$4>', $content); $contentList .= "<div class='tabContent{$active}' id='tabContent{$this->pageId}_{$row['page_id']}'>" . $INFOSTRING . $WARNINGSTRING . $ERRORSTRING . $content . "</div>"; } } if ($tabList == "") { displaywarning("No child pages are selected to display in this book.<br/> To change book settings click <a href='./+edit'>here</a> and to create child pages for this book, click <a href='./+settings#childpageform'>here</a>."); } $tabList .= "</div>"; $ret .= $tabList . $contentList . "</div>"; $INFOSTRING = $backup_info; $WARNINGSTRING = $backup_warning; $ERRORSTRING = $backup_error; return $ret; }
addNodeAsChild($localhost, $user, $pw, $db, $storyID); } else { if ($functionName == "addBranchAsChild") { addBranchAsChild($localhost, $user, $pw, $db, $storyID); } else { if ($functionName == "checkIFParent") { $x = filter_input(INPUT_GET, 'IDs'); //vl unique machn $movingIDs = explode(",", $x); $ID01 = $movingIDs[0]; $ID02 = filter_input(INPUT_GET, 'ID'); $found = checkIFparent($ID02, $ID01, false, $storyID); echo json_encode($found); } else { if ($functionName == "getContent") { getContent($storyID); } else { if ($functionName == "saveContent") { saveContent($storyID); } else { if ($functionName == "getTitle") { getTitle($storyID); } else { if ($functionName == "getStoryDetails") { getStoryDetails($storyID); } else { if ($functionName == "saveStory") { saveStory($storyID); } else { if ($functionName == "addConnection") { addConnection($localhost, $user, $pw, $db, $storyID);
function referenceResources($reg, &$txtCnt, $urlBase, $sType) { preg_match_all($reg, $txtCnt, $aSrcs); $aCnts = []; for ($cntSrcs = 0; $cntSrcs < count($aSrcs[0]); $cntSrcs++) { $sResource = $aSrcs[0][$cntSrcs]; $urlRel = $aSrcs[1][$cntSrcs]; $urlAbs = calAbsUrl($urlRel, $urlBase); $txtSrc = getContent($urlAbs); $txtCnt = str_replace($sResource, '', $txtCnt); if ($txtSrc === false) { echo "File doesn't exist!!! {$urlRel} in {$urlBase}"; } else { $aCnts[] = $txtSrc; } } $txtSrc = implode('', $aCnts); switch ($sType) { case 'css': $txtCnt = '<style>' . $txtSrc . '</style>' . $txtCnt; break; case 'js': if (!DEVELOPING) { $fileTmp = WEBROOT_AT_DISK . TEMPORARY_JS; writeFile(TEMPORARY_JS, $txtSrc); $ug = new JSUglify2(); $ug->uglify([$fileTmp], $fileTmp); $txtSrc = getContent(TEMPORARY_JS); unlink($fileTmp); } $txtCnt .= '<script>' . $txtSrc . '</script>'; break; default: # code... break; } return; }