function get_thumbnail_image($access_key_id, $secret_access_key, $size, $default_image, $url) { $timestamp = generate_timestamp(); $url_enc = urlencode($url); $timestamp_enc = urlencode($timestamp); $signature_enc = urlencode(calculate_RFC2104HMAC("AlexaSiteThumbnail" . "Thumbnail" . $timestamp, $secret_access_key)); $request_url = "http://ast.amazonaws.com/xino/?" . "Service=" . "AlexaSiteThumbnail" . "&Action=" . "Thumbnail" . "&AWSAccessKeyId=" . $access_key_id . "&Timestamp=" . $timestamp_enc . "&Signature=" . $signature_enc . "&Size=" . $size . "&Url=" . $url; $result = make_http_request($request_url); $response_doc = new DOMDocument(); $response_doc->loadXML($result); $thumbnail = $response_doc->getElementsByTagName("Thumbnail")->item(0); $image_url = $default_image; $has_default_image = $default_image != NULL && strlen($default_image) > 0; if ($thumbnail != NULL) { if ($thumbnail->getAttribute("Exists") == "true" || !$has_default_image) { $image_url = $thumbnail->firstChild->nodeValue; } } return $image_url; }
<?php /* * Received Parameters: * $widget_key */ $options = $this->widgets_model->get_widgetoptions($widget_key); $action_options = $this->application->get_config('options', 'actions'); $current_search = $this->application->get_session_userdata('current_search'); $search_settings = $this->application->get_session_userdata('search_settings'); /** Form attributes with some Knockoutjs bindings for submission. **/ $atts = array('class' => 'form-horizontal', 'data-bind' => 'submit: $root.formSubmit', 'method' => 'POST', 'onSubmit' => 'return false;', 'id' => 'widget_options_form'); /** Add meta_key for options form recognition **/ //$hidden = array('meta_key' => $widget_key); $page = $this->session->userdata('current_page'); $ts = generate_timestamp(); echo form_open('app/widget_options/' . urlencode($widget_key) . '/' . $page->id, $atts); ?> <div class="nav-tabs-custom"> <ul class="nav nav-tabs pull-right"> <li class="active"><a data-toggle="tab" data-target="#options-tab-1" href="javascript:void(0)">Display</a></li> <li class=""><a data-toggle="tab" data-target="#options-tab-2" href="javascript:void(0)">Data</a></li> </ul> <div class="tab-content p-0 p-t-20"> <div id="options-tab-1" class="tab-pane active"> <?php $this->load->view('widgets/widget-options-basic', $options); ?> </div>
<table width="105%" border="0" align="left" cellpadding="2" cellspacing="5" style="float:left" > <tr> <td colspan="2" align="center"> </td> </tr> <tr> <td width="25%" align="left"><span class="font2">Date</span><span class="font2"> <input type="text" name="date_of_submit" value="" class="date" /> </span></td> <td width="48%" align="left"><label>Gate Pass # </label> <input type="text" disabled value="<?php echo generate_timestamp('Delivery', $num); ?> " style="width:150px;" /> <input type="hidden" name="delivery_num" value="<?php echo generate_timestamp('Delivery', $num); ?> " id="delivery_num" /> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2" align="left" class="font3"> Mr./Ms <input type="text" name="name" id="name" style="width:400px;" /> <br /> Consignee's Ref . No. <input name="con_ref" type="text" id="con_ref" style="width:400px;" /> <br /> Our Ref. No .
public function generate_statistics_key($type) { $keys = array('user_id' => $this->users->get_user_id(), 'type' => strtolower($type), 'timestamp' => generate_timestamp()); return $keys; }
$requisition = new Requisition(); $num = $indent->getNewIndentId(); ?> <form id="requisitionForm" name="requisitionForm" method="post" action="includes/model/indent_actions.php" > <div id="note"> </div> <div class="morelabels"> <p> <label> Indent Code:</label> <input type="text" name="indent_code" value="<?php echo generate_timestamp("indent", $num); ?> " id="indent_code" /> </p> <p> <label>Date :</label> <input type="text" name="date_of_submit" value="" class="date" /> </p> </div> <div class="morelables"> <p > <label>Remarks:</label> <textarea name="indent_remark"></textarea>
<link href="../../css/stylesheet.css" rel="stylesheet" type="text/css" /> <div id="note"> </div> <form id="mrrForm" name="mrrForm" method="post" action="includes/model/mrr_order_actions.php" > <div class='morelabel'> <p> <label>MRR # </label> <input type="text" disabled value="<?php echo generate_timestamp('MRR', $num); ?> " /> <input type="hidden" name="mrr_num" value="<?php echo generate_timestamp('MRR', $num); ?> " id="req_num" /> </p> <p> <label> Date </label> <input type="text" name="date_of_submit" value="" id="submit_date" class="date" /> </p> <p> <label> Purchase Ref</label> <select name="PurchaseorderId" id="PurchaseorderId"> <?php echo $outputPurchaseorder;
</p> </fieldset> </div> <div class="morelabel"> <label>Prod. Voucher# </label> <p> <input type="text" disabled value="<?php echo generate_timestamp('prod', $num); ?> " /> <input type="hidden" name="req_num" value="<?php echo generate_timestamp('prod', $num); ?> " id="req_num" /> </p> <label>Date of submit:</label> <p> <input type="text" name="submit_date" value="" class="date" /> </p> <label> Required Within: </label> <p> <input type="text" name="required_within" value="" class="date" /> </p> </div>
<form id="consumptionForm" name="consumptionForm" method="post" action="includes/model/consumption_raw_actions.php" > <div class='morelabel'> <p> <label>Consumption # </label> <input type="text" disabled value="<?php echo generate_timestamp('CON-R', $num); ?> " /> <input type="hidden" name="con_num" value="<?php echo generate_timestamp('CON-R', $num); ?> " id="con_num" /> </p> <p> <label>Date </label> <input type="text" name="date_of_submit" value="" id="submit_date" class="date" /> </p> <p> <label>Location:</label> <select name="locationId" > <?php echo $locations;
<?php echo $locations; ?> </select> </p> <p> <label>MRR # </label> <input type="text" disabled value="<?php echo generate_timestamp('Return', $num); ?> " /> <input type="hidden" name="return_num" value="<?php echo generate_timestamp('Return', $num); ?> " id="return_num" /> </p> </div > <div style="clear:both"> </div> <div id="inline_form"> <div class="mediumbody"> <div class="lowbanner1"> </div> <div class="lowbannertest"> <ul> <li style='width:240px' >Item</li>
?> <!-- <section class="sns"> <p class="txt_timeline"><img src="/blog/wp-content/themes/somsommi/images/twitter-bird-light-bgs1.png" alt="Som's twitter"> SOM Timeline</p> <?php define('SCREEN_NAME', 'baninana'); define('COUNT', '5'); // define('ENDPOINT_URL', 'https://api.twitter.com/1.1/statuses/home_timeline.json'); define('ENDPOINT_URL', 'https://api.twitter.com/1.1/statuses/user_timeline.json'); define('CONSUMER_KEY', 'kN2f96aNT48sdHrhJPUPg'); define('CONSUMER_SECRET', '7yUer6SCEt5q5cKmNmkeprqFYHRrPDwhi5sbQb2QI'); define('ACCESS_TOKEN', '124910554-fPpWVgiXmQ4E9AkRioG2AJnRCMOUlPgwmg2J2hD0'); define('ACCESS_TOKEN_SECRET', '9mlt5vJs0vqzsKRZuHGuMQmB93yi4tL0nC5rLHOOnW8'); $nonce = generate_nonce(); $timestamp = generate_timestamp(); $text1 = "GET&" . urlencode(ENDPOINT_URL) . "&"; $text2 = "count=" . COUNT . "&" . "oauth_consumer_key=" . CONSUMER_KEY . "&" . "oauth_nonce=" . $nonce . "&" . "oauth_signature_method=HMAC-SHA1" . "&" . "oauth_timestamp=" . $timestamp . "&" . "oauth_token=" . ACCESS_TOKEN . "&" . "screen_name=" . SCREEN_NAME; $text3 = urlencode(CONSUMER_SECRET) . "&" . urlencode(ACCESS_TOKEN_SECRET); $oauth_signature = base64_encode(hash_hmac('sha1', $text1 . urlencode($text2), $text3, true)); $url = ENDPOINT_URL . "?" . $text2 . "&oauth_signature=" . urlencode($oauth_signature); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); if ($output) { $tweets = json_decode($output, true); print_r("<ol class=\"twitter\">"); foreach ($tweets as $tweet) { print_r("<li>");
?> <div id="note"> </div> <form id="mrrForm" name="mrrForm" method="post" action="includes/model/qc_order_actions.php" > <div class='morelabel'> <p> <label>QC # </label> <input type="text" disabled value="<?php echo generate_timestamp('QC', $num); ?> " /> <input type="hidden" name="qc_num" value="<?php echo generate_timestamp('QC', $num); ?> " id="qc_num" /> </p> <p> <label> Date </label> <input type="text" name="date_of_submit" value="" id="date_of_submit" class="date" /> </p> <p> <div> <label>MRR No:</label> <select name="mrrNo" id="mrrNo" style="width:150px;"> <?php
<input name="status" type="radio" class="rediobutton" id="status" value="1" /> <span class="font2">Returnable </span> <table cellspacing="0" cellpadding="0"> <tr> </tr> </table> </td> <td width="25%" align="left"> <input name="status" type="radio" class="rediobutton" id="status" value="2" /> <span class="font2">Nonreturnable </span></td> <td width="48%" align="left"><label>Gate Pass # </label> <input type="text" disabled value="<?php echo generate_timestamp('GatePass', $num); ?> " style="width:150px;" /> <input type="hidden" name="GatePass_num" value="<?php echo generate_timestamp('GatePass', $num); ?> " id="GatePass_num" /> </td> </tr> <tr> <td> </td> <td colspan="3"><span class="font2">Purpose:</span> <input name="purpose" type="text" id="purpose" /> </td> </tr> <tr> <td> </td> <td colspan="3" align="left" class="font3">Permission is hereby given to Mr./Ms <input type="text" name="name" id="name" /> Address, <input name="address" type="text" id="address" />
<?php $endpoint = 'sandbox'; require_once './mturk.php'; // Calculate the request authentication parameters $operation = "CreateHIT"; $title = "How's the weather?"; $description = 'Write a paragraph about the weather in your area.'; $keywords = "weather, fun, writing, vtcs5774"; $url = 'http://contextslices.kurtluther.com/weather.php'; $frame_height = 400; // height of window, in pixels $timestamp = generate_timestamp(time()); $signature = generate_signature($SERVICE_NAME, $operation, $timestamp, $AWS_SECRET_ACCESS_KEY); // Construct the request $url2 = $SERVICE_ENDPOINT . "?Service=" . urlencode($SERVICE_NAME) . "&Operation=" . urlencode($operation) . "&Title=" . urlencode($title) . "&Description=" . urlencode($description) . "&Keywords=" . urlencode($keywords) . "&Reward.1.Amount=0.25" . "&Reward.1.CurrencyCode=USD" . "&Question=" . urlencode(constructQuestion($url, $frame_height)) . "&AssignmentDurationInSeconds=3600" . "&LifetimeInSeconds=3600" . "&AutoApprovalDelayInSeconds=86400" . "&MaxAssignments=10" . "&Version=" . urlencode($SERVICE_VERSION) . "&Timestamp=" . urlencode($timestamp) . "&AWSAccessKeyId=" . urlencode($AWS_ACCESS_KEY_ID) . "&ResponseGroup.0=Minimal" . "&ResponseGroup.1=HITDetail" . "&QualificationRequirement.1.QualificationTypeId=00000000000000000071" . "&QualificationRequirement.1.Comparator=EqualTo" . "&QualificationRequirement.1.LocaleValue.Country=US" . "&QualificationRequirement.2.QualificationTypeId=000000000000000000L0" . "&QualificationRequirement.2.Comparator=GreaterThan" . "&QualificationRequirement.2.IntegerValue=90" . "&QualificationRequirement.3.QualificationTypeId=00000000000000000040" . "&QualificationRequirement.3.Comparator=GreaterThan" . "&QualificationRequirement.3.IntegerValue=50" . "&Signature=" . urlencode($signature); // Make the request $xml = simplexml_load_file($url2); // Print any errors if ($xml->OperationRequest->Errors) { print_errors($xml->OperationRequest->Errors->Error); } $hitID = strval($xml->HIT->HITId); if ($hitID != '') { print "Created HIT " . $hitID . " on Amazon Mechanical Turk (" . $endpoint . ")...<br/>\n"; } print "====================<br/>\n";
<div class='morelabel'> <p> <div> <label> Purchase #:</label> <input type="text" disabled value="<?php echo generate_timestamp('Purchase', $num); ?> " style="width:150px;" /> <input type="hidden" name="Purchase_num" value="<?php echo generate_timestamp('Purchase', $num); ?> " id="Purchase_num" /> </div> </p> </div> <table border="0" align="left" class="small_tab"> <div class="vertical_form"> <p> <div align="left"> <label>Date </label> <input type="text" name="date_of_submit" value="" class="date" /> </div> </p>
</p> </fieldset> </div> <div class="morelabel"> <label>Requisition # </label> <p> <input type="text" disabled value="<?php echo generate_timestamp('req', $num); ?> " /> <input type="hidden" name="req_num" value="<?php echo generate_timestamp('req', $num); ?> " id="req_num" /> </p> <label>Date of submit:</label> <p> <input type="text" name="submit_date" value="" class="date" /> </p> <label> Required Within: </label> <p> <input type="text" name="required_within" value="" class="date" /> </p> </div>