function redirect() { global $fileurl, $dircacheurl; if (!$dircacheurl) { showimage(); } header('Location: ' . $fileurl); exit; }
(($formatting['underline'] == 'close') ? '</u>' : '') . (($formatting['italic'] == 'close') ? '</em>' : '') . (($formatting['bold'] == 'close') ? '</strong>' : ''); // reset formatting variables foreach ($formatting as $key => $format) { if ($format == 'open') $formatting[$key] = 'opened'; if ($format == 'close') $formatting[$key] = 'closed'; } } if ($node_loc == 'blip' && !$status) { $attri_r = $paragraph->getAttribute("r:embed"); $current_image_name = $repo[$attri_r]; $image_stream = "" . showimage($current_image_name) . ""; //return the base64 string //echo $image_stream.$current_image_name."asdasdasd"; $text.="" . '<img height="150" width="200" src="data:image/jpg;base64,' . $image_stream . '">'; $text.=$image_stream; $status = true; } } $text .= ($formatting['header'] > 0) ? '</h' . $formatting['header'] . '>' : '</p>'; } } $text = str_replace("<p></p>", "", $text);
$agent = explode(",", $CSLH_Config['ignoreagent']); for ($i = 0; $i < count($agent); $i++) { if (!empty($agent[$i]) && !empty($ipaddress)) { if (preg_match("/" . $agent[$i] . "/", $ipaddress)) { $ignoreme = true; } } } if ($visits > $CSLH_Config['maxrequests'] && $status != "chat") { $ignoreme = true; } if ($ignoreme == true) { if ($_SERVER['SCRIPT_NAME'] == "image.php") { // blank image: $filepath = "images/livehelp3.gif"; showimage($filepath, "image/gif"); exit; } else { exit; } } /// make sure the department is right. if (intval($department) != 0 && $status != "chat") { $sqlquery = "UPDATE livehelp_users set department=" . intval($department) . " WHERE sessionid='" . $identity['SESSIONID'] . "'"; $mydatabase->query($sqlquery); // id we never set the department before: if ($firstdepartment == 0) { $sqlquery = "UPDATE livehelp_users set firstdepartment=" . intval($department) . " WHERE sessionid='" . $identity['SESSIONID'] . "'"; $mydatabase->query($sqlquery); } }
function edituser() { global $NPDS_Prefix; global $user, $smilies, $short_user, $subscribe, $member_invisible, $avatar_size; include "header.php"; $userinfo = getusrinfo($user); nav($userinfo['mns']); global $C1, $C2, $C3, $C4, $C5, $C6, $C7, $C8, $M1, $M2, $T1, $T2, $B1; $result = sql_query("SELECT C1, C2, C3, C4, C5, C6, C7, C8, M1, M2, T1, T2, B1 FROM " . $NPDS_Prefix . "users_extend WHERE uid='" . $userinfo['uid'] . "'"); list($C1, $C2, $C3, $C4, $C5, $C6, $C7, $C8, $M1, $M2, $T1, $T2, $B1) = sql_fetch_row($result); showimage(); include "modules/sform/extend-user/mod_extend-user.php"; include "footer.php"; }
// echo base_url() + "assets/images" + $img; } } ?> <?php showimage($profileinfo['galimg1']); ?> <?php showimage($profileinfo['galimg2']); ?> <?php showimage($profileinfo['galimg3']); ?> <?php showimage($profileinfo['galimg4']); ?> </div> </div> </div> <div class="w3-row" style="margin-left : 10%"> <div class="w3-col m3" style="color : blue"> Ethnicity </div> <div class="w3-col m3"> <?php echo $profileinfo['ethnicity']; ?> </div> <div class="w3-col m3" style="color : blue"> Hair Color </div>
public function getSnapFromHost($snap) { $blob_data = $this->user->getMedia($snap->id); if ($blob_data) { echo "[1mfetching image {$snap->id}.jpg from {$snap->sender}[0m\n"; $snaptotal = ++LittleSnapper::$count; if ($blob_data == self::MEDIA_IMAGE) { $ext = '.jpg'; } elseif ($blob_data == self::MEDIA_VIDEO || self::MEDIA_VIDEO_NOAUDIO) { echo "littlesnapper cannot print out videos, (yet)"; $this->user->logout(); exit; } // littlesnapper can only do images. file_put_contents('img/' . $snap->id . $ext, $blob_data); $this->i->load('img/' . $snap->id . $ext); $this->i->resizeToWidth(400); $this->i->save('img/' . $snap->id . $ext); // host the image on the server. showimage('img/' . $snap->id . $ext); self::$url = 'img/' . $snap->id . $ext; // print results. $this->printResults(); if (self::$url == '') { $this->user->logout(); exit; } } }
// build text string of doc $text .= ($formatting['bold'] == 'open' ? '<strong>' : '') . ($formatting['italic'] == 'open' ? '<em>' : '') . ($formatting['underline'] == 'open' ? '<u>' : '') . htmlentities($str, ENT_QUOTES, "utf-8") . ($formatting['underline'] == 'close' ? '</u>' : '') . ($formatting['italic'] == 'close' ? '</em>' : '') . ($formatting['bold'] == 'close' ? '</strong>' : ''); // reset formatting variables foreach ($formatting as $key => $format) { if ($format == 'open') { $formatting[$key] = 'opened'; } if ($format == 'close') { $formatting[$key] = 'closed'; } } } if ($node_loc == 'blip' && !$status) { $attri_r = $paragraph->getAttribute("r:embed"); $current_image_name = $repo[$attri_r]; $image_stream = "" . showimage($current_image_name) . ""; //return the base64 string //echo $image_stream; $text .= "" . '<img height="150" width="200" src="data:image/jpg;base64,' . $image_stream . '">'; $text .= $image_stream; $status = true; } } $text .= $formatting['header'] > 0 ? '</h' . $formatting['header'] . '>' : '</p>'; } } $text = str_replace("<p></p>", "", $text); //echo $text; $html = new simple_html_dom(); $html->load($text); $arr_all = array();
function sendToPrinter($url, $data) { $api_key = $data['api_key']; $server_url = $data['server_url']; $delete_option = $data['delete']; $ditherType = $data['dither']; $delete_time = $data['time_to_delete']; //configuration checks. if (!is_numeric($delete_time)) { echo "\n"; echo "Warning! config error, time_to_delete is not a number."; echo "\n"; echo "defaulting to 45 seconds"; $delete_time = 45; } elseif (is_int($delete_time)) { $delete_time = $delete_time; } elseif ($delete_time == "null" || is_null($delete_time) || $delete_time == 0) { // if none is provided, default to 45. $delete_time = 45; } // dither check. switch ($ditherType) { case true: $ditherType = "dither"; break; case false: $ditherType = "threshold"; break; default: break; } $delete_snaps = $delete_option; $lp_key = $api_key; $lp_api = 'http://remote.bergcloud.com/playground/direct_print/' . $lp_key . '?'; echo "\n"; // HTTP POST arguments. $postargs = array('html' => $url); $cur = curl_init(); curl_setopt($cur, CURLOPT_POST, true); curl_setopt($cur, CURLOPT_POSTFIELDS, $postargs); curl_setopt($cur, CURLOPT_URL, $lp_api . '&html=<html><body><center><img%20src="' . $server_url . 'img/logo.PNG"</img><br><br><img%20class="' . $ditherType . '"%20src="' . $server_url . $postargs['html'] . '"</img></center></body></html>'); curl_exec($cur); echo "\n"; curl_close($cur); if ($delete_snaps == true) { // Deletes the snap from the server, just like snapchat ;) $timer = (int) $delete_time; echo "[1mDeleting captured snap in " . $timer . "s[0m\n"; sleep($timer); showimage(""); unlink($url); echo "snap deleted. 👻 \n"; exit; } else { echo "[1msnap saved. Your littleprinter will print the captured snap.[0m"; exit; } }