function oboxapps_logout($req) { setcookie('data', '', time() - 3600, '/', '', true, true); $_SESSION['authenticated'] = false; unset($_SESSION['global_salt']); unset($_SESSION['rid']); return _302_plain(absolute_uri('/')); }
<a href="<?php echo absolute_uri('/'); ?> " data-icon="arrow-l" data-rel="back">Back</a> <h1><?php echo $result['description']; ?> - Domain Details</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true"> <li data-role="list-divider">Customer</li> <li> <!--a href="<?php echo absolute_uri("/apps/customer_details?customerid={$result['customerid']}"); ?> "--> <h2><?php echo $result['customer_details']['name']; ?> (#<?php echo $result['customerid']; ?> )</h2> <p><strong><?php echo $result['customer_details']['company']; ?> </strong></p> <p><?php echo $result['customer_details']['address1'];
<!DOCTYPE html> <html> <head> <title>OboxApps - Apps for LogicBoxes and ResellerClub users made by Sandeep Shetty</title> <link rel="shortcut icon" href="<?php echo absolute_uri('static/images/favicon.ico'); ?> " /> <link rel="stylesheet" href="<?php echo relative_uri('static/styles/jquery.mobile-1.0a4.1.min.css'); ?> " /> <script type="text/javascript" src="<?php echo relative_uri('static/scripts/jquery-1.5.2.min.js'); ?> "></script> <script src="<?php echo relative_uri('static/scripts/jquery.mobile-1.0a4.1.min.js'); ?> "></script> </head> <body> <?php echo $content; ?> </body> </html>
?> ">Account Balance</a></li> <li><a href="<?php echo absolute_uri('/apps/expiring_domains'); ?> ">Expiring Domains</a></li> <li><a href="<?php echo absolute_uri('/apps/new_domains'); ?> ">New Domains</a></li> <li><a href="<?php echo absolute_uri('/apps/renew_domain'); ?> ">Renew Domain</a></li> <li><a href="<?php echo absolute_uri('/apps/gappsconf'); ?> ">Google Apps Configurator</a></li> </ul> </div> <!--div data-role="footer"> </div--> </div> <div data-role="page" id="getting-started" data-theme="b"> <div data-role="header"> <h1>Getting Started</h1> </div>
<div data-role="page" data-theme="b"> <div data-role="header" data-backbtn="true"> <?php //TODO: needs a $back_to var ?> <a href="<?php echo absolute_uri('/'); ?> " data-icon="arrow-l">Back</a> <h1>Error</h1> <a href="<?php echo absolute_uri('/'); ?> " data-icon="home" class="ui-btn-right" data-iconpos="notext">Home</a> </div> <div data-role="content"> <p><?php echo $error_msg; ?> </p> </div> </div>
unset($result['recsindb']); ?> <?php unset($result['recsonpage']); ?> <ul data-role="listview" > <?php for ($i = 1; $i <= count($result); $i++) { $endtime = $result[$i]['orders.creationtime']; $now = time(); $days_ago = ceil(($now - $endtime) / (60 * 60 * 24)); ?> <li><a href="<?php echo absolute_uri("/apps/domain_details?orderid={$result[$i]['orders.orderid']}"); ?> "><?php echo $result[$i]['entity.description']; ?> </a> <span class="ui-li-count"><?php echo $days_ago; ?> </span></li> <?php } ?> </ul> </div> </div>
/** * Feed Autodiscovery * * returns an array of all (hopefully) rss/atom/rdf feeds in the document, * pointed by $url. * See http://diveintomark.org/archives/2002/06/02/important_change_to_the_link_tag * * @param string $url URL of a web document containing <link> elements * @return array Array of feed URLs */ function extractFeeds($url) { rss_require('extlib/uri_util.php'); $cnt = getUrl($url); $ret = array(); //find all link tags if (preg_match_all('|<link\\s+\\w*=["\'][^"\']+["\']+[^>]*>|Uis', $cnt, $res)) { while (list($id, $match) = each($res[0])) { // we only want '<link alternate=...' if (strpos(strtolower($match), 'alternate') && !strpos(strtolower($match), 'stylesheet') && preg_match_all('|([a-zA-Z]*)=["\']([^"\']*)|', $match, $res2, PREG_SET_ORDER)) { $tmp = array(); //populate the return array: attr_name => attr_value while (list($id2, $match2) = each($res2)) { $attr = strtolower(trim($match2[1])); $val = trim($match2[2]); // make sure we have absolute URI's if ($attr == "href") { $val = absolute_uri($val, $url); } $tmp[$attr] = $val; } $ret[] = $tmp; } } } return $ret; }
unset($result['recsindb']); ?> <?php unset($result['recsonpage']); ?> <ul data-role="listview" > <?php for ($i = 1; $i <= count($result); $i++) { $endtime = $result[$i]['orders.endtime']; $now = time(); $expiring_in = ceil(($endtime - $now) / (60 * 60 * 24)); ?> <li><a href="<?php echo absolute_uri("/apps/renew_domain?domain={$result[$i]['entity.description']}"); ?> "><?php echo $result[$i]['entity.description']; ?> </a> <span class="ui-li-count"><?php echo $expiring_in; ?> </span></li> <?php } ?> </ul> </div> </div>
<div data-role="page" data-theme="b"> <div data-role="header" data-backbtn="true"> <a href="<?php echo absolute_uri('/'); ?> " data-icon="arrow-l" data-rel="back">Back</a> <h1>Account Balance</h1> <a onclick="$.mobile.pageLoading(); location.reload();" href="<?php echo absolute_uri('/apps/account_balance'); ?> " data-icon="refresh" data-iconpos="notext" class="ui-btn-right">Refresh</a> </div> <div data-role="content"> <p>Your Account Balance is <strong><?php echo "{$result['sellingcurrencysymbol']} {$result['sellingcurrencybalance']}"; ?> </strong></p> </div> </div>
function relative_uri($uri, $base_uri = null, $no_empty_uri = null, $no_net_uri = null) { if (is_null($base_uri)) { $base_uri = get_current_url(); } if (is_null($no_empty_uri)) { $no_empty_uri = true; } if (is_null($no_net_uri)) { $no_net_uri = true; } $base_uri = absolute_uri($base_uri); $uri = absolute_uri($uri, $base_uri); $base = parse_uri($base_uri); $parts = parse_uri($uri); do { // scheme if ($parts['scheme'] !== $base['scheme']) { break; } if (!$no_net_uri) { unset($parts['scheme']); } // authority if ($parts['host'] !== $base['host'] or $parts['user'] !== $base['user'] or $parts['pass'] !== $base['pass'] or $parts['port'] !== $base['port']) { break; } unset($parts['scheme']); unset($parts['host']); unset($parts['user']); unset($parts['pass']); unset($parts['port']); // path if ($parts['path'] === $base['path']) { // Take just the basename of the path $p = explode('/', $parts['path']); if ($no_empty_uri) { $parts['path'] = $p[count($p) - 1]; if ($parts['path'] == '') { $parts['path'] = './'; } } else { $parts['path'] = ''; } // query if ($parts['query'] !== $base['query']) { break; } unset($parts['query']); // fragment if ($parts['fragment'] !== $base['fragment']) { break; } unset($parts['fragment']); break; } // Relative path calculation algorithm: // We have two paths, the destination path (where we want to go), and // the base path (where we are coming from). So, we need to: // 1. Find the deepest common parent between the two paths // 2. Determine how many instances of "../" we need to get from the // base path to the parent // 3. Determine the relative path of the destination path with respect // to the parent path, and append this to the "../" sequence. // break down the path $p = explode('/', $parts['path']); // destination path $bp = explode('/', $base['path']); // base path // Determine the tree depth of each of the paths $pDepth = count($p) - 1; $bpDepth = count($bp) - 1; // 1. Find the depth of the deepest common parent (DCP) path between // the two paths, noting that the final path element is not a directory. $n = min(count($p), count($bp)); $dcpDepth = 0; for ($i = 1; $i < $n - 1; $i++) { if ($p[$i] !== $bp[$i]) { break; } $dcpDepth = $i; } // 2. Determine the number of "../"s needed to get from the base path // to the DCP path. $go_up = $bpDepth - $dcpDepth - 1; if ($go_up > 0) { $relpath = str_repeat('../', $go_up); } else { $relpath = ''; } // 3. Determine the relative path of the destination wrt the DCP path, // and add it. $relpath .= implode('/', array_slice($p, $dcpDepth + 1)); if ($relpath == '') { $relpath = './'; } $parts['path'] = $relpath; } while (0); return unparse_uri($parts); }