function TESTMETA($path, $TESTexif, $TESTiptc) { // get all the image in current .dir -> get all the meta from them $files = scandir($path); foreach ($files as $file) { if (strlen($file) >= 3) { if ($TESTiptc) { print_r("FILENAME IS: " . $file . "<br>"); getMeta($path . $file); print_r("<br>"); print_r("--------------------------"); print_r("--------------------------"); print_r("--------------------------"); print_r("<br>"); } elseif ($TESTexif) { print_r("FILENAME IS: " . $file . "<br>"); getEXIF($path . $file); print_r("<br>"); print_r("--------------------------"); print_r("--------------------------"); print_r("--------------------------"); print_r("<br>"); } } } }
function getUserId() { //$page_id = M('meta')->where("meta_key='user_name' AND meta_value='".session('user_name')."' AND type='user'")->getField('page_id'); $pageId = "select page_id from mc_meta where meta_key = 'user_name' and meta_value = '" . $_SESSION['user_name'] . "' and type = 'user'"; $result = mysql_query($pageId); $res = mysql_fetch_array($result); $user_pass_true = getMeta($res['page_id'], 'user_pass', true, 'user'); if ($_SESSION['user_name'] && $_SESSION['user_pass'] && $_SESSION['user_pass'] == $user_pass_true) { return $res['page_id']; } }
function starter() { //getMeta("./samples/","1.jpg"); getMeta("./", "img.jpg"); $iptc = array("2#120" => "Hello world", "2#025" => "Your keywords will be placed here", "2#116" => "Thomas Darvik heter jeg"); $data = ""; foreach ($iptc as $tag => $string) { $tag = substr($tag, 2); $data .= IPTCmakeTag(2, $tag, $string); } $content = iptcembed($data, "./img.jpg"); $file = fopen("./img.jpg", "wb"); fwrite($file, $content); fclose($file); getMeta("./", "img.jpg"); }
public function __call($func, $argv) { if (substr($func, 0, 3) == 'get') { $uncamelizeMethod = Inflector::uncamelize(lcfirst(substr($func, 3))); $key = Inflector::lower($uncamelizeMethod); return getMeta($key); } elseif (substr($func, 0, 3) == 'set') { $uncamelizeMethod = Inflector::uncamelize(lcfirst(substr($func, 3))); $key = Inflector::lower($uncamelizeMethod); $value = Arrays::first($argv); setMeta($key, $value); return $this; } elseif (substr($func, 0, 3) == 'has') { $uncamelizeMethod = Inflector::uncamelize(lcfirst(substr($func, 3))); $key = Inflector::lower($uncamelizeMethod); return null !== getMeta($key); } }
</div> <div class="mdl-card__supporting-text modal-supporting-text"> <form action="#"> <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label modal-textfield" id="modal-textfield--title"> <input class="mdl-textfield__input" type="text" id="modal-title" autocomplete="off" /> <label class="mdl-textfield__label" for="modal-title">Title</label> </div> <div class="" id="modal-textfield--comments"> </div> <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label modal-textfield"> <textarea class="mdl-textfield__input" type="text" rows= "10" id="modal-message" ></textarea> <label class="mdl-textfield__label" for="modal-message">Message</label> </div> <input type="hidden" name="modal-student-id" id="modal-student-id" value="<?php echo getMeta("studentID", $studentMetaInformation); ?> "> <input type="hidden" name="modal-panel-id" id="modal-panel-id" value=""> <input type="hidden" name="modal-panel-id" id="modal-panel-menu-id" value=""> <input type="hidden" name="modal-message-id" id="modal-message-id" value=""> </form> </div> <div class="mdl-card__actions mdl-card--border"> <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" id="modal-box--button-save"> Save </button> <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect pull-right" id="modal-box--buton-close"> Cancel </button> </div>
require 'template.php'; // jika ada request, lakukan decode short url dan redirect ke url asli $urlGet = htmlentities(mysql_real_escape_string($_GET["decode"])); $decodeUrl = decodeUrl($urlGet); if ($decodeUrl) { $clicked = $decodeUrl['clicked'] + 1; // update jumlah klik untuk url tersebut. updateClicked($decodeUrl['id'], $clicked); header("location:" . $decodeUrl['long_url'] . ""); } ?> <!DOCTYPE html> <html lang="en"> <?php getMeta(); ?> <body> <div class="container"> <div class="row"> <div class="col s12"> <center> <div class="card-panel grey lighten-4" style="width:800px"> <h2><img src="images/cickourl.png" width="40%"></h2> <br><br> <div class="row"> <div class="input-field col s12"> <input class="validate grey lighten-4" type="text" name="url" id="url" placeholder="Put your long URL here" style="width:650px;"> </div> <div class="input-field col s12"> <button id="shorten" class="waves-effect waves-light btn-large grey"><i class="material-icons left">done</i> Short it!</button>
function search($terms) { // TODO: add metadata description search too. global $thumbnailPrefix, $database; $terms = mysql_escape_string($terms); $terms = explode(' ', $terms); logAction('search', $terms); jsonStart(); $results = 0; // Get all virt. dirs $query = "select * from {$GLOBALS['tablePrefix']}clients"; $response = mysql_query($query, $database); // Add virt. dir paths to an array $dirs = array(); while ($client = mysql_fetch_assoc($response)) { $folder = $client['path'] . '/' . $client['name']; // Only provide virtual dirs we have access to. if (permForPath($folder, 'read')) { $dirs[] = $folder; } } // Remove any nested virt. directories $conDirs = condensePathsArray($dirs); // Each virt. directory foreach ($conDirs as $folder) { // For every file in virt. dir $filestructure = directoryToArray($folder, true); foreach ($filestructure as $item) { $name = $item['name']; $type = $item['type']; $path = $item['path']; $image = false; // Check if any of the terms fall into the file name $present = false; foreach ($terms as $term) { $pos = strpos(strtolower($name), strtolower($term)); if ($pos !== false) { $present = true; } } // Check if file is hidden (.*) $hidden = false; if (startsWith($name, '.') || startsWith($name, $thumbnailPrefix)) { $hidden = true; } // Add files to JSON if ($present && !$hidden) { $id = $path . '/' . $name; $id = str_replace("/", "_", $id); $id = str_replace(".", "_", $id); $metadata = getMeta($path, $name, $id, true); $image = $metadata['image'] == 1 ? true : false; $date = $metadata['date']; $description = $metadata['description']; $flags = $metadata['flags'] == '' ? 'normal' : $metadata['flags']; jsonAdd("\"rank\":\"{$results}\",\"image\": \"{$image}\",\"type\": \"{$type}\", \"path\": \"{$path}\",\"description\": \"{$description}\",\"name\": \"{$name}\",\"date\":\"{$date}\", \"id\": \"{$id}\",\"flags\": \"{$flags}\" "); $results++; } } } if ($results > 0) { echo jsonReturn('search'); } }
function json2Arr($json) { $arr = json_decode($json, true); // print_r($arr); $res = []; foreach ($arr['jsonList'] as $list) { $metadata = getMeta($list); // get some metadata $month1 = getMonth($metadata, $list['month1List']); $month2 = getMonth($metadata, $list['month2List']); $month3 = getMonth($metadata, $list['month3List']); $res = array_merge($res, $month1, $month2, $month3); } return $res; }
$extrameta = "{ \"publish\" : \"php\" }"; } $store_rv = storeMeta($hstr, $hashval, $urival, $loc1, $loc2, $extrameta); if ($store_rv) { $ni_err = true; $ni_errno = 494; $ni_errstr = "Bummer: {$ni_errno} I don't have {$urival} \nBad algorithm, no good alg found."; retErr($ni_errno, $ni_errstr); } if ($rform == "html") { header("Content-Type: text/html"); print "<html><head><title>NetInf PUBLISH results</title></head><body>"; print "<h1>NetInf PUBLISH results</h1>"; print "<br/>"; if ($respstatus == 200) { print "<t>Ok, I've put that there. (for now!)</t>"; } else { print "<t>I probably had that already ({$respstatus})</t>"; } print "</html>"; } if ($rform == "json") { // what to do? // respond with version, ts, msgid, status, name, [ meta ] // $timestamp= date(DATE_ATOM); // print "{\"NetInf\":\"v0.1a Stephen\",\"status\":$respstatus,\"ts\":\"$timestamp\",\"msgid\":\"$msgidval\",\"name\":\"$urival\"}"; header("Content-Type: application/json"); $metastr = getMeta($hstr, $hashval, $msgidval, $respstatus); print $metastr; } exit(0);
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php $meta_rec = getMeta(); if (array_key_exists('dynamic_meta', $meta_rec) && @is_array($meta_array) && !empty($meta_array)) { if (array_key_exists('meta_title', $meta_array) && $meta_array['meta_title'] != '') { echo '<title>' . $meta_array['meta_title'] . '</title>'; } if (array_key_exists('meta_description', $meta_array) && $meta_array['meta_description'] != '') { echo '<meta name="description" content="' . $meta_array['meta_description'] . '" />'; } if (array_key_exists('meta_keyword', $meta_array) && $meta_array['meta_keyword'] != '') { echo '<meta name="keywords" content="' . $meta_array['meta_keyword'] . '" />'; } } else { ?> <title><?php echo $meta_rec['meta_title']; ?> </title> <meta name="description" content="<?php echo $meta_rec['meta_description']; ?> " /> <meta name="keywords" content="<?php echo $meta_rec['meta_keyword'];
hasBackground('gallery'); ?> " style="background-image:url(<?php echoMeta('background', 'gallery'); ?> )"> <div class="inner-content wrap"> <header class="section-header"> <h2 class="section-title"><?php echoMeta('title', 'gallery'); ?> </h2> </header> <div class="section-content"> <?php echo apply_filters('the_content', getMeta('content', 'gallery')); ?> </div> </div> </section> <?php } /* </content-gallery> */ ?> <?php } } ?> </div><?php /* </content> */ get_footer();
?> <section class="content-five<?php echo getMeta('parallax', '5') ? ' PARALLAX bg-parallax' : ' bg-repeat'; ?> " style="background-image:url(<?php echoMeta('background', '5'); ?> )"> <div class="inner-content wrap"> <header class="section-header"> <h2 class="section-title"><?php echoMeta('title', '5'); ?> </h2> </header> <?php echo apply_filters('the_content', getMeta('content', '5')); ?> </div> </section> <?php } /* </content-five> */ ?> <?php } } ?> </div><?php /* </content> */ get_footer();