private static function getFieldValue($field, $object) { $field['value'] = convertString($field['value']); if (self::hasFieldVariables($field['value'])) { return htmlSanitize(self::applyFieldVariables($field['value'])); } return isset($object['data'][$field['name']]) ? htmlSanitize(convertString($object['data'][$field['name']])) : htmlSanitize(self::applyFieldVariables($field['value'])); }
function decryptText($text) { require_once 'Crypt/Blowfish.php'; $bf = new Crypt_Blowfish(ENCRYPTKEY); $plaintext = $bf->decrypt(convertString(trim($text))); return trim($plaintext); }
unset($glyph_xml, $glyph_data); // print the results $out .= '<div style="padding-left: 15px; display: block;">' . $wow_item->parse($glyph_id, array('icon' => true)) . '</div>'; } else { $out .= '<div style="padding-left: 15px; display: block;">' . $wow_item->parse($glyph, array('icon' => true)) . '</div>'; } } } // minor glyphs if (sizeof($specs['spec'][2]['glyphs']['minor']) > 0) { $out .= '<div class="glyph-title">Minor</div>'; foreach ($specs['spec'][2]['glyphs']['minor'] as $glyph) { // if language isn't English we need to do an extra step if (WHP_LANG != 'en') { // we need to get the ID from the english version then use that to query for the language specific version $glyph_data = getXML('http://www.wowhead.com/?item=' . convertString($glyph) . '&xml'); // incase the XML is fubar'd if (!$glyph_data || !($glyph_xml = @simplexml_load_string($glyph_data, 'SimpleXMLElement', LIBXML_NOCDATA))) { print $language->words['invalid_xml']; mysql_close($conn); exit; } elseif ($glyph_xml->error != '') { $errorstr = $language->words['notfound']; $errorstr = str_replace('{type}', $language->words['item'], $errorstr); $errorstr = str_replace('{name}', $glyph, $errorstr); print $errorstr; mysql_close($conn); exit; } // get the id and unset the xml object $glyph_id = (string) $glyph_xml->item['id'];
// $submitArray['subjectCorpName'] = parseHeadings('subjectCorpName', $record); // $submitArray['subjectMeetingName'] = parseHeadings('subjectMeetingName', $record); // $submitArray['subjectUniformTitle'] = parseHeadings('subjectUniformTitle', $record); // $submitArray['subjectTopical'] = parseHeadings('subjectTopical', $record); // $submitArray['subjectGeoName'] = parseHeadings('subjectGeoName', $record); // // manipulate data $submitArray['description'] = convertString($submitArray['description']); $submitArray['scopeAndContentsNote'] = convertString($submitArray['scopeAndContentsNote']); $submitArray['title'] = convertString($submitArray['title']); $submitArray['extent'] = convertString($submitArray['extent']); // print "<pre>"; // var_dump($submitArray); // print "</pre>"; // exit; // check to see if we have a digital item for object if (file_exists("/home/mfcs.lib.wvu.edu/data/working/uploads/" . $submitArray['idno'])) { $submitArray['digitalFiles'] = $submitArray['idno']; $submitArray['mediaRelease'] = "Yes"; } if (objects::add("2", $submitArray) !== TRUE) { print "error adding object " . $submitArray['idno']; print "<pre>"; var_dump($submitArray); print "</pre>"; errorHandle::prettyPrint();
<?php require 'functions.php'; if (file_exists("img/" . $_FILES["upload"]["name"])) { echo $_FILES["upload"]["name"] . " already exists please choose another image. "; } else { move_uploaded_file($_FILES["upload"]["tmp_name"], "img/" . convertString($_FILES["upload"]["name"])); echo "Stored in: " . "img/" . $_FILES["upload"]["name"]; // Biến môi trường của CKEditor $funcNum = $_GET['CKEditorFuncNum']; // $CKEditor = $_GET['CKEditor']; // $langCode = $_GET['langCode']; // Kiểm tra $_FILES và lưu file. Chỉ đường dẫn đúng cho URL . $url = "/laravel/public/upload/img/" . convertString($_FILES["upload"]["name"]); // Hiển thị thông báo nếu img ko upload đc $message = ''; echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction({$funcNum}, '{$url}', '{$message}');</script>"; }
appendOutput("Reserved 2\r\n"); appendOutput("Reserved 3\r\n"); while ($r = XDb::xFetchArray($stmt)) { $lat = sprintf('%01.6f', $r['latitude']); $lon = sprintf('%01.6f', $r['longitude']); //modified coords if ($r['cache_mod_cords_id'] > 0) { //check if we have user coords $r['mod_suffix'] = '[F]'; } else { $r['mod_suffix'] = ''; } $name = convertString(str_replace(',', '', $r['mod_suffix'] . $r['name'])); $username = convertString(str_replace(',', '', $r['username'])); $type = $wptType[$r['type']]; $size = convertString($wptSize[$r['size']]); $difficulty = sprintf('%01.1f', $r['difficulty'] / 2); $terrain = sprintf('%01.1f', $r['terrain'] / 2); $cacheid = $r['wp_oc']; $id = $r['cacheid']; $date_hidden = $r['date_hidden']; $userid = XDb::xMultiVariableQueryValue("SELECT user_id FROM caches WHERE cache_id = :1 LIMIT 1", 0, $id); $kolor = 16776960; if ($userid == $usr['userid']) { $kolor = 65280; } if ($r['status'] == 3 || $r['status'] == 2) { $kolor = 255; } if ($r['found']) { $kolor = 65535;
$CKEditor = $_GET['CKEditor']; $langCode = $_GET['langCode']; $url = "/laravel/public/upload/" . $file; $message = ''; echo "<script type='text/javascript'>window.opener.CKEDITOR.tools.callFunction({$funcNum}, '{$url}');</script>"; echo "<script>window.close();</script>"; } if (isset($_POST['submit'])) { $dirupload = stripslashes($_GET['dir']) . '/'; if (file_exists("{$dirupload}" . $_FILES["upload"]["name"])) { echo $_FILES["upload"]["name"] . " already exists please choose another image. "; } else { if ($_FILES["upload"]["type"] != "image/jpeg" && $_FILES["upload"]["type"] != "image/png") { echo "<script>alert('Please choose image file');</script>"; } else { move_uploaded_file($_FILES["upload"]["tmp_name"], "{$dirupload}" . convertString($_FILES["upload"]["name"])); } } } if (isset($_GET['dir']) && isset($_GET['CKEditor']) && isset($_GET['CKEditorFuncNum']) && isset($_GET['langCode'])) { $dir = stripslashes($_GET['dir']); $funcNum = $_GET['CKEditorFuncNum']; $CKEditor = $_GET['CKEditor']; $langCode = $_GET['langCode']; $response = find($dir); } else { die('Permission Denied'); } ?> <!DOCTYPE html>