public function Load_Options_Page() { # Check if the user trys to delete a template if (isset($_GET['delete']) && $this->core->Get_Template_Properties($_GET['delete'])) { # You can only delete Fancy Gallery Templates! Unlink($_GET['delete']); WP_Redirect($this->Get_Options_Page_Url(array('template_deleted' => 'true'))); } elseif (isset($_GET['delete'])) { WP_Die(I18n::t('Error while deleting: ' . HTMLSpecialChars($_GET['delete']))); } # If the Request was redirected from a "Save Options"-Post if (isset($_REQUEST['options_saved'])) { Flush_Rewrite_Rules(); } # If this is a Post request to save the options $options_saved = $this->Save_Options(); if ($options_saved) { WP_Redirect($this->Get_Options_Page_Url(array('options_saved' => 'true'))); } WP_Enqueue_Script('dashboard'); WP_Enqueue_Style('dashboard'); WP_Enqueue_Script('fancy-gallery-options-page', $this->core->base_url . '/options-page/options-page.js', array('jquery'), $this->core->version, True); WP_Enqueue_Style('fancy-gallery-options-page', $this->core->base_url . '/options-page/options-page.css'); # Remove incompatible JS Libs WP_Dequeue_Script('post'); }
function replaceSpecial($str) { $str = HTMLSpecialChars($str); $str = nl2br($str); $str = str_replace(" ", " ", $str); $str = str_replace("<? ", "< ?", $str); $str = str_replace("\n", "<br />", $str); return $str; }
/** * Function to parse the SQL * * @param string $sSQL The SQL statement to parse * @return string */ function ExecSQL($sSQL) { $fToOpen = fsockopen($this->sHostName, $this->nPort, &$errno, &$errstr, 30); if (!$fToOpen) { //contruct error string to return $sReturn = "<?xml version=\"1.0\"?>\r\n<result state=\"failure\">\r\n<error>{$errstr}</error>\r\n</result>\r\n"; } else { //construct XML to send //search and replace HTML chars in SQL first $sSQL = HTMLSpecialChars($sSQL); $sSend = "<?xml version=\"1.0\"?>\r\n<request>\r\n<connectionstring>{$this->sConnectionString}</connectionstring>\r\n<sql>{$sSQL}</sql>\r\n</request>\r\n"; //write request fputs($fToOpen, $sSend); //now read response while (!feof($fToOpen)) { $sReturn = $sReturn . fgets($fToOpen, 128); } fclose($fToOpen); } return $sReturn; }
/** * Create a view filter. Combine multiple filters together in a api_viewFilters object * * @param String $field filter to filter against * @param String $operator One of the valid operators for filtering. Changes based on the * field type. Refer to the edit view page in any record to see a list of valid operators * @param String $value The value to apply to the filter */ function __construct($field, $operator, $value) { $this->field = $field; $this->operator = $operator; $this->value = HTMLSpecialChars($value); }
/** * Helper function for parseFunc() * * @param string $theValue The value to process. * @param array $conf TypoScript configuration for parseFunc * @return string The processed value * @access private * @see parseFunc() */ public function _parseFunc($theValue, $conf) { if (!empty($conf['if.']) && !$this->checkIf($conf['if.'])) { return $theValue; } // Indicates that the data is from within a tag. $inside = 0; // Pointer to the total string position $pointer = 0; // Loaded with the current typo-tag if any. $currentTag = ''; $stripNL = 0; $contentAccum = array(); $contentAccumP = 0; $allowTags = strtolower(str_replace(' ', '', $conf['allowTags'])); $denyTags = strtolower(str_replace(' ', '', $conf['denyTags'])); $totalLen = strlen($theValue); do { if (!$inside) { if (!is_array($currentTag)) { // These operations should only be performed on code outside the typotags... // data: this checks that we enter tags ONLY if the first char in the tag is alphanumeric OR '/' $len_p = 0; $c = 100; do { $len = strcspn(substr($theValue, $pointer + $len_p), '<'); $len_p += $len + 1; $endChar = ord(strtolower(substr($theValue, $pointer + $len_p, 1))); $c--; } while ($c > 0 && $endChar && ($endChar < 97 || $endChar > 122) && $endChar != 47); $len = $len_p - 1; } else { // If we're inside a currentTag, just take it to the end of that tag! $tempContent = strtolower(substr($theValue, $pointer)); $len = strpos($tempContent, '</' . $currentTag[0]); if (is_string($len) && !$len) { $len = strlen($tempContent); } } // $data is the content until the next <tag-start or end is detected. // In case of a currentTag set, this would mean all data between the start- and end-tags $data = substr($theValue, $pointer, $len); if ($data != '') { if ($stripNL) { // If the previous tag was set to strip NewLines in the beginning of the next data-chunk. $data = preg_replace('/^[ ]*' . CR . '?' . LF . '/', '', $data); } // These operations should only be performed on code outside the tags... if (!is_array($currentTag)) { // Constants $tsfe = $this->getTypoScriptFrontendController(); $tmpConstants = $tsfe->tmpl->setup['constants.']; if ($conf['constants'] && is_array($tmpConstants)) { foreach ($tmpConstants as $key => $val) { if (is_string($val)) { $data = str_replace('###' . $key . '###', $val, $data); } } } // Short if (is_array($conf['short.'])) { $shortWords = $conf['short.']; krsort($shortWords); foreach ($shortWords as $key => $val) { if (is_string($val)) { $data = str_replace($key, $val, $data); } } } // stdWrap if (is_array($conf['plainTextStdWrap.'])) { $data = $this->stdWrap($data, $conf['plainTextStdWrap.']); } // userFunc if ($conf['userFunc']) { $data = $this->callUserFunction($conf['userFunc'], $conf['userFunc.'], $data); } // Makelinks: (Before search-words as we need the links to be generated when searchwords go on...!) if ($conf['makelinks']) { $data = $this->http_makelinks($data, $conf['makelinks.']['http.']); $data = $this->mailto_makelinks($data, $conf['makelinks.']['mailto.']); } // Search Words: if ($tsfe->no_cache && $conf['sword'] && is_array($tsfe->sWordList) && $tsfe->sWordRegEx) { $newstring = ''; do { $pregSplitMode = 'i'; if (isset($tsfe->config['config']['sword_noMixedCase']) && !empty($tsfe->config['config']['sword_noMixedCase'])) { $pregSplitMode = ''; } $pieces = preg_split('/' . $tsfe->sWordRegEx . '/' . $pregSplitMode, $data, 2); $newstring .= $pieces[0]; $match_len = strlen($data) - (strlen($pieces[0]) + strlen($pieces[1])); $inTag = false; if (strstr($pieces[0], '<') || strstr($pieces[0], '>')) { // Returns TRUE, if a '<' is closer to the string-end than '>'. // This is the case if we're INSIDE a tag (that could have been // made by makelinks...) and we must secure, that the inside of a tag is // not marked up. $inTag = strrpos($pieces[0], '<') > strrpos($pieces[0], '>'); } // The searchword: $match = substr($data, strlen($pieces[0]), $match_len); if (trim($match) && strlen($match) > 1 && !$inTag) { $match = $this->wrap($match, $conf['sword']); } // Concatenate the Search Word again. $newstring .= $match; $data = $pieces[1]; } while ($pieces[1]); $data = $newstring; } } $contentAccum[$contentAccumP] .= $data; } $inside = 1; } else { // tags $len = strcspn(substr($theValue, $pointer), '>') + 1; $data = substr($theValue, $pointer, $len); if (StringUtility::endsWith($data, '/>') && !StringUtility::beginsWith($data, '<link ')) { $tagContent = substr($data, 1, -2); } else { $tagContent = substr($data, 1, -1); } $tag = explode(' ', trim($tagContent), 2); $tag[0] = strtolower($tag[0]); if ($tag[0][0] === '/') { $tag[0] = substr($tag[0], 1); $tag['out'] = 1; } if ($conf['tags.'][$tag[0]]) { $treated = false; $stripNL = false; // in-tag if (!$currentTag && !$tag['out']) { // $currentTag (array!) is the tag we are currently processing $currentTag = $tag; $contentAccumP++; $treated = true; // in-out-tag: img and other empty tags if (preg_match('/^(area|base|br|col|hr|img|input|meta|param)$/i', $tag[0])) { $tag['out'] = 1; } } // out-tag if ($currentTag[0] === $tag[0] && $tag['out']) { $theName = $conf['tags.'][$tag[0]]; $theConf = $conf['tags.'][$tag[0] . '.']; // This flag indicates, that NL- (13-10-chars) should be stripped first and last. $stripNL = (bool) $theConf['stripNL']; // This flag indicates, that this TypoTag section should NOT be included in the nonTypoTag content. $breakOut = $theConf['breakoutTypoTagContent'] ? 1 : 0; $this->parameters = array(); if ($currentTag[1]) { $params = GeneralUtility::get_tag_attributes($currentTag[1]); if (is_array($params)) { foreach ($params as $option => $val) { $this->parameters[strtolower($option)] = $val; } } } $this->parameters['allParams'] = trim($currentTag[1]); // Removes NL in the beginning and end of the tag-content AND at the end of the currentTagBuffer. // $stripNL depends on the configuration of the current tag if ($stripNL) { $contentAccum[$contentAccumP - 1] = preg_replace('/' . CR . '?' . LF . '[ ]*$/', '', $contentAccum[$contentAccumP - 1]); $contentAccum[$contentAccumP] = preg_replace('/^[ ]*' . CR . '?' . LF . '/', '', $contentAccum[$contentAccumP]); $contentAccum[$contentAccumP] = preg_replace('/' . CR . '?' . LF . '[ ]*$/', '', $contentAccum[$contentAccumP]); } $this->data[$this->currentValKey] = $contentAccum[$contentAccumP]; $newInput = $this->cObjGetSingle($theName, $theConf, '/parseFunc/.tags.' . $tag[0]); // fetch the content object $contentAccum[$contentAccumP] = $newInput; $contentAccumP++; // If the TypoTag section if (!$breakOut) { $contentAccum[$contentAccumP - 2] .= $contentAccum[$contentAccumP - 1] . $contentAccum[$contentAccumP]; unset($contentAccum[$contentAccumP]); unset($contentAccum[$contentAccumP - 1]); $contentAccumP -= 2; } unset($currentTag); $treated = true; } // other tags if (!$treated) { $contentAccum[$contentAccumP] .= $data; } } else { // If a tag was not a typo tag, then it is just added to the content $stripNL = false; if (GeneralUtility::inList($allowTags, $tag[0]) || $denyTags != '*' && !GeneralUtility::inList($denyTags, $tag[0])) { $contentAccum[$contentAccumP] .= $data; } else { $contentAccum[$contentAccumP] .= HTMLSpecialChars($data); } } $inside = 0; } $pointer += $len; } while ($pointer < $totalLen); // Parsing nonTypoTag content (all even keys): reset($contentAccum); $contentAccumCount = count($contentAccum); for ($a = 0; $a < $contentAccumCount; $a++) { if ($a % 2 != 1) { // stdWrap if (is_array($conf['nonTypoTagStdWrap.'])) { $contentAccum[$a] = $this->stdWrap($contentAccum[$a], $conf['nonTypoTagStdWrap.']); } // userFunc if ($conf['nonTypoTagUserFunc']) { $contentAccum[$a] = $this->callUserFunction($conf['nonTypoTagUserFunc'], $conf['nonTypoTagUserFunc.'], $contentAccum[$a]); } } } return implode('', $contentAccum); }
/** * function just for debugging. It prints an array as a table * @ingroup debug * * @param array_in the array that should be displayed * @return a html-table that represents the submitted array */ function viewArray($array_in) { if (is_array($array_in)) { $result = "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bgcolor=\"white\">"; if (!count($array_in)) { $result .= "<tr><td><font face=\"Verdana, Arial\" size=\"1\"><b>" . HTMLSpecialChars("EMPTY!") . "</b></font></td></tr>"; } while (list($key, $val) = each($array_in)) { $result .= "<tr><td><font face=\"Verdana,Arial\" size=\"1\">" . HTMLSpecialChars((string) $key) . "</font></td><td>"; if (is_array($array_in[$key])) { $result .= $this->viewArray($array_in[$key]); } else { $result .= "<font face=\"Verdana,Arial\" size=\"1\" color=\"red\">" . nl2br(HTMLSpecialChars((string) $val)) . "<br /></font>"; } $result .= "</td></tr>"; } $result .= "</table>"; } else { return false; } return $result; }
<INPUT type="submit" class="12px" value="<?Print $text_show;?>"> </TD></FORM> </TR><TR> <?IF($VA_setup['userlog_id']){?><TD align="right" class="b bg_light" nowrap><?Print $text_id; PrintOrderBy("id");?></TD><?}?> <?IF($VA_setup['userlog_nick']){?><TD class="b bg_light" nowrap><?Print $text_nick; PrintOrderBy("nick");?></TD><?}?> <?IF($VA_setup['userlog_ip']){?><TD class="b bg_light" nowrap><?Print $text_ip; PrintOrderBy("ip");?></TD><?}?> <?IF($VA_setup['userlog_date']){?><TD class="b bg_light" nowrap><?Print $text_date; PrintOrderBy("date");?></TD><?}?> <?IF($VA_setup['userlog_action']){?><TD class="b bg_light" nowrap><?Print $text_action; PrintOrderBy("action");?></TD><?}?> <?IF($VA_setup['userlog_info']){?><TD class="b bg_light" nowrap><?Print $text_info; PrintOrderBy("info");?></TD><?}?> </TR> <? IF($total > 0) { $result = $DB_hub->Query($query); WHILE($row = $result->Fetch_Assoc()) { $row['nick'] = HTMLSpecialChars($row['nick']); ?> <TR> <?IF($VA_setup['userlog_id']){?><TD align="right" class="bg_light"><?Print $row['id'];?></TD><?}?> <?IF($VA_setup['userlog_nick']){?><TD class="bg_light"><?Print $row['nick'];?></TD><?}?> <?IF($VA_setup['userlog_ip']){?><TD class="bg_light"><?Print $row['ip'];?></TD><?}?> <?IF($VA_setup['userlog_date']){?><TD class="bg_light"><?Print Date($VA_setup['timedate_format'], $row['date']);?></TD><?}?> <?IF($VA_setup['userlog_action']) {?> <TD class="bg_light"> <?$action = "text_action_".$row['action']; Print $$action;?> </TD> <?}?> <?IF($VA_setup['userlog_info']) {?> <TD class="bg_light"> <?$info = "text_info_".$row['info'];
$info_num = 3; $pagenum = ceil($total / $info_num); if ($page > $pagenum || $page == 0) { echo "Error : Can Not Found The page ."; exit; } $offset = ($page - 1) * $info_num; $info = mysql_query("select * from member limit {$offset},{$info_num}"); while ($it = mysql_fetch_array($info)) { echo "账号: " . HTMLSpecialChars($it['member_account']) . "<br>"; //防sql注入 echo "姓名: " . HTMLSpecialChars($it['member_name']) . "<br>"; echo "性别: " . HTMLSpecialChars($it['sex']) . "<br>"; echo "学号: " . HTMLSpecialChars($it['schoolnumber']) . "<br>"; echo "手机号码:" . HTMLSpecialChars($it['phonenumber']) . "<br>"; echo "电子邮箱:" . HTMLSpecialChars($it['email']) . "<hr>"; } if ($page > 1) { echo "<a href='member_index.php?page=" . ($page - 1) . "'>前一页</a> "; } else { echo "前一页  "; } for ($i = 1; $i <= $pagenum; $i++) { //数字页面 $show = $i != $page ? "<a href='member_index.php?page=" . $i . "'>" . $i . "</a>" : "{$i}"; echo $show . " "; } if ($page < $pagenum) { echo "<a href='member_index.php?page=" . ($page + 1) . "'>后一页</a>"; } else { echo "后一页";
<p> <label for="<?php echo $this->Field_Name('thumb_height'); ?> "><?php echo $this->t('Thumbnail height:'); ?> </label> <input type="text" name="<?php echo $this->Field_Name('thumb_height'); ?> " id="<?php echo $this->Field_Name('thumb_height'); ?> " value="<?php echo HTMLSpecialChars($this->Get_Gallery_Meta('thumb_height')); ?> " size="4" />px </p> <p> <input type="checkbox" name="<?php echo $this->Field_Name('thumb_grayscale'); ?> " id="<?php echo $this->Field_Name('thumb_grayscale'); ?> " value="yes" <?php Checked($this->Get_Gallery_Meta('thumb_grayscale'), 'yes'); ?> />
<td><label for="excerpt_image_number"><?php echo $this->t('Images per Excerpt:'); ?> </label></td> <td><input type="text" name="excerpt_image_number" id="excerpt_image_number" value="<?php echo HTMLSpecialChars($this->Get_Option('excerpt_image_number')); ?> " size="4"></td> </tr> </tr> <tr> <td><label for="excerpt_thumb_width"><?php echo $this->t('Thumbnail width:'); ?> </label></td> <td><input type="text" name="excerpt_thumb_width" id="excerpt_thumb_width" value="<?php echo HTMLSpecialChars($this->Get_Option('excerpt_thumb_width')); ?> " size="4">px</td> </tr> <tr> <td><label for="excerpt_thumb_height"><?php echo $this->t('Thumbnail height:'); ?> </label></td> <td><input type="text" name="excerpt_thumb_height" id="excerpt_thumb_height" value="<?php echo HTMLSpecialChars($this->Get_Option('excerpt_thumb_height')); ?> " size="4">px</td> </tr> </table>
<p><?php echo $this->t('Please choose a template to display the excerpt of this gallery.'); ?> </p> <?php foreach ($this->Get_Template_Files() as $name => $properties) { ?> <p> <input type="radio" name="<?php echo $this->Field_Name('excerpt_template'); ?> " id="excerpt_template_<?php echo Sanitize_Title($properties['file']); ?> " value="<?php echo HTMLSpecialChars($properties['file']); ?> " <?php Checked($this->Get_Gallery_Meta('excerpt_template'), $properties['file']); ?> <?php Checked(!$this->Get_Gallery_Meta('excerpt_template') && $properties['file'] == $this->Get_Default_Template()); ?> /> <label for="excerpt_template_<?php echo Sanitize_Title($properties['file']); ?> "> <?php if (empty($properties['name'])) {
<tr> <td class='text_grey'> <table width="100%" border="0" cellspacing="6" cellpadding="6"> <?php foreach ($e_templates as $key => $value) { ?> <tr> <td class='text_grey'> <b><?php $et = "email_template_" . $value['email_id']; echo $BL->props->lang[$et]; ?> </b><br /> <pre><?php $et = "template_default_" . $value['email_id']; echo HTMLSpecialChars($BL->props->lang[$et]); ?> </pre> </td> </tr> <?php } ?> </table> </td> </tr> </table> </div> </table> </div>
// Read base url $base_url = SPrintF('%s/%s', Get_Bloginfo('wpurl'), SubStr(RealPath(DirName(__FILE__)), Strlen(ABSPATH))); $base_url = Str_Replace("\\", '/', $base_url); // Windows Workaround ?> <div class="gallery fancy-gallery <?php echo BaseName(__FILE__, '.php'); ?> " id="gallery_<?php echo $this->gallery->id; ?> "><?php foreach ($this->gallery->images as $image) { // Build <img> Tags $img_code = '<img'; foreach ($image->attributes as $attribute => $value) { $img_code .= SPrintF(' %s="%s"', $attribute, HTMLSpecialChars(Strip_Tags($value))); } $img_code .= '>'; // Build FB share button $fb_code = SPrintF('<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>', SPrintF('https://www.facebook.com/sharer/sharer.php?u=%s', $image->href), HTMLSpecialChars($image->title), $this->gallery->attributes->link_class, SPrintF('<img src="%s/facebook-button.png" alt="Share it" height="20">', $base_url)); // Build Pintarest share button $pinterest_code = SPrintF('<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>', SPrintF('https://pinterest.com/pin/create/button/?url=%1$s&media=%2$s', Get_Permalink($this->gallery->id), $image->href), HTMLSpecialChars($image->title), $this->gallery->attributes->link_class, SPrintF('<img src="%s/pinterest-button.png" alt="Pin it" height="20">', $base_url)); // Build Twitter share button $twitter_code = SPrintF('<a href="%1$s" title="%2$s" class="%3$s" target="_blank">%4$s</a>', SPrintF('https://twitter.com/share?url=%1$s', $image->href), HTMLSpecialChars($image->title), $this->gallery->attributes->link_class, SPrintF('<img src="%s/twitter-button.png" alt="Tweet it" height="20">', $base_url)); // Build <a> Tag for the image $link_code = SPrintF('<a href="%1$s" title="%2$s" class="%3$s">%4$s</a>', $image->href, HTMLSpecialChars(SPrintF('%s %s %s %s', $image->title, $fb_code, $pinterest_code, $twitter_code)), $this->gallery->attributes->link_class, $img_code); echo $link_code; } ?> </div>
<? IF($_POST['submit_lang']) { Print "submit_lang provedeno"; $lang = $_POST['mlanguage']; UnSet($_POST['submit_lang']); UnSet($_POST['lang']); WHILE(List($var, $val) = Each($_POST)) { $val = VA_Escape_String($DB_hub, $val); $val = HTMLSpecialChars($val); $DB_hub->Query("REPLACE INTO va_languages (language, var, val) VALUES ('".$lang."', '".$var."', '".Trim($val)."')"); } } $result = $DB_hub->Query("SELECT var, val FROM va_languages WHERE language LIKE 'en'"); ?> <FORM action="index.php?q=lang_center" method="post"> <TABLE class="b1 fs10px"> <TR> <TD class="bg_light right" colspan=3><INPUT class="w75px" name="submit_lang" type="submit" value="<?Print $text_send;?>"></TD> </TR><TR> <TD class="b bg_light right"> <?Print $text_language;?> : </TD> <TD class="bg_light"><INPUT class="w300px" name="mlanguage" type="text" value="<?Print LANG;?>"></TD> <TD class="bg_light"> </TD> </TR><TR> <TD class="b bg_light right"> </TD> <TD class="b bg_light"> </TD> <TD class="b bg_light"> </TD> </TR><TR> <TD class="b bg_light right"> <?Print $text_var;?> : </TD>
<?IF($VA_setup['kicklist_ip']){?><TD class="b bg_light" nowrap><?Print $text_ip; PrintOrderBy("ip");?></TD><?}?> <?IF($VA_setup['kicklist_host']){?><TD class="b bg_light" nowrap><?Print $text_host; PrintOrderBy("host");?></TD><?}?> <?IF($VA_setup['kicklist_share_size']){?><TD class="b bg_light" nowrap><?Print $text_share_size; PrintOrderBy("share_size");?></TD><?}?> <?IF($VA_setup['kicklist_email']){?><TD class="b bg_light" nowrap><?Print $text_email; PrintOrderBy("email");?></TD><?}?> <?IF($VA_setup['kicklist_reason']){?><TD class="b bg_light" nowrap><?Print $text_reason; PrintOrderBy("reason");?></TD><?}?> <?IF($VA_setup['kicklist_op']){?><TD class="b bg_light" nowrap><?Print $text_op; PrintOrderBy("op");?></TD><?}?> <?IF($VA_setup['kicklist_is_drop']){?><TD class="b bg_light" nowrap><?Print $text_is_drop; PrintOrderBy("is_drop");?></TD><?}?> </TR> <? IF($total > 0) { $result = $DB_hub->Query($query); WHILE($row = $result->Fetch_Assoc()) { $row['nick'] = HTMLSpecialChars($row['nick']); $row['op'] = HTMLSpecialChars($row['op']); $row['reason'] = HTMLSpecialChars($row['reason']); $info = $text_nick." : ".$row['nick']."<BR>"; $info .= $text_time." : ".Date($VA_setup['timedate_format'], $row['time'])."<BR>"; $info .= $text_ip." : ".$row['ip']."<BR>"; $info .= $text_host." : ".$row['host']."<BR>"; $info .= $text_share_size." : ".Number_Format($row['share_size'])." (".RoundShare($row['share_size']).")<BR>"; $info .= $text_email." : ".$row['email']."<BR>"; $info .= $text_op." : ".$row['op']."<BR>"; IF($row['is_drop']) $info .= $text_is_drop." : ".$text_yes."<BR>"; ELSE $info .= $text_is_drop." : ".$text_no."<BR>"; $info .= $text_reason." :<BR>".$row['reason']; ?> <TR onmouseover="JavaScript: return escape('<?Print AddSlashes($info);?>');">
<a href="<?php echo $thumb->href; ?> " title="<?php echo HTMLSpecialChars($thumb->title); ?> " class="<?php echo $this->gallery->attributes->link_class; ?> "> <img <?php foreach ($thumb->attributes as $attribute => $value) { PrintF('%s="%s" ', $attribute, HTMLSpecialChars(Strip_Tags($value))); } ?> > </a> <?php foreach ($this->gallery->images as $image) { ?> <a href="<?php echo $image->href; ?> " title="<?php echo HTMLSpecialChars($image->title); ?> "></a> <?php } ?> </div>
function showWire($id) { $results = $this->dbc->getAll("select * from results where id={$id}", NULL, DB_FETCHMODE_ASSOC); #$wire = preg_replace("/>/",">\n",$results[0]['wire']); $wire = $results[0]['wire']; if ($this->html) { print "<pre>"; } echo "\n" . HTMLSpecialChars($wire); if ($this->html) { print "</pre>"; } print "\n"; }
<?php define('MQ_SERVER_ADDR', 'localhost'); define('MQ_SERVER_PORT', 25575); define('MQ_SERVER_PASS', 'lolrcontest'); define('MQ_TIMEOUT', 2); require __DIR__ . '/MinecraftRcon.class.php'; echo "<pre>"; try { $Rcon = new MinecraftRcon(); $Rcon->Connect(MQ_SERVER_ADDR, MQ_SERVER_PORT, MQ_SERVER_PASS, MQ_TIMEOUT); $Data = $Rcon->Command("say Hello from xPaw's minecraft rcon implementation."); if ($Data === false) { throw new MinecraftRconException("Failed to get command result."); } else { if (StrLen($Data) == 0) { throw new MinecraftRconException("Got command result, but it's empty."); } } echo HTMLSpecialChars($Data); } catch (MinecraftRconException $e) { echo $e->getMessage(); } $Rcon->Disconnect();
function Form($settings) { // Load options $this->load_options($settings); unset($settings); ?> <p> <label for="<?php echo $this->Get_Field_Id('title'); ?> "><?php echo $this->t('Title'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('title')); ?> " /><br /> <small><?php echo $this->t('Leave blank to use the widget default title.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('limit'); ?> "><?php echo $this->t('Number of Images'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('limit'); ?> " name="<?php echo $this->get_field_name('limit'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('limit')); ?> " size="4" /><br /> <small><?php echo $this->t('Leave blank (or "0") to show all.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('link_target'); ?> "><?php echo $this->t('Link target'); ?> </label>: <select name="<?php echo $this->get_field_name('link_target'); ?> " id="<?php echo $this->Get_Field_Id('link_target'); ?> "> <option value="file" <?php Selected($this->Get_option('link_target'), 'file'); ?> ><?php echo $this->t('Fullsize Image'); ?> </option> <option value="gallery" <?php Selected($this->Get_option('link_target'), 'gallery'); ?> ><?php echo $this->t('Image Gallery'); ?> </option> </select> </p> <p> <label for="<?php echo $this->Get_Field_Id('thumb_width'); ?> "><?php echo $this->t('Thumbnail width:'); ?> </label> <input type="text" name="<?php echo $this->get_field_name('thumb_width'); ?> " id="<?php echo $this->Get_Field_Id('thumb_width'); ?> " value="<?php echo HTMLSpecialChars($this->Get_Option('thumb_width')); ?> " size="4" />px </p> <p> <label for="<?php echo $this->Get_Field_Id('thumb_height'); ?> "><?php echo $this->t('Thumbnail height:'); ?> </label> <input type="text" name="<?php echo $this->get_field_name('thumb_height'); ?> " id="<?php echo $this->Get_Field_Id('thumb_height'); ?> " value="<?php echo HTMLSpecialChars($this->Get_Option('thumb_height')); ?> " size="4" />px </p> <p> <input type="checkbox" name="<?php echo $this->get_field_name('thumb_grayscale'); ?> " id="<?php echo $this->Get_Field_Id('thumb_grayscale'); ?> " value="yes" <?php Checked($this->Get_Option('thumb_grayscale'), 'yes'); ?> /> <label for="<?php echo $this->Get_Field_Id('thumb_grayscale'); ?> "><?php echo $this->t('Convert thumbnails to grayscale.'); ?> </label> </p> <p> <input type="checkbox" name="<?php echo $this->get_field_name('thumb_negate'); ?> " id="<?php echo $this->Get_Field_Id('thumb_negate'); ?> " value="yes" <?php Checked($this->Get_Option('thumb_negate'), 'yes'); ?> /> <label for="<?php echo $this->Get_Field_Id('thumb_negate'); ?> "><?php echo $this->t('Negate the thumbnails.'); ?> </label> </p> <p> <label for="<?php echo $this->get_field_id('exclude'); ?> "><?php _e('Exclude:'); ?> </label> <input type="text" value="<?php echo HTMLSpecialChars($this->get_option('exclude')); ?> " name="<?php echo $this->get_field_name('exclude'); ?> " id="<?php echo $this->get_field_id('exclude'); ?> " class="widefat" /><br /> <small><?php echo $this->t('Term IDs, separated by commas.'); ?> </small> </p> <h3><?php echo $this->t('Template'); ?> </h3> <p><?php echo $this->t('Please choose a template to display this widget.'); ?> </p> <?php foreach ($this->fancy_gallery->Get_Template_Files() as $name => $properties) { ?> <p> <input type="radio" name="<?php echo $this->get_field_name('template'); ?> " id="<?php echo Sanitize_Title($properties['file']); ?> " value="<?php echo HTMLSpecialChars($properties['file']); ?> " <?php Checked($this->Get_Option('template'), $properties['file']); ?> <?php Checked(!$this->Get_Option('template') && $properties['file'] == $this->fancy_gallery->Get_Default_Template()); ?> /> <label for="<?php echo Sanitize_Title($properties['file']); ?> "> <?php if (empty($properties['name'])) { ?> <em><?php echo $properties['file']; ?> </em> <?php } else { ?> <strong><?php echo $properties['name']; ?> </strong> <?php } ?> </label> <?php if ($properties['description']) { ?> <br /><?php echo $properties['description']; } ?> </p> <?php } }
// uniLETIM - LETS & TimeBank announcing and accounting system // Copyright (C) 2003 PRIESTOR o.z., Ondrej Vegh, Robert Zelnik, Michal Jurco // This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (in Slovak Republic // in the terms of the Vseobecna zverejnovacia licencia GNU) as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or visit http://www.gnu.sk/ for Vseobecna zverejnovacia licencia GNU //odstraníme nebezpeèné znaky $zaco = SubStr($zacof, 0, 1500); //bereme pouze 1500 znakù $zaco = Trim($zaco); //odstraníme mezery ze zaèátku a konce øetìzce $zaco = HTMLSpecialChars($zaco); //odstraníme nebezpeèné znaky $zaco = Str_Replace("\r\n", " <BR> ", $zaco); //nahradíme konce øádkù na tagy <BR> $zacof = WordWrap($zaco, 90, "\n", 1); //rozdìlíme dlouhá slova $kedyf = Date("Y-m-d"); //kedy @($tsi = time()); include "./config.php"; $kolkof = Str_Replace(",", ".", $kolkof); $kolkof = abs($kolkof); $add = MySQL_Query("INSERT INTO uniletim_services VALUES ('', '{$ktof}', '{$komuf}', '{$kedyf}', '{$zacof}', '{$kolkof}', '{$tsi}', '{$lgr}')") or die($query_error1); //vložíme zprávu $ads = MySQL_Query("select * from uniletim_services where ser_time like '{$tsi}' AND ul_group = '{$sess['4']}'") or die($query_error2); $adk = mysql_fetch_row($ads);
<TD class="b bg_light"><?Print $text_val; PrintOrderBy("val");?></TD> <TD class="b bg_light"><?Print $text_vtype;?></TD> <TD class="b bg_light"><?Print $text_help;?></TD> <TD class="b bg_light"><?Print $text_applies;?></TD> </TR> <? IF($total > 0) { $setuphelp = $DB_hub->Query("SELECT * FROM setuphelp"); $result = $DB_hub->Query($query); WHILE($row = $result->Fetch_Assoc()) { $row['val'] = nl2br(HTMLSpecialChars($row['val'])); WHILE($help = $setuphelp->Fetch_Assoc()) { IF($help['var'] == $row['var']) { $help['help'] = nl2br(HTMLSpecialChars($help['help'])); BREAK; } } $setuphelp->Data_Seek(0); $class = TRUE; IF($help['vtype'] == "class") { IF($row['var'] == "delete_class") { $delete = FetchClass($VA_setup['delete_class']); IF(!$delete[1] && !$delete[2] && !$delete[3] && !$delete[4] && !$delete[5] && !$delete[10]) {$class = FALSE;} } ELSEIF($row['var'] == "disable_class") { $disable = FetchClass($VA_setup['disable_class']); IF(!$delete[1] && !$disable[2] && !$disable[3] && !$disable[4] && !$disable[5] && !$disable[10])
function FlushForm($returnTheForm = false) { $handle = null; // output handler // is there a oncorrect or onsaved function ? if (!$this->OnCorrect && !$this->OnSaved) { $this->error("You didn't specify a 'commit after form' function!", E_USER_ERROR, __FILE__, __LINE__); } elseif (!$this->OnCorrect && !$this->useDB) { $this->error("You are using the function OnSaved but you don't use the database option! Use OnCorrect instead!", E_USER_ERROR, __FILE__, __LINE__); } // errors welke zijn voorgekomen in een var zetten $errors =& catchErrors(); $errmsg = ''; foreach ($errors as $error) { $errmsg .= "<b>Error:</b> (" . basename($error['err_file']) . ":" . $error['err_line'] . ") " . $error['err_text'] . "<br />\n"; } // look if there are class errors if ($this->classError) { $this->form = "<h3>Error!</h3>\n" . $this->classError; $handle = false; // is the form a editform ? (if so, is the user authorised??) } elseif ($this->editForm && !$this->permitEdit) { $this->form = "<h3>Error!</h3>\n" . $this->_edit . "<br /><br /><a href='javascript:history.back(1)'>" . $this->_back . "</a>\n"; $handle = false; } else { // if the form is posted and there are no errors if (!$this->formErrors && $this->posted) { // is a confirmation needed and not posted yet ? if (is_array($this->confirm) && $this->Value("__confirmation__") == '') { return $this->ConfirmForm($returnTheForm); } // close all borders while ($this->fieldSetCounter > 0) { $this->BorderStop(); } // look if the fieldnames are known, otherwise, get them... if (!count($this->dbFields) && $this->useDB) { $this->getTableFields(); } $fieldValues = array(); // before we generate a query, make an array with the fields and there values foreach ($this->fieldNames as $field) { if (!empty($field) && !in_array($field, $this->ignoreFields)) { $fieldValues[$field] = $this->value($field); } } // save the filename, but do not upload yet.. first save data.. foreach ($this->uploadFields as $field => $config) { if ($fn = $this->GetFilename($this->Value($field), $config)) { $this->AddValue($field, $fn); } else { $this->IgnoreFields[] = $field; } } // but the values enterd by the user (by using addvalue) into the array foreach ($this->addValues as $field => $value) { $fieldValues[$field] = $value; } // call the oncorrect function if ($this->OnCorrect) { if (!$this->OnSaved) { $this->uploadFiles($fieldValues); } $handle = $this->callUserFunction($this->OnCorrect, $fieldValues); } // again, put the values enterd by the user (by using addvalue) into the array // (it's possible the user entered some values in the oncorrect function) foreach ($this->addValues as $field => $value) { $fieldValues[$field] = $value; } // make the values ready for the query if (is_array($fieldValues)) { foreach ($fieldValues as $field => $value) { // if the field is not an upload field ... (the value can be an manual entered value!) if (!$this->arrayKeyExists($field, $this->uploadFields) || $this->arrayKeyExists($field, $this->addValues)) { $value = is_array($value) ? implode(", ", $value) : $value; $queryValues[$field] = !in_array($field, $this->SQLFields) ? "'" . mysql_escape_string($value) . "'" : $value; } } } // make the query (update or insert) but check if there are values if ($this->editForm && isset($queryValues)) { // make the update query $query = "UPDATE {$this->dbTable} SET \n"; foreach ($queryValues as $field => $value) { // check if the field exists in the table if ($this->arrayKeyExists($field, $this->dbFields)) { $query .= "{$field} = {$value}, \n"; } } // remove the last ", \n" ans put the WHERE part at the end $query = substr($query, 0, -3) . " WHERE " . $this->getWhereClause(); } elseif (isset($queryValues)) { $fields = ''; $values = ''; foreach ($queryValues as $field => $value) { // check if the field exists in the table if ($this->arrayKeyExists($field, $this->dbFields)) { $fields .= "{$field}, \n"; $values .= "{$value}, \n"; } } if (!strlen($fields) && !strlen($values)) { $query = false; } else { // generate the query $query = "INSERT INTO {$this->dbTable} (\n" . substr($fields, 0, -3) . ") VALUES (\n" . substr($values, 0, -3) . ")"; } } else { $query = false; } // run the query //die($query); // <-- for debugging if ($query) { $sql = $this->query($query, __FILE__, __LINE__); } // get the record id $this->recordId = $this->editForm ? $this->editId[0] : (isset($query) && $this->useDB ? mysql_insert_id() : "Database functions are not used..."); // run the onSaved function if ($this->OnSaved) { $this->uploadFiles($fieldValues); if ($query === false || !$this->useDB) { $this->error("You are using the function OnSaved but you don't use the database option! Use OnCorrect instead!", E_USER_WARNING, __FILE__, __LINE__); } else { $handle = $this->callUserFunction($this->OnSaved, $this->recordId, $fieldValues); } } // if there are errors or the form isnt posted yet, show the form } else { $handle = false; } // get the form and table tags... $this->form = $this->getForm($this->form); // set the forcus if ($this->focusField) { $field = str_replace('[]', '', $this->focusField); if (in_array($field, $this->fieldNames)) { $this->form .= "<script type=\"text/javascript\">\n" . "<!-- // hide javascript for older browsers \n" . "document.forms['{$this->formName}'].elements['{$field}'].focus();\n" . " //-->\n" . "</script>\n"; } else { $this->error("Can't put focus on the field {$field} because it's unknown!", E_USER_WARNING, __FILE__, __LINE__); } } // javascript for the listfields $javascript = ''; if (count($this->ListFields) > 0) { $javascript .= "function changeValue(prefix, install) {\n" . " // set the fields\n" . " var FromField = document.forms['{$this->formName}'].elements[prefix+(install?\"_ListOff\":\"_ListOn\")];\n" . " var ToField = document.forms['{$this->formName}'].elements[prefix+(install?\"_ListOn\":\"_ListOff\")];\n\n" . " // is a value selected?\n" . " if(FromField.value != \"\") {\n" . " // get the number of values from the selected list\n" . " var len = ToField.options.length;\n\n" . " // remove empty options\n" . " for(i = 0; i < len; i++ ) {\n" . " if(ToField.options[i].value == '') ToField.options[i] = null\n" . " }\n" . " // add the new option\n" . " len = ToField.options.length;\n" . " ToField.options[len] = new Option(FromField.options[FromField.selectedIndex].text);\n" . " ToField.options[len].value = FromField.options[FromField.selectedIndex].value;\n" . " ToField.options[len].selected = true;\n\n" . " // delete the option from the 'old' list\n" . " FromField.options[FromField.selectedIndex] = null;\n" . " FromField.focus();\n" . " }\n\n" . " // update the hidden field which contains the selected values\n" . " var InstalledVars = \" \";\n" . " var Installed = document.forms['{$this->formName}'].elements[prefix+'_ListOn'];\n\n" . " for(i = 0; i < Installed.options.length; i++) {\n" . " InstalledVars += Installed.options[i].value + \", \";\n" . " }\n" . " document.forms['{$this->formName}'].elements[prefix+'_Value'].value = InstalledVars;\n" . "}\n"; } // if a upload field is used, put the javascript in the form if (count($this->uploadFields)) { $javascript .= "function checkUpload(elem, ext) {\n" . " var types = ext.split(' ');\n" . " var fp = elem.value.split('.');\n" . " var extension = fp[fp.length-1].toLowerCase();\n" . " for(var i = 0; i < types.length; i++ ) {\n" . " if(types[i] == extension) return true;\n" . " }\n" . " var message = \"" . HTMLSpecialChars($this->_uploadType) . "\"\n" . " message = message.replace('%s', ext);\n" . " alert(message);\n" . " return false;\n" . "}\n"; } // if isset some javascript, put it into these tags (javascript open and close tags) $javascript = !empty($javascript) ? "\n" . "<!-- \n" . " NOTE: This form is automaticly generated by FormHandler.\n" . " See for more info: http://www.FormHandler.nl\n" . "-->\n" . "<!-- required javascript for the form -->\n" . "<script type=\"text/javascript\">\n" . "<!-- // hide javascript for older browsers \n" . $javascript . " //-->\n" . "</script>\n" . "<!-- /required javascript for the form -->\n\n" : ""; } // reset the original error_handler if (!is_null($this->orgErrorHandler)) { set_error_handler($this->orgErrorHandler); } // return or print the form... if (is_null($handle)) { $handle = true; } if (!$handle) { if (!isset($javascript)) { $javascript = ''; } if ($returnTheForm) { return $errmsg . $javascript . $this->form; } else { echo $errmsg . $javascript . $this->form; } } else { $handle = !is_string($handle) ? '' : $handle; if ($returnTheForm) { return $errmsg . $handle; } else { echo $errmsg . $handle; } } }
public function replaceSpecialChar($C_char) { $C_char = HTMLSpecialChars($C_char); //将特殊字元转成 HTML 格式 $C_char = nl2br($C_char); //使用nl2br内置函数将回车符替换为<br> $C_char = str_replace(" ", "", $C_char); //将" "替换为" "空格 return $C_char; //返回处理结果 }
ELSEIF($row['status'] == 1) {Print $text_registered;} ELSEIF($row['status'] == 5) {Print $text_refused;} ELSE {Print $text_unbanned;}?> </TD> <TD class="b bg_light right"> <?Print $text_nick;?> : </TD> <TD class="bg_light"> <?Print $row['nick'];?> </TD> <TD class="b bg_light right"> <?Print $text_ip;?> : </TD> <TD class="bg_light"> <?Print $row['ip'];?> </TD> <TD class="b bg_light right"> <?Print $text_date;?> : </TD> <TD class="bg_light"> <?Print Date($VA_setup['timedate_format'], $row['time']);?> </TD> </TR><TR> <TD class="b bg_light right top"> <?Print $text_comment;?> : </TD> <TD class="bg_light" colspan=7> <?Print $row['comment'];?> </TD> </TR><TR> <TD class="b bg_light right"> <?Print $text_answer;?> : </TD> <TD class="bg_light" colspan=7> <?Print nl2br(HTMLSpecialChars($row['answer']));?> </TD> </TR><TR> <TD class="bg_light right" colspan=8><INPUT class="w75px" name="delete" type="submit" value="<?Print $text_delete;?>"></TEXTAREA></TD> </TR> </TABLE> <? } ELSE { // Unban request form ?> <FORM action="index.php?<?Print $_SERVER['QUERY_STRING'];?>" method="post"> <TABLE class="b1 fs10px"> <TR> <TD class="b bg_light right"> <?Print $text_nick;?> </TD> <TD class="bg_light"> <?Print $_GET['nick'];?> </TD> </TR><TR> <TD class="b bg_light right"> <?Print $text_ip;?> </TD>
function Print_Contribution_Form() { ?> <div style="display:none"> <!-- PayPal Contribution Form for Dennis Hoppe --> <form action="https://www.paypal.com/cgi-bin/webscr" id="dennis_hoppe_paypal_contribution_form" method="post" target="_blank"> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="business" value="*****@*****.**" /> <input type="hidden" name="no_shipping" value="1" /> <input type="hidden" name="tax" value="0" /> <input type="hidden" name="no_note" value="0" /> <input type="hidden" name="lc" value="<?php echo $this->t('US', 'Paypal Language Code'); ?> " /> <input type="hidden" name="item_name" value="<?php echo $this->t('Contribution to the Open Source Community'); ?> " /> <input type="hidden" name="on0" value="<?php echo $this->t('Reference'); ?> " /> <input type="hidden" name="os0" value="<?php echo $this->t('WordPress'); ?> " /> <?php foreach ($this->Get_Extension_Names(True) as $index => $extension) { ?> <input type="hidden" name="on<?php echo $index + 1; ?> " value="<?php echo $this->t('Plugin'); ?> " /> <input type="hidden" name="os<?php echo $index + 1; ?> " value="<?php echo HTMLSpecialChars($extension); ?> " /> <?php } ?> <input type="hidden" name="on<?php echo $index + 2; ?> " value="<?php echo $this->t('Website'); ?> " /> <input type="hidden" name="os<?php echo $index + 2; ?> " value="<?php echo HTMLSpecialChars(home_url()); ?> " /> <?php if (is_multisite()) { ?> <input type="hidden" name="on<?php echo $index + 3; ?> " value="<?php echo $this->t('MultiSite'); ?> " /> <input type="hidden" name="os<?php echo $index + 3; ?> " value="<?php echo HTMLSpecialChars(DOMAIN_CURRENT_SITE); ?> " /> <?php } ?> <input type="hidden" name="currency_code" value="" /> <input type="hidden" name="amount" value="" /> </form> <!-- End of PayPal Contribution Form for Dennis Hoppe --> </div><?php }
/** * 函数名:ReplaceSpacialChar($C_char) * 作 用:特殊字符替换函数 * @author Arthur <*****@*****.**> * @param $C_char (待替换的字符串) * @return 布尔值 * 备 注:无 */ static function ReplaceSpecialChar($C_char) { $C_char = HTMLSpecialChars($C_char); //将特殊字元转成 HTML 格式。 $C_char = nl2br($C_char); //将回车替换为br $C_char = str_replace(" ", " ", $C_char); //替换空格替换为 return $C_char; }
/** * Read an object by its name field (vid for standard objects) * * @param String $object object type * @param String $name comma separated list of names. * @param String $fields comma separated list of fields. * @param api_session $session instance of api_session object. * @param string $docparid Used for SODOCUMENT and PODOCUMENT records to indicate the document type * * @return Array of objects. If only one name is passed, the fields will be directly accessible. * @throws Exception */ public static function readByName($object, $name, $fields, api_session $session, $docparid = "") { $name = HTMLSpecialChars($name); $readXml = "<readByName><object>{$object}</object><keys>{$name}</keys><fields>{$fields}</fields><returnFormat>csv</returnFormat>"; if (!empty($docparid)) { $readXml .= "<docparid>{$docparid}</docparid>"; } $readXml .= "</readByName>"; $objCsv = api_post::post($readXml, $session); if (trim($objCsv) == "") { // csv with no records will have no response, so avoid the error from validate and just return return ''; } api_post::validateReadResults($objCsv); $objAry = api_util::csvToPhp($objCsv); if (count(explode(",", $name)) > 1) { return $objAry; } else { return $objAry[0]; } }
$info .= $text_login_ip." : ".$row['login_ip']."<BR>"; IF($row['error_last'] > 0) {$info .= $text_error_last." : ".Date($VA_setup['timedate_format'], $row['error_last'])."<BR>";} ELSE {$info .= $text_error_last." : ".$text_never."<BR>";} $info .= $text_error_cnt." : ".Number_Format($row['error_cnt'])."<BR>"; $info .= $text_error_ip." : ".$row['error_ip']."<BR>"; $info .= $text_email." : ".$row['email']."<BR>"; IF(USR_CLASS >= 3){$info .= $text_note_op." : ".$row['note_op']."<BR>";} $info .= $text_note_usr." : ".$row['note_usr']; $row['nick'] = HTMLSpecialChars($row['nick']); $row['email'] = HTMLSpecialChars($row['email']); $row['reg_op'] = HTMLSpecialChars($row['reg_op']); $row['note_op'] = HTMLSpecialChars($row['note_op']); $row['note_usr'] = HTMLSpecialChars($row['note_usr']); ?> <TR onmouseover="JavaScript: return escape('<?Print AddSlashes($info);?>');"> <TD width=16 class="bg_light middle"> <A name="<?Print $row['nick'];?>"><IMG src="img/<?Print $image?>" width=16 height=16></A> <?IF($browser != "Mozilla") {Print "</TD>";}?> <TD width=16 class="bg_light middle"> <?IF($register_class[$row['class']] <= USR_CLASS && $row['class_protect'] <= USR_CLASS) {?> <A href="index.php?<?Print Change_URL_Query("q", "addreg", "nick", $row['nick']);?>" title="<?Print $text_edit_user;?>"> <IMG src="img/edit_off.gif" width=16 height=16 id="<?Print "edit_".$row['nick'];?>" onMouseOver="ChangeImg('<?Print "edit_".$row['nick'];?>', 'img/edit_on.gif');" onMouseOut="ChangeImg('<?Print "edit_".$row['nick'];?>', 'img/edit_off.gif');"> </A> <?} ELSE {?><IMG src="img/space.gif" width=16 height=16><?} IF($browser != "Mozilla") {Print "</TD>";}?>
function Form($settings) { // Load options $this->load_options($settings); unset($settings); ?> <p> <label for="<?php echo $this->Get_Field_Id('title'); ?> "><?php echo $this->t('Title'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('title')); ?> " /><br /> <small><?php echo $this->t('Leave blank to use the widget default title.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('taxonomy'); ?> "><?php echo $this->t('Taxonomy'); ?> </label>: <select id="<?php echo $this->Get_Field_Id('taxonomy'); ?> " name="<?php echo $this->Get_Field_Name('taxonomy'); ?> "> <?php foreach (Get_Object_Taxonomies($this->fancy_gallery->gallery_post_type) as $taxonomy) { $taxonomy = Get_Taxonomy($taxonomy); ?> <option value="<?php echo $taxonomy->name; ?> " <?php Selected($this->get_option('taxonomy'), $taxonomy->name); ?> ><?php echo HTMLSpecialChars($taxonomy->labels->name); ?> </option> <?php } ?> </select><br /> <small><?php echo $this->t('Please choose the Taxonomy the widget should display.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('number'); ?> "><?php echo $this->t('Number'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('number'); ?> " name="<?php echo $this->get_field_name('number'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('number')); ?> " size="4" /><br /> <small><?php echo $this->t('Leave blank to show all.'); ?> </small> </p> <p> <label for="<?php echo $this->get_field_id('exclude'); ?> "><?php _e('Exclude:'); ?> </label> <input type="text" value="<?php echo HTMLSpecialChars($this->get_option('exclude')); ?> " name="<?php echo $this->get_field_name('exclude'); ?> " id="<?php echo $this->get_field_id('exclude'); ?> " class="widefat" /><br /> <small><?php echo $this->t('Term IDs, separated by commas.'); ?> </small> </p> <p> <input type="checkbox" id="<?php echo $this->get_field_id('count'); ?> " name="<?php echo $this->get_field_name('count'); ?> " <?php Checked($this->get_option('count') == True); ?> /> <label for="<?php echo $this->get_field_id('count'); ?> "><?php _e('Show Gallery counts.'); ?> </label> </p> <p> <label for="<?php echo $this->Get_Field_Id('orderby'); ?> "><?php echo $this->t('Order by'); ?> </label>: <select id="<?php echo $this->Get_Field_Id('orderby'); ?> " name="<?php echo $this->Get_Field_Name('orderby'); ?> "> <option value="name" <?php Selected($this->get_option('orderby'), 'name'); ?> ><?php echo __('Name'); ?> </option> <option value="count" <?php Selected($this->get_option('orderby'), 'count'); ?> ><?php echo $this->t('Gallery Count'); ?> </option> <option value="ID" <?php Selected($this->get_option('orderby'), 'ID'); ?> >ID</option> <option value="slug" <?php Selected($this->get_option('orderby'), 'slug'); ?> ><?php echo $this->t('Slug'); ?> </option> </select> </p> <p> <label for="<?php echo $this->Get_Field_Id('order'); ?> "><?php echo $this->t('Order'); ?> </label>: <select id="<?php echo $this->Get_Field_Id('order'); ?> " name="<?php echo $this->Get_Field_Name('order'); ?> "> <option value="ASC" <?php Selected($this->get_option('order'), 'ASC'); ?> ><?php _e('Ascending'); ?> </option> <option value="DESC" <?php Selected($this->get_option('order'), 'DESC'); ?> ><?php _e('Descending'); ?> </option> </select> </p> <?php }
if ($stamina_o <= "0") { echo "<br><br>\n <table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='98%'>\n <tr>\n <td width='100%'>\n <p align='center'><b><font color='#FF0000'>" . $lang_game1["2_tired"] . ".</font></b></p>\n <p align='center'><font color='#FF0000'><b>\n <a href='inn.php'>" . $lang_clan["back"] . "</a></b></font></td>\n </tr>\n </table><br><br>"; exit; } //end stamina and gold check echo '<html> <head> </head> <body>'; //reset npc_score if (!$npc_score) { $npc_score = '0'; } $npc_score = HTMLSpecialChars($npc_score); $guess = HTMLSpecialChars($guess); //play with the numbers to ensure inconsistant returns $rand_num = rand(1, 3); //Added by dragzone--- $ad_array = array("won" => $lang_added["ad_g2-won"], "lost" => $lang_added["ad_g2-lost"], "drew" => $lang_added["ad_g2-drew"], "gambler" => $lang_added["ad_g2-gambler"], "chose" => $lang_added["ad_chose"], "stone" => $lang_added["ad_stone"], "scroll" => $lang_added["ad_scroll"], "dagger" => $lang_added["ad_dagger"], "game" => $lang_added["ad_game"]); //-------------------- if ($guess == 1) { $player_choice = "Scroll"; if ($rand_num == 1) { //mysql_query("UPDATE phaos_characters SET stamina = '$stamina_reduce' WHERE username = '******'"); $npc_choice = "Scroll"; display_results($npc_score, $player_choice, $npc_choice, drew, $ad_array); } if ($rand_num == 2) { $npc_score = $npc_score + 1; //mysql_query("UPDATE phaos_characters SET stamina = '$stamina_reduce' WHERE username = '******'");