public function video($page = "video") { //$this->output->cache(15); $uri = $this->uri->segment(2); $videoId = getIdFromUri($uri); $video = $this->Video_model->getByIdFull($videoId); $data = array(); if ($video) { $data['video'] = $video; $data['server_type'] = $this->_config['server_type']; $seriesId = $video['series_id']; $series = $this->Series_model->getByIdFull($seriesId); $videosOfSeries = $this->Video_model->getRange("series_id=" . $seriesId, 0, 0, 'episode DESC'); $randomGenreId = $series['genre'] ? array_rand($series['genre']) : 0; $suggestSeriesList = $this->Series_model->listSeriesByGenre($randomGenreId, 0, 8, TRUE, $seriesId); $data['videoOfSeries'] = $videosOfSeries; //echo "<pre>"; print_r($videosOfSeries); die(); $data['suggestSeriesList'] = $suggestSeriesList; $data['randomGenre'] = $randomGenreId ? array('id' => $randomGenreId, 'name' => $series['genre'][$randomGenreId]) : array(); $this->layout->title($video['title']); $metaData['description'] = getVideoDescription($video); $metaData['page_link'] = makeLink($video['id'], $video['title'], 'video'); $metaData['image'] = getThumbnail($series['thumbnail'], 'series'); $this->layout->setMeta($metaData); $this->layout->view('video/' . $page, $data); } else { $this->layout->view('home/nodata', array()); } }
function toHTML($label, $name) { $assets_path = SCRIPT_RELATIVE . 'framework/core/subsystems/forms/controls/assets/'; $subTypeName = empty($this->subtype) ? "expFile[]" : "expFile[" . $this->subtype . "][]"; $files = $this->buildImages(); $html = '<div id="filemanager' . $name . '" class="filemanager control' . (empty($this->class) ? "" : " " . $this->class) . '">'; //$html .= '<div id="displayfiles" class="displayfiles" style="padding:5px; border:1px solid #444"> </div>'; $html .= '<div class="hd"><label class="label">' . $label . ''; if ($this->limit != null) { $html .= ' | <small>' . gt('Limit') . ': <em class="limit">' . $this->limit . '</em></small>'; } if ($this->count < $this->limit) { $html .= ' | <a class="add" href="#" id="addfiles-' . $name . '">' . gt('Add Files') . '</a>'; } $html .= '</label></div>'; if (empty($files)) { $this->count = 0; $files = '<li class="blank">' . gt('You need to add some files') . '</li>'; } $html .= '<ul id="filelist' . $name . '" class="filelist">'; $html .= $files; $html .= '</ul>'; $html .= '<input type="hidden" name="' . $subTypeName . '" value="' . $subTypeName . '">'; $html .= '</div>'; $js = "\n YUI(EXPONENT.YUI3_CONFIG).use('dd-constrain','dd-proxy','dd-drop','json','io', function(Y) {\n var limit = " . $this->limit . ";\n var filesAdded = " . $this->count . ";\n var fl = Y.one('#filelist" . $name . "');\n \n // file picker window opener\n function openFilePickerWindow(e){\n e.halt();\n win = window.open('" . makeLink($params = array('controller' => 'file', 'action' => 'picker', 'ajax_action' => "1", 'update' => $name)) . "', 'IMAGE_BROWSER','left=20,top=20,scrollbars=yes,width=800,height=600,toolbar=no,resizable=yes,status=0');\n if (!win) {\n //Catch the popup blocker\n alert('" . gt('Please disable your popup blocker') . "!!');\n }\n };\n \n var listenForAdder = function(){\n var af = Y.one('#addfiles-" . $name . "');\n af.on('click',openFilePickerWindow);\n };\n \n var showEmptyLI = function(){\n var blank = Y.Node.create('<li class=\"blank\">" . gt('You need to add some files') . "</li>');\n fl.appendChild(blank);\n };\n \n if (limit > filesAdded) {\n listenForAdder();\n }\n \n // remove the file from the list\n fl.delegate('click',function(e){\n e.target.ancestor('li').remove();\n \n showFileAdder();\n },'.delete');\n \n var showFileAdder = function() {\n var sf = Y.one('#addfiles-" . $name . "');\n if (Y.Lang.isNull(sf)) {\n var afl = Y.Node.create('<a class=\"add\" href=\"#\" id=\"addfiles-" . $name . "\">" . gt('Add Files') . "</a>');\n Y.one('#filemanager" . $name . " .hd').append(afl);\n listenForAdder();\n }\n filesAdded--;\n if (filesAdded == 0) showEmptyLI();\n }\n\n //Drag Drop stuff\n \n //Listen for all drop:over events\n Y.DD.DDM.on('drop:over', function(e) {\n //Get a reference to out drag and drop nodes\n var drag = e.drag.get('node'),\n drop = e.drop.get('node');\n\n //Are we dropping on a li node?\n if (drop.get('tagName').toLowerCase() === 'li') {\n //Are we not going up?\n if (!goingUp) {\n drop = drop.get('nextSibling');\n }\n //Add the node to this list\n e.drop.get('node').get('parentNode').insertBefore(drag, drop);\n //Resize this nodes shim, so we can drop on it later.\n e.drop.sizeShim();\n }\n });\n //Listen for all drag:drag events\n Y.DD.DDM.on('drag:drag', function(e) {\n //Get the last y point\n var y = e.target.lastXY[1];\n //is it greater than the lastY var?\n if (y < lastY) {\n //We are going up\n goingUp = true;\n } else {\n //We are going down..\n goingUp = false;\n }\n //Cache for next check\n lastY = y;\n });\n //Listen for all drag:start events\n Y.DD.DDM.on('drag:start', function(e) {\n //Get our drag object\n var drag = e.target;\n //Set some styles here\n drag.get('node').setStyle('opacity', '.25');\n drag.get('dragNode').set('innerHTML', drag.get('node').get('innerHTML'));\n drag.get('dragNode').setStyles({\n opacity: '.85',\n borderColor: drag.get('node').getStyle('borderColor'),\n backgroundImage: drag.get('node').getStyle('backgroundImage')\n });\n });\n //Listen for a drag:end events\n Y.DD.DDM.on('drag:end', function(e) {\n var drag = e.target;\n //Put out styles back\n drag.get('node').setStyles({\n visibility: '',\n opacity: '1'\n });\n });\n //Listen for all drag:drophit events\n Y.DD.DDM.on('drag:drophit', function(e) {\n var drop = e.drop.get('node'),\n drag = e.drag.get('node');\n\n //if we are not on an li, we must have been dropped on a ul\n if (drop.get('tagName').toLowerCase() !== 'li') {\n if (!drop.contains(drag)) {\n drop.appendChild(drag);\n }\n }\n });\n\n //Static Vars\n var goingUp = false, lastY = 0;\n\n var initDragables = function(){\n\n //Get the list of li's in the lists and make them draggable\n var lis = Y.Node.all('#filelist" . $name . " li');\n if (lis){\n lis.each(function(v, k) {\n var dd = new Y.DD.Drag({\n node: v,\n proxy: true,\n moveOnEnd: false,\n target: {\n padding: '0 0 0 20'\n }\n }).plug(Y.Plugin.DDConstrained, {\n //Keep it inside the #list1 node\n constrain2node: '#filelist" . $name . "',\n stickY:true\n }).plug(Y.Plugin.DDProxy, {\n //Don't move the node at the end of the drag\n moveOnEnd: false,\n borderStyle:'0'\n });//.addHandle('.fpdrag');\n });\n }\n\n //var tar = new Y.DD.Drop({ node:Y.one('#filelist" . $name . "')});\n }\n \n initDragables();\n\n // calback function from open window\n EXPONENT.passBackFile" . $name . " = function(id) {\n\n var complete = function (ioId, o) {\n var df = Y.one('#filelist" . $name . "');\n var objson = Y.JSON.parse(o.responseText);\n var obj = objson.data;\n if (obj.mimetype!='image/png' && obj.mimetype!='image/gif' && obj.mimetype!='image/jpeg'){\n var filepic = '<img class=\"filepic\" src=\"'+EXPONENT.ICON_RELATIVE+'\"attachableitems/generic_22x22.png\">';\n } else {\n var filepic = '<img class=\"filepic\" src=\"'+EXPONENT.URL_FULL+'thumb.php?id='+obj.id+'&w=24&h=24&zc=1\">';\n }\n \n var html = '<li>';\n html += '<input type=\"hidden\" name=\"" . $subTypeName . "\" value=\"'+obj.id+'\">';\n html += '<a class=\"delete\" rel=\"imgdiv'+obj.id+'\" href=\"javascript:{}\">" . gt('delete') . "<\\/a>';\n html += filepic;\n html += '<span class=\"filename\">'+obj.filename+'<\\/span>';\n html += '<\\/li>';\n \n htmln = Y.Node.create(html); \n \n df.append(htmln);\n\n var dd = new Y.DD.Drag({\n node: htmln,\n proxy: true,\n moveOnEnd: false,\n target: {\n padding: '0 0 0 20'\n }\n }).plug(Y.Plugin.DDConstrained, {\n constrain2node: '#filelist" . $name . "',\n stickY:true\n }).plug(Y.Plugin.DDProxy, {\n moveOnEnd: false,\n borderStyle:'0'\n });\n\n \n var af = Y.one('#addfiles-" . $name . "');\n\n if (filesAdded==0) {\n fl.one('.blank').remove();\n }\n\n filesAdded++\n\n if (!Y.Lang.isNull(af) && limit==filesAdded) {\n af.remove();\n }\n\n //initDragables();\n };\n \n var cfg = {\n on:{\n success:complete\n }\n };\n Y.io(EXPONENT.URL_FULL+'index.php.php?controller=file&action=getFile&ajax_action=1&json=1&id='+id, cfg);\n //ej.fetch({action:'getFile',controller:'fileController',json:1,params:'&id='+id});\n }\n\n });\n "; // END PHP STRING LITERAL expCSS::pushToHead(array("unique" => "cal2", "link" => $assets_path . "files/attachable-files.css")); // exponent_javascript_toFoot("filepicker".$name,"json,connection","dd-constrain,dd-proxy,dd-drop",$js,""); expJavascript::pushToFoot(array("unique" => "filepicker" . $name, "yui3mods" => "1", "content" => $js, "src" => "")); return $html; }
/** * Smarty {backlink} function plugin * * Type: function<br> * Name: backlink<br> * Purpose: create a back link * * @param $params * @param \Smarty $smarty */ function smarty_function_backlink($params, &$smarty) { // global $history; // $d=$params['distance']?$params['distance']+1:2; // echo makelink($history->history[$history->history['lasts']['type']][count($history->history[$history->history['lasts']['type']])-$d]['params']); $d = $params['distance'] ? $params['distance'] : 1; echo makeLink(expHistory::getBack($d)); }
function init() { global $language, $config, $messages; $this->esoTalk->view = "feed.view.php"; header("Content-type: text/xml; charset={$language["charset"]}"); // Work out what type of feed we're doing: // conversation/[id] -> fetch the posts in conversation [id] // default -> fetch the most recent posts over the whole forum switch (@$_GET["q2"]) { case "conversation": // Get the conversation. $conversationId = (int) $_GET["q3"]; if (!$conversationId or !($conversation = $this->esoTalk->db->fetchAssoc("SELECT c.conversationId AS id, c.title AS title, c.slug AS slug, c.private AS private, c.posts AS posts, c.startMember AS startMember, c.lastActionTime AS lastActionTime, GROUP_CONCAT(t.tag ORDER BY t.tag ASC SEPARATOR ', ') AS tags FROM {$config["tablePrefix"]}conversations c LEFT JOIN {$config["tablePrefix"]}tags t USING (conversationId) WHERE c.conversationId={$conversationId} GROUP BY c.conversationId"))) { $this->esoTalk->fatalError($messages["cannotViewConversation"]["message"]); } // Do we need authentication? if ($conversation["private"] or $conversation["posts"] == 0) { // Try to login with provided credentials. if (isset($_SERVER["PHP_AUTH_USER"])) { $this->esoTalk->login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]); } // Still not logged in? Ask them again! if (!$this->esoTalk->user) { header('WWW-Authenticate: Basic realm="esoTalk RSS feed"'); header('HTTP/1.0 401 Unauthorized'); $this->esoTalk->fatalError($messages["cannotViewConversation"]["message"]); } // We're logged in now. So, is this member allowed in this conversation? if (!($conversation["startMember"] == $this->esoTalk->user["memberId"] or $conversation["posts"] > 0 and (!$conversation["private"] or $this->esoTalk->db->result("SELECT allowed FROM {$config["tablePrefix"]}status WHERE conversationId={$conversationId} AND (memberId={$this->esoTalk->user["memberId"]} OR memberId='{$this->esoTalk->user["account"]}')", 0)))) { // Nuh-uh. Get OUT!!! $this->esoTalk->fatalError($messages["cannotViewConversation"]["message"]); } } // Past this point, the user is allowed to view the conversation. // Set the title, link, description, etc. $this->title = "{$conversation["title"]} - {$config["forumTitle"]}"; $this->link = $config["baseURL"] . makeLink($conversation["id"], $conversation["slug"]); $this->description = $conversation["tags"]; $this->pubDate = date("D, d M Y H:i:s O", $conversation["lastActionTime"]); // Get posts $result = $this->esoTalk->db->query("SELECT postId, name, content, time FROM {$config["tablePrefix"]}posts INNER JOIN {$config["tablePrefix"]}members USING (memberId) WHERE conversationId={$conversation["id"]} AND p.deleteMember IS NULL ORDER BY time DESC LIMIT 20"); while (list($id, $member, $content, $time) = $this->esoTalk->db->fetchRow($result)) { $this->items[] = array("title" => $member, "description" => sanitize($this->absoluteURLs($content)), "link" => $config["baseURL"] . makeLink("post", $id), "date" => date("D, d M Y H:i:s O", $time)); } break; default: // It doesn't matter whether we're logged in or not - just get the posts! $result = $this->esoTalk->db->query("SELECT p.postId, c.title, m.name, p.content, p.time FROM {$config["tablePrefix"]}posts p LEFT JOIN {$config["tablePrefix"]}conversations c USING (conversationId) INNER JOIN {$config["tablePrefix"]}members m ON (m.memberId=p.memberId) WHERE c.private=0 AND c.posts>0 AND p.deleteMember IS NULL ORDER BY p.time DESC LIMIT 20"); while (list($postId, $title, $member, $content, $time) = $this->esoTalk->db->fetchRow($result)) { $this->items[] = array("title" => "{$member} - {$title}", "description" => sanitize($this->absoluteURLs($content)), "link" => $config["baseURL"] . makeLink("post", $postId), "date" => date("D, d M Y H:i:s O", $time)); } // Set the title, link, description, etc. $this->title = "{$language["Recent posts"]} - {$config["forumTitle"]}"; $this->link = $config["baseURL"]; $this->pubDate = !empty($this->items[0]) ? $this->items[0]["date"] : ""; } }
function tile_TheTileName($group, $x, $y, $width, $height, $background, $url, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; ?> <a <?php echo makeLink($url); ?> class="tile group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ;" <?php posVal($marginTop, $marginLeft, $tileWidth); ?> > <?php if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } ?> </a> <?php }
function init() { if ($this->esoTalk->user) { redirect(""); } global $language, $messages, $config; $this->title = $language["Forgot your password"]; $this->esoTalk->addToHead("<meta name='robots' content='noindex, noarchive'/>"); // If we're on the second step (they've clicked the link in their email) if ($hash = @$_GET["q2"]) { // Get the user with this recover password hash $result = $this->esoTalk->db->query("SELECT memberId FROM {$config["tablePrefix"]}members WHERE resetPassword='******'"); if (!$this->esoTalk->db->numRows($result)) { redirect("forgotPassword"); } list($memberId) = $this->esoTalk->db->fetchRow($result); $this->setPassword = true; // Validate the form if it was submitted if (isset($_POST["changePassword"])) { $password = @$_POST["password"]; $confirm = @$_POST["confirm"]; if ($error = validatePassword(@$_POST["password"])) { $this->errors["password"] = $error; } if ($password != $confirm) { $this->errors["confirm"] = "passwordsDontMatch"; } if (!count($this->errors)) { $passwordHash = md5($config["salt"] . $password); $this->esoTalk->db->query("UPDATE {$config["tablePrefix"]}members SET resetPassword=NULL, password='******' WHERE memberId={$memberId}"); $this->esoTalk->message("passwordChanged", false); redirect(""); } } } // If they've submitted their email for a password link, email them! if (isset($_POST["email"])) { // Find the member with this email $result = $this->esoTalk->db->query("SELECT memberId, name, email FROM {$config["tablePrefix"]}members WHERE email='{$_POST["email"]}'"); if (!$this->esoTalk->db->numRows($result)) { $this->esoTalk->message("emailDoesntExist"); return; } list($memberId, $name, $email) = $this->esoTalk->db->fetchRow($result); // Set a special 'forgot password' hash $hash = md5(rand()); $this->esoTalk->db->query("UPDATE {$config["tablePrefix"]}members SET resetPassword='******' WHERE memberId={$memberId}"); // Send the email if (sendEmail($email, sprintf($language["emails"]["forgotPassword"]["subject"], $name), sprintf($language["emails"]["forgotPassword"]["body"], $name, $config["forumTitle"], $config["baseURL"] . makeLink("forgot-password", $hash)))) { $this->esoTalk->message("passwordEmailSent", false); redirect(""); } } }
public function index($page = "index") { //$this->output->cache(15); $data = array(); if (isset($_GET['keyword']) && strlen($_GET['keyword']) > 2) { $keyword = filterText($_GET['keyword']); $data['original_keyword'] = $keyword; $keyword = strtolower($keyword); $keyword = str_replace(' ep ', ' episode ', $keyword); $whereClause = "title LIKE '%" . $keyword . "%'"; $pageNum = isset($_GET['p']) ? intval($_GET['p']) : 1; $offset = ($pageNum - 1) * ITEM_PER_PAGE; $total = $this->Series_model->getTotal($whereClause); $listObject = $this->Series_model->getRange($whereClause, $offset, ITEM_PER_PAGE); $data['keyword'] = $keyword; $data['max'] = ITEM_PER_PAGE; $data['offset'] = $offset; $data['total'] = $total; $this->layout->title('Search result for ' . $keyword); $metaData['page_link'] = makeLink(0, $keyword, 'search'); $this->layout->setMeta($metaData); if (empty($listObject)) { $whereClause2 = "video.title LIKE '%" . $keyword . "%'"; $total = $this->Video_model->getTotalFull($whereClause2); $data['total'] = $total; $listVideo = $this->Video_model->getRangeFull($whereClause2, $offset, ITEM_PER_PAGE); if ($listVideo) { $data['listObject'] = $listVideo; $this->layout->view('search/video', $data); } else { $this->layout->view('home/nodata', array()); } } else { $data['listObject'] = $listObject; $this->layout->view('search/' . $page, $data); } } else { redirect(''); } }
"><?php echo $info['title']; ?> </a> > <?php } else { ?> > <a href="<?php echo makeLink($c, 'list', array('classid' => $info['classid'], 'filename' => $classinfo['filename'])); ?> "><?php echo $classinfo['title']; ?> </a> > <a href="<?php echo makeLink($c, $a, array('id' => $info['id'], 'filename' => $info['filename'])); ?> "><?php echo $info['title']; ?> </a> > <?php } } ?> <?php if ($a == 'search') { ?> > 搜索 <?php
/** * the first thing after checkout. * */ public function preprocess() { //eDebug($this->params,true); global $order, $user, $db; //eDebug($_POST, true); // get the shippnig and billing objects, these objects handle the setting up the billing/shipping methods // and their calculators $shipping = new shipping(); $billing = new billing(); // since we're skipping the billing method selection, do it here $billing->billingmethod->update($this->params); //this is just dumb. it doesn't update the object, refresh doesn't work, and I'm tired $billing = new billing(); if (!$user->isLoggedIn()) { flash('message', gt("It appears that your session has expired. Please log in to continue the checkout process.")); expHistory::redirecto_login(makeLink(array('module' => 'cart', 'action' => 'checkout'), 'secure')); } // Make sure all the pertanent data is there...otherwise flash an error and redirect to the checkout form. if (empty($order->orderitem)) { flash('error', gt('There are no items in your cart.')); } if (empty($shipping->calculator->id) && !$shipping->splitshipping) { flash('error', gt('You must pick a shipping method')); } if (empty($shipping->address->id) && !$shipping->splitshipping) { flash('error', gt('You must pick a shipping address')); } if (empty($billing->calculator->id)) { flash('error', gt('You must pick a billing method')); } if (empty($billing->address->id)) { flash('error', gt('You must select a billing address')); } // make sure all the methods picked for shipping meet the requirements foreach ($order->getShippingMethods() as $smid) { $sm = new shippingmethod($smid); $calcname = $db->selectValue('shippingcalculator', 'calculator_name', 'id=' . $sm->shippingcalculator_id); $calc = new $calcname($sm->shippingcalculator_id); $ret = $calc->meetsCriteria($sm); if (is_string($ret)) { flash('error', $ret); } } // if we encounterd any errors we will return to the checkout page and show the errors if (!expQueue::isQueueEmpty('error')) { redirect_to(array('controller' => 'cart', 'action' => 'checkout')); } // get the billing options..this is usually the credit card info entered by the user $opts = $billing->calculator->userFormUpdate($this->params); //$billing->calculator->preprocess($this->params); //eDebug($opts); expSession::set('billing_options', $opts); //$o = expSession::get('billing_options'); //eDebug($o,true); //eDebug($this->params,true); //this should probably be genericized a bit more - currently assuming order_type parameter is present, or defaults //eDebug($order->getDefaultOrderType(),true); $order->setOrderType($this->params); $order->setOrderStatus($this->params); //eDebug($order,true); // final the cart totals $order->calculateGrandTotal(); //eDebug($order,true); // call the billing mehod's preprocess in case it needs to prepare things. // eDebug($billing); $result = $billing->calculator->preprocess($billing->billingmethod, $opts, $this->params, $order); // once in a while it appears the payment processor will return a nullo value in the errorCode field // which the previous check takes as a TRUE, as 0, null, and empty will all equate out the same using the == // adding the === will specifically test for a 0 and only a 0, which is what we want if (empty($result->errorCode)) { redirect_to(array('controller' => 'cart', 'action' => 'confirm')); } else { flash('error', gt('An error was encountered while processing your transaction.') . '<br /><br />' . $result->message); expHistory::back(); } }
<a href="./<?php echo makeLink('downloads', 'show', array('id' => $value['id'], 'filename' => $value['filename'])); ?> " title="<?php echo $value['title']; ?> "><img height="60" width="80" src="<?php echo $value['thumb']; ?> " /></a> </div> </div> <div class="icl_list_right"> <div class="icl_list_right_title"> <a href="./<?php echo makeLink('downloads', 'show', array('id' => $value['id'], 'filename' => $value['filename'])); ?> " title="<?php echo $value['title']; ?> "><font color="<?php echo $value['titlecolor']; ?> "><?php echo cutstr($value['title'], 16); ?> </font></a> </div> <div class="icl_list_right_intro"> <?php echo cutstr($value['intro'], 40);
<?php } else { echo $this->esoTalk->htmlMessage("noSkinsInstalled"); } ?> <fieldset id='addSkin'> <legend><?php echo $language["Add a new skin"]; ?> </legend> <?php echo $this->esoTalk->htmlMessage("downloadSkins", "http://esotalk.com/skins"); ?> <form action='<?php echo makeLink("skins"); ?> ' method='post' enctype='multipart/form-data'> <ul class='form'> <li><label><?php echo $language["Upload a skin"]; ?> </label> <input name='uploadSkin' type='file' class='text' size='20'/></li> <li><label></label> <?php echo $this->esoTalk->skin->button(array("value" => $language["Add skin"])); ?> </li> </ul> </form> </fieldset>
function readtxt($f) { $return = ''; $filename = $f; $ini_handle = fopen($filename, "r"); $return = fread($ini_handle, filesize($filename)); $return = nl2br($return); return makeLink($return); }
// 40,000 almost definitely will not exceed the 10MB sitemap limit. define("ZLIB", extension_loaded("zlib") ? ".gz" : null); // Generate conversation sitemap files until we run out of conversations. while (true) { // Set the filename with the counter. $filename = "sitemap.conversations.{$i}.xml" . ZLIB; // Get the next batch of public conversations from the database. $r = mysql_query("SELECT conversationId, slug, posts / ((UNIX_TIMESTAMP() - startTime) / 86400) AS postsPerDay, IF(lastActionTime, lastActionTime, startTime) AS lastUpdated, posts FROM " . config("esoTalk.database.prefix") . "conversations WHERE !private LIMIT " . ($i - 1) * URLS_PER_SITEMAP . "," . URLS_PER_SITEMAP); // If there are no conversations left, break from the loop. if (!mysql_num_rows($r)) { break; } else { $urlset = "<?xml version='1.0' encoding='UTF-8'?><urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>"; // Create a <url> tag for each conversation in the result set. while (list($conversationId, $slug, $postsPerDay, $lastUpdated, $posts) = mysql_fetch_row($r)) { $urlset .= "<url><loc>{$config["baseURL"]}" . makeLink($conversationId, $slug) . "</loc><lastmod>" . gmdate("Y-m-d\\TH:i:s+00:00", $lastUpdated) . "</lastmod><changefreq>"; // How often should we tell them to check for updates? if ($postsPerDay < 0.006) { $urlset .= "yearly"; } elseif ($postsPerDay < 0.07000000000000001) { $urlset .= "monthly"; } elseif ($postsPerDay < 0.3) { $urlset .= "weekly"; } elseif ($postsPerDay < 3) { $urlset .= "daily"; } else { $urlset .= "hourly"; } $urlset .= "</changefreq>"; // Estimate the conversation's importance based upon the number of posts. if ($posts < 50) {
?> & <?php echo $this->esoTalk->user["name"]; ?> <br/><span class='label private'><?php echo $language["labels"]["private"]; ?> </span></label> <div><a href='<?php echo makeLink("search", "?q2=private+%2B+contributor:" . urlencode(desanitize($this->member["name"]))); ?> '><?php printf($language["See the private conversations I've had"], $this->member["name"]); ?> </a><br/> <a href='<?php echo makeLink("new", "?member=" . urlencode(desanitize($this->member["name"]))); ?> '><?php printf($language["Start a private conversation"], $this->member["name"]); ?> </a></div></li> <?php } ?> </ul> </div> </div> <?php ksort($this->sections);
/** * add all module items to search index * @return int */ function addContentToSearch() { global $db, $router; $count = 0; $model = new $this->basemodel_name(null, false, false); $content = $db->selectArrays($model->tablename); foreach ($content as $cnt) { $origid = $cnt['id']; unset($cnt['id']); // get the location data for this content if (isset($cnt['location_data'])) { $loc = expUnserialize($cnt['location_data']); } $src = isset($loc->src) ? $loc->src : null; //build the search record and save it. $search_record = new search($cnt, false, false); $search_record->original_id = $origid; $search_record->posted = empty($cnt['created_at']) ? null : $cnt['created_at']; $link = str_replace(URL_FULL, '', makeLink(array('controller' => $this->baseclassname, 'action' => 'show', 'id' => $origid, 'src' => $src))); // if (empty($search_record->title)) $search_record->title = 'Untitled'; $search_record->view_link = $link; $search_record->ref_module = $this->classname; $search_record->category = $this->searchName(); $search_record->ref_type = $this->searchCategory(); $search_record->save(); $count += 1; } return $count; }
} global $user, $db; $my_version = gt("Exponent Version") . " : " . EXPONENT_VERSION_MAJOR . "." . EXPONENT_VERSION_MINOR . "." . EXPONENT_VERSION_REVISION . "<br />"; if (EXPONENT_VERSION_TYPE != '') { $my_type = gt("Release level") . " : " . EXPONENT_VERSION_TYPE . EXPONENT_VERSION_ITERATION . "<br />"; } else { $my_type = ''; } $my_releasedate = gt("Release date") . " : " . date("F-d-Y", EXPONENT_VERSION_BUILDDATE); $script = "\n// YUI(EXPONENT.YUI3_CONFIG).use('node', function(Y) {\n// \n// });\n\n"; expJavascript::pushToFoot(array("unique" => 'admin1', "yui3mods" => null, "content" => $script)); if ($user->isAdmin()) { $expAdminMenu = array('text' => '<img src="' . $this->asset_path . 'images/admintoolbar/expbar.png">', 'classname' => 'site', 'submenu' => array('id' => 'admin', 'itemdata' => array(array('classname' => 'info', 'text' => gt('About ExponentCMS'), "submenu" => array('id' => 'ver', 'itemdata' => array(array('classname' => 'moreinfo', 'text' => $my_version . $my_type . $my_releasedate . "<br />" . gt("PHP Version") . " : " . phpversion(), "disabled" => true), array('text' => gt("Exponent Documentation"), 'url' => '#', 'id' => 'docs-toolbar', 'classname' => 'docs'), array('text' => gt("Discuss Exponent"), 'url' => '#', 'id' => 'forums-toolbar', 'classname' => 'forums'), array('text' => gt("Report a bug"), 'url' => '#', 'id' => 'reportabug-toolbar', 'classname' => 'reportbug'))))))); } else { $expAdminMenu = array('text' => '<img src="' . $this->asset_path . 'images/admintoolbar/expbar.png">', 'classname' => 'site', 'submenu' => array('id' => 'admin', 'itemdata' => array(array('classname' => 'info', 'text' => gt('About ExponentCMS'), "submenu" => array('id' => 'ver', 'itemdata' => array(array('classname' => 'moreinfo', 'text' => $my_version . $my_type . $my_releasedate, "disabled" => true), array('text' => gt("Exponent Documentation"), 'url' => '#', 'id' => 'docs-toolbar', 'classname' => 'docs'), array('text' => gt("Discuss Exponent"), 'url' => '#', 'id' => 'forums-toolbar', 'classname' => 'forums'))))))); } if ($user->isAdmin()) { if (SMTP_USE_PHP_MAIL) { $expAdminMenu['submenu']['itemdata'][] = array('text' => gt("Configuration"), 'classname' => 'config', 'submenu' => array('id' => 'configure', 'itemdata' => array(array('text' => gt("Configure Website"), 'url' => makeLink(array('module' => 'administration', 'action' => 'configure_site'))), array('text' => gt('Regenerate Search Index'), 'classname' => 'search', 'url' => makeLink(array('module' => 'search', 'action' => 'spider')))))); } else { $expAdminMenu['submenu']['itemdata'][] = array('text' => gt('Configuration'), 'classname' => 'config', 'submenu' => array('id' => 'configure', 'itemdata' => array(array('text' => gt("Configure Website"), 'url' => makeLink(array('module' => 'administration', 'action' => 'configure_site'))), array('text' => gt('Test SMTP Mail Server Settings'), 'url' => makeLink(array('module' => 'administration', 'action' => 'test_smtp'))), array('text' => gt('Regenerate Search Index'), 'classname' => 'search', 'url' => makeLink(array('module' => 'search', 'action' => 'spider')))))); } } $groups = $db->selectObjects('groupmembership', 'member_id=' . $user->id . ' AND is_admin=1'); if ($user->isAdmin() || !empty($groups)) { $expAdminMenu['submenu']['itemdata'][] = array('text' => gt('User Management'), 'classname' => 'users', 'submenu' => array('id' => 'usermanagement', 'itemdata' => array(array('text' => gt('User Accounts'), 'url' => makeLink(array('controller' => 'users', 'action' => 'manage')), 'classname' => 'euser'), array('text' => gt('Group Accounts'), 'url' => makeLink(array('module' => 'users', 'action' => 'manage_groups')), 'classname' => 'egroup'), array('text' => gt('Profile Definitions'), 'url' => makeLink(array('module' => 'users', 'action' => 'manage_extensions'))), array('text' => gt('User Sessions'), 'url' => makeLink(array('module' => 'users', 'action' => 'manage_sessions')))))); } if ($user->isSuperAdmin()) { $expAdminMenu['submenu']['itemdata'][] = array('text' => gt('Developer Tools'), 'classname' => 'development', 'submenu' => array('id' => 'development', 'itemdata' => array(array('text' => DEVELOPMENT ? gt('Turn Error Reporting off') : gt('Turn Error Reporting on'), 'classname' => DEVELOPMENT ? 'develop_on_red' : 'develop_off', 'url' => makeLink(array('module' => 'administration', 'action' => 'toggle_dev'))), array('text' => gt('Database'), 'submenu' => array('id' => 'database', 'itemdata' => array(array('text' => gt('Install Tables'), 'url' => makeLink(array('module' => 'administration', 'action' => 'install_tables'))), array('text' => gt('Import Data'), 'url' => makeLink(array('module' => 'importer', 'action' => 'list_importers'))), array('text' => gt('Export Data'), 'url' => makeLink(array('module' => 'exporter', 'action' => 'list_exporters'))), array('text' => gt('Optimize Database'), 'url' => makeLink(array('module' => 'administration', 'action' => 'fix_optimize_database'))), array('text' => gt('Repair Database'), 'url' => makeLink(array('module' => 'administration', 'action' => 'fix_database'))), array('text' => gt('Reset Sessions Table'), 'url' => makeLink(array('module' => 'administration', 'action' => 'fix_sessions'))), array('text' => gt('Remove Unused Tables'), 'classname' => 'remove', 'url' => makeLink(array('controller' => 'administration', 'action' => 'manage_unused_tables')))))), array('text' => gt('Migration'), 'submenu' => array('id' => 'migration', 'itemdata' => array(array('text' => '1 - ' . gt('Configure Migration Settings'), 'url' => makeLink(array('module' => 'migration', 'action' => 'configure'))), array('text' => '2 - ' . gt('Migrate Users/Groups'), 'url' => makeLink(array('module' => 'migration', 'action' => 'manage_users'))), array('text' => '3 - ' . gt('Migrate Pages'), 'url' => makeLink(array('module' => 'migration', 'action' => 'manage_pages'))), array('text' => '4 - ' . gt('Migrate Files'), 'url' => makeLink(array('module' => 'migration', 'action' => 'manage_files'))), array('text' => '5 - ' . gt('Migrate Content'), 'url' => makeLink(array('module' => 'migration', 'action' => 'manage_content')))))), array('text' => gt('Extensions'), 'submenu' => array('id' => 'extensions', 'itemdata' => array(array('text' => gt('Install Extension'), 'classname' => 'fileuploader', 'url' => makeLink(array('module' => 'administration', 'action' => 'install_extension'))), array('text' => gt('Manage Modules'), 'classname' => 'manage', 'url' => makeLink(array('controller' => 'expModule', 'action' => 'manage'))), array('text' => gt('Manage Translations'), 'classname' => 'manage', 'url' => makeLink(array('module' => 'administration', 'action' => 'manage_lang'))), array('text' => gt('Manage Themes'), 'classname' => 'manage', 'url' => makeLink(array('module' => 'administration', 'action' => 'manage_themes'))), array('text' => MOBILE ? gt('Turn Mobile View off') : gt('Turn Mobile View on'), 'classname' => MOBILE ? 'develop_on_green' : 'develop_off', 'url' => makeLink(array('module' => 'administration', 'action' => 'toggle_mobile')))))), array('text' => gt('System Cache'), 'submenu' => array('id' => 'cache', 'itemdata' => array(array('text' => MINIFY ? gt('Turn Minification off') : gt('Turn Minification on'), 'classname' => MINIFY ? 'develop_on_green' : 'develop_off', 'url' => makeLink(array('module' => 'administration', 'action' => 'toggle_minify'))), array('text' => gt('Clear Smarty Cache'), 'classname' => 'remove', 'url' => makeLink(array('module' => 'administration', 'action' => 'clear_smarty_cache'))), array('text' => gt('Clear CSS/Minify Cache'), 'classname' => 'remove', 'url' => makeLink(array('module' => 'administration', 'action' => 'clear_css_cache'))), array('text' => gt('Clear Image Cache'), 'classname' => 'remove', 'url' => makeLink(array('module' => 'administration', 'action' => 'clear_image_cache'))), array('text' => gt('Clear RSS/Podcast Cache'), 'classname' => 'remove', 'url' => makeLink(array('module' => 'administration', 'action' => 'clear_rss_cache'))), array('text' => gt('Clear All Caches'), 'classname' => 'remove', 'url' => makeLink(array('module' => 'administration', 'action' => 'clear_all_caches')))))), array('text' => MAINTENANCE_MODE ? gt('Turn Maintenance Mode off') : gt('Turn Maintenance Mode on'), 'classname' => MAINTENANCE_MODE ? 'develop_on_red' : 'develop_off', 'url' => makeLink(array('module' => 'administration', 'action' => 'toggle_maintenance')))))); } return $expAdminMenu;
function tile_slide($group, $x, $y, $width, $height, $background, $url, $text, $img, $imgSize, $slidePercent, $slideDir, $doSlideText, $doSlideLabel, $border, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); switch ($slideDir) { case "left": case "right": $d = 'hor'; break; case "down": case "up": $d = 'ver'; break; } ?> <a <?php echo makeLink($url); ?> class="tile tileSlide <?php echo $slideDir; ?> group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ; <?php if (!$border) { echo "padding:0;"; } ?> " <?php posVal($marginTop, $marginLeft, $tileWidth); ?> data-doslide="<?php echo $doSlideText; ?> "> <div class='slideText' style=' <?php if ($d == "ver") { ?> height:<?php echo $tileHeight * $slidePercent; ?> px; width:100%;<?php } else { ?> width:<?php echo $tileWidth * $slidePercent; ?> px; height:100%;<?php } if ($doSlideText) { switch ($slideDir) { case "left": echo "left:" . $tileWidth . 'px;'; break; case "right": echo "left:" . -$tileWidth * $slidePercent . 'px;'; break; case "down": echo "top:" . -$tileHeight * $slidePercent . 'px;'; break; case "up": echo "top:" . $tileHeight . 'px;'; break; } } else { switch ($slideDir) { case "left": echo "right"; break; case "right": echo "left"; break; case "down": echo "top"; break; case "up": echo "bottom"; break; } echo ":0;"; } echo "'>" . $text; ?> </div> <div class="imageWrapper"> <div class="imageCenterer" style="width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px;line-height:<?php echo $tileHeight - 2; ?> px;"> <img src='<?php echo $img; ?> ' style="width:<?php echo $tileWidth * $imgSize; ?> px;" /> </div> <?php if (!$doSlideLabel) { echo "</div>"; } if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } if ($doSlideLabel) { echo "</div>"; } ?> </a> <?php }
global $code, $appId, $secretCode, $redirectUri; return "https://oauth.vk.com/access_token?" . "client_id={$appId}&client_secret={$secretCode}&redirect_uri={$redirectUri}" . "&code={$code}"; } function wallPost($text) { global $userId, $accessToken; $text = urlencode($text); $url = "https://api.vk.com/method/wall.post?owner_id={$userId}&access_token={$accessToken}" . "&message={$text}"; return $url; } function makeLink($href) { return "<div><a href={$href}>{$href}</a></div>"; } $url = wallPost("Салам алейкум"); //$url = getAccessToken(); ?> <div> <h2>Response: <?php echo $url; ?> </h2> <?php echo file_get_contents($url); ?> </div> <?php echo makeLink(getAuthUrl()); //echo makeLink(getAccessToken()); //echo makeLink(wallPost("Салам алейкум"));
function dompayouts($data, $user) { $pg = '<h1>Mining Rewards</h1>'; $ans = getMPayouts($user); $pg .= "The rewards you've earned for each block the pool has found.<br>"; $pg .= 'See the '; $pg .= makeLink('payments'); $pg .= "Payments</a> page for the payments you've been sent.<br><br>"; $pg .= "<table callpadding=0 cellspacing=0 border=0>\n"; $pg .= "<tr class=title>"; $pg .= "<td class=dr>Block</td>"; $pg .= "<td class=dr>Block UTC</td>"; $pg .= "<td class=dr>Miner Reward</td>"; $pg .= "<td class=dr>N Diff</td>"; $pg .= "<td class=dr>N Range</td>"; $pg .= "<td class=dr>Pool N Avg</td>"; $pg .= "<td class=dr>Your %</td>"; $pg .= "<td class=dr>Your N Diff</td>"; $pg .= "<td class=dr>Your N Avg</td>"; $pg .= "<td class=dr>Your BTC</td>"; $pg .= "</tr>\n"; if ($ans['STATUS'] == 'ok') { $totamt = 0; $count = $ans['rows']; for ($i = 0; $i < $count; $i++) { if ($i % 2 == 0) { $row = 'even'; } else { $row = 'odd'; } $pg .= "<tr class={$row}>"; $pg .= '<td class=dr>' . $ans['height:' . $i] . '</td>'; $pg .= '<td class=dr>' . gmdate('j/M H:i', $ans['blockcreatedate:' . $i]) . '</td>'; $pg .= '<td class=dr>' . btcfmt($ans['minerreward:' . $i]) . '</td>'; $diffused = $ans['diffused:' . $i]; $pg .= '<td class=dr>' . difffmt($diffused) . '</td>'; $elapsed = $ans['elapsed:' . $i]; $pg .= '<td class=dr>' . howmanyhrs($elapsed) . '</td>'; $phr = $diffused * pow(2, 32) / $elapsed; $pg .= '<td class=dr>' . siprefmt($phr) . 'Hs</td>'; $diffacc = $ans['diffacc:' . $i]; $ypct = $diffacc * 100 / $diffused; $pg .= '<td class=dr>' . number_format($ypct, 2) . '%</td>'; $pg .= '<td class=dr>' . difffmt($diffacc) . '</td>'; $hr = $diffacc * pow(2, 32) / $elapsed; $pg .= '<td class=dr>' . dsprate($hr) . '</td>'; $amount = $ans['amount:' . $i]; $totamt += $amount; $pg .= '<td class=dr>' . btcfmt($amount) . '</td>'; $pg .= "</tr>\n"; } if ($count > 1) { if ($i % 2 == 0) { $row = 'even'; } else { $row = 'odd'; } $pg .= "<tr class={$row}>"; $pg .= '<td class=dr>Total:</td>'; $pg .= '<td class=dl colspan=8></td>'; $pg .= '<td class=dr>' . btcfmt($totamt) . '</td>'; $pg .= "</tr>\n"; } } $pg .= "</table>\n"; return $pg; }
echo makePopupLink('?view=' . $eventsView . '&page=1' . $monitor['eventCounts'][$i]['filter']['query'], $eventsWindow, $eventsView, $monitor['EventCount' . $i], canView('Events')); ?> </td> <?php } ?> <td class="colZones"><?php echo makePopupLink('?view=zones&mid=' . $monitor['Id'], 'zmZones', array('zones', $monitor['Width'], $monitor['Height']), $monitor['ZoneCount'], canView('Monitors')); ?> </td> <?php if (canEdit('Monitors')) { ?> <td class="colOrder"><?php echo makeLink('?view=' . $view . '&action=sequence&mid=' . $monitor['Id'] . '&smid=' . $seqIdUpList[$monitor['Id']], '<img src="' . $seqUpFile . '" alt="Up"/>', $monitor['Sequence'] > $minSequence); echo makeLink('?view=' . $view . '&action=sequence&mid=' . $monitor['Id'] . '&smid=' . $seqIdDownList[$monitor['Id']], '<img src="' . $seqDownFile . '" alt="Down"/>', $monitor['Sequence'] < $maxSequence); ?> </td> <?php } ?> <td class="colMark"><input type="checkbox" name="markMids[]" value="<?php echo $monitor['Id']; ?> " onclick="setButtonStates( this )"<?php if (!canEdit('Monitors')) { ?> disabled="disabled"<?php } ?> /></td>
echo "<div class=\"" . $feeditem->type_title . "\">"; echo "<div class=\"left_" . $feeditem->type_title . "_box\" style='float:left';>"; echo "<img src=\"components/com_redsocialstream/images/" . $feeditem->type_title . ".jpg\" class=\"icon_" . $feeditem->type_title . "\">"; echo "</div>"; echo "<div class=\"title_" . $feeditem->type_title . "_box\" style='float:left';><h2>"; echo $feeditem->ext_post_name; echo "</h2></div>"; echo "<div class=\"date_" . $feeditem->type_title . "_box\" style='float:right';>"; echo JHtml::date($feeditem->created_time, 'l d/m/y H:i'); echo "</div>"; echo "<div class=\"right_" . $feeditem->type_title . "_box\" style='padding-top:50px;'>"; echo "<div style=\"display:block;float:left;width:100px;\" >"; echo "<img src=\"" . $feeditem->thumb_uri . "\" class=\"profile_" . $feeditem->type_title . "_image\"\">"; echo "</div>"; echo "<div class=\"redsocial_description " . $feeditem->type_title . "\">"; echo makeLink($feeditem->message); echo "</div>"; echo "<div style='float:right';>"; echo "<a href=\"http://twitter.com/#!/" . $feeditem->ext_post_name . "\">" . JText::_('COM_REDSOCIALSTREAM_READMORE') . "</a>"; echo "</div>"; echo "</div>"; echo "<div style=\"clear:both;\"></div>"; echo "</div><br/><hr/><br/>"; } if ($feeditem->type_title == 'youtube') { echo "<div class=\"" . $feeditem->type_title . "\">"; echo "<div class=\"left_" . $feeditem->type_title . "_box\" style='float:left';>"; echo "<img src=\"components/com_redsocialstream/images/" . $feeditem->type_title . ".jpg\" class=\\icon_" . $feeditem->type_title . "\">"; echo "</div>"; echo "<div class=\"title_" . $feeditem->type_title . "_box\" style='float:left';><h2>"; echo $feeditem->ext_post_name;
<a href="./<?php echo makeLink('articles', 'show', array('id' => $value['id'], 'filename' => $value['filename'])); ?> " title="<?php echo $value['title']; ?> "><img height="60" width="80" src="<?php echo $value['thumb']; ?> " /></a> </div> </div> <div class="icl_list_right"> <div class="icl_list_right_title"> <a href="./<?php echo makeLink('articles', 'show', array('id' => $value['id'], 'filename' => $value['filename'])); ?> " title="<?php echo $value['title']; ?> "><font color="<?php echo $value['titlecolor']; ?> "><?php echo cutstr($value['title'], 16); ?> </font></a> </div> <div class="icl_list_right_intro"> <?php echo cutstr($value['intro'], 40);
# This file is part of Exponent # # Exponent is free software; you can redistribute # it and/or modify it under the terms of the GNU # General Public License as published by the Free # Software Foundation; either version 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } global $db, $router; if ($db->countObjects('product', 'product_type="eventregistration"') == 0) { return false; } $events = $db->selectObjects('eventregistration', 'event_starttime > ' . time()); $items = array(); $items[] = array('text' => "<strong><u>" . gt('View All Event Registrations') . "</u><strong>", 'url' => makeLink(array('controller' => 'eventregistration', 'action' => 'showall'))); foreach ($events as $event) { $prod = $db->selectObject('product', 'product_type="eventregistration" AND product_type_id=' . $event->id); if (!empty($prod->title)) { $thisitem = array(); $thisitem['text'] = $prod->title . ' (' . $event->number_of_registrants . '/' . $prod->quantity . ')'; $thisitem['url'] = $router->makeLink(array('controller' => 'eventregistration', 'action' => 'view_registrants', 'id' => $prod->id)); $items[] = $thisitem; } } return array('text' => gt('Upcoming Events'), 'classname' => 'events', 'submenu' => array('id' => 'events', 'itemdata' => $items));
<a href="<?php echo makeLink($object['id'], $object['title'], 'series', $object['country']); ?> "> <img src="<?php echo getThumbnail($object['thumbnail'], 'series'); ?> " alt="<?php echo $object['title']; ?> " class="img-responsive"> </a> </div><!-- /.thumb --> <div class="meta"> <h3 class="title"><a href="<?php echo makeLink($object['id'], $object['title'], 'series', $object['country']); ?> "><?php echo $object['title']; ?> </a></h3> <p><?php echo subString($object['description'], 300); ?> </p> </div><!-- /.meta --> </div><!-- /.ui-list-item --> <?php } ?> <?php
function show_links($link_cat, $format = '', $before = '', $after = '') { $linklist = get_links_array($link_cat); if ($format == '') { $format = "<li>%s</li>"; } if ($format == 'nolist') { $format = '%s'; } foreach ($linklist as $slug => $title) { echo sprintf($format, $before . makeLink(slugUrl($slug), $title) . $after); } }
function tile_slideshow($group, $x, $y, $width, $height, $background, $url, $images, $alts, $texts, $effect, $speed, $arrows, $labelText, $labelColor, $labelPosition, $classes) { global $scale, $spacing, $scaleSpacing, $groupSpacing; $id = str_replace(".", "_", $group . "-" . $x . "-" . $y); $tileWidth = $width * $scaleSpacing - $spacing; $tileHeight = $height * $scaleSpacing - $spacing; $marginTop = $y * $scaleSpacing + getMarginTop($group); $marginLeft = $x * $scaleSpacing + getMarginLeft($group); if (count($alts) != count($images)) { $alts = array_fill(count($alts), count($images) - count($alts), ""); } ?> <a <?php echo makeLink($url); ?> id="tileSlideshow<?php echo $id; ?> " class="tile tileSlideshow group<?php echo $group; ?> <?php echo $classes; ?> " style=" margin-top:<?php echo $marginTop; ?> px; margin-left:<?php echo $marginLeft; ?> px; width:<?php echo $tileWidth; ?> px; height:<?php echo $tileHeight; ?> px; background:<?php echo $background; ?> ;" <?php posVal($marginTop, $marginLeft, $tileWidth); ?> data-n=0> <div class='imgWrapperBack' style="width: <?php echo $tileWidth + 2; ?> px; height:<?php echo $tileHeight + 2; ?> px"><img src='<?php echo $images[0]; ?> ' alt=''/></div> <div class='imgWrapper' style="width: <?php echo $tileWidth + 2; ?> px; height:<?php echo $tileHeight + 2; ?> px"><img src='<?php echo $images[0]; ?> ' alt='<?php echo $alts[0]; ?> ' /></div> <?php if ($texts != "" && count($texts) > 0) { echo "<div class='imgText'>" . $texts[0] . "</div>"; } ?> <script type="text/javascript">slideshowTiles["tileSlideshow<?php echo $id; ?> "] = [<?php echo json_encode($images); ?> ,<?php echo json_encode($alts); ?> ,<?php echo json_encode($texts); ?> ,<?php echo '"' . $effect . '"'; ?> ,<?php echo $speed; ?> ]</script> <?php if ($arrows) { echo '<img id="sl_arrowRight" src="' . PATH_FOLDER . 'img/arrows/simpleArrowRight.png" alt="Slideshow - right"><img id="sl_arrowLeft" src="<?php echo PATH_FOLDER;?>img/arrows/simpleArrowLeft.png" alt="Slideshow - left">'; } if ($labelText != "") { if ($labelPosition == 'top') { echo "<div class='tileLabelWrapper top' style='border-top-color:" . $labelColor . ";'><div class='tileLabel top' >" . $labelText . "</div></div>"; } else { echo "<div class='tileLabelWrapper bottom'><div class='tileLabel bottom' style='border-bottom-color:" . $labelColor . ";'>" . $labelText . "</div></div>"; } } ?> </a> <?php }
<?php //调用示例 $data = $articles_class->GetList(array('id', 'rootid', 'title', 'filename', 'parentid'), '0', '8', ' rootid = 0 and id > 1 ', 'id asc'); ?> <?php if ($data) { foreach ($data as $key => $value) { ?> <li><a href="./<?php echo makeLink('articles', 'list', array('classid' => $value['id'], 'filename' => $value['filename'])); ?> "><span><?php echo cutstr($value['title'], 16); ?> </span></a></li> <?php } } unset($data, $key, $value);
<input type="submit" value="投稿する"> </p> </form> <?php while ($post = mysqli_fetch_assoc($posts)) { ?> <img src="member_picture/<?php echo h($post['picture']); ?> " width="48" height="48" alt="<?php echo h($post['name']); ?> "> <p><?php echo makeLink(h($post['message'])); echo h($post['name']); ?> <a href="index.php?res=<?php echo h($post['id']); ?> ">[Re</a>]</p> <p><a href="view.php?id=<?php echo h($post['id']); ?> "><?php echo h($post['created']); ?> </a> <?php if ($post['reply_post_id'] > 0) {
<div class="col-md-8 content-margin-top"> <?php while ($tweet = mysqli_fetch_assoc($tweets)) { ?> <!-- ここでつぶやいた内容を繰り返し表示 --> <div class="msg"> <img src="member_picture/<?php echo h($tweet['picture_path']); ?> " width="48" height="48" alt="<?php echo h($tweet['nick_name']); ?> "> <p><?php echo makeLink(h($tweet['tweet'])); ?> <span class="name"> (<?php echo h($tweet['nick_name']); ?> ) </span> [<a href="index.php?res=<?php echo h($tweet['tweet_id']); ?> ">Re</a>] </p> <p class="day"> <a href="view.php?tweet_id=<?php echo h($tweet['tweet_id']); ?> ">
echo makeLink($newestVideo[0]['id'], $newestVideo[0]['title']); ?> "> <img src="<?php echo getThumbnail($newestVideo[0]['series']['thumbnail'], 'series'); ?> " alt="<?php echo $newestVideo[0]['title']; ?> " class="img-responsive" /> <span class="fa fa-play-circle-o"></span> </a> </div><!-- /.ui-thumb --> <div class="ui-meta col-sm-7"> <h3 class="ui-title"><a href="<?php echo makeLink($newestVideo[0]['id'], $newestVideo[0]['title']); ?> " class="ui-ellipsis-2"><?php echo $newestVideo[0]['title']; ?> </a></h3> <p><?php echo getVideoDescription($newestVideo[0]); ?> </p> </div><!-- /.ui-meta --> </div><!-- /.row --> </div><!-- /.item-video --> </div><!-- /.col-sm-6 --> </div><!-- /.row --> </div><!-- /.section-line -->