<style type="text/css"> @import url(css/menu_style.css); </style> <ul id="menu"> <li><a id="<?php echo pageUrl("home", $currentPage); ?> " href="<?php echo BASE_URL; ?> index.php" title="Goto Home Page">Back</a></li> </ul>
<?php ob_start(); header("Content-Type: text/html; charset=utf-8"); require_once "../include_me.php"; $packer = new FeedbackPacker($database); $pack = $packer->packFeedback(); if (isset($_GET["format"]) && strtolower($_GET["format"]) === "json") { header('Content-type: application/json'); echo json_encode($pack); } else { $pack = array_reverse($pack); $packLength = count($pack); $smarty = new Smarty(); $smarty->setTemplateDir("../templates/"); $smarty->assign("feedbackCount", count($pack)); $smarty->assign("pack", $pack); $smarty->assign("packLength", $packLength); $smarty->assign("pageUrl", pageUrl()); $smarty->display("pack.tpl"); } ob_end_flush();
function showDailyRSS() { // Cache system $query = $_SERVER["QUERY_STRING"]; $cache = new CachedPage($GLOBALS['config']['PAGECACHE'], pageUrl(), startsWith($query, 'do=dailyrss') && !isLoggedIn()); $cached = $cache->cachedVersion(); if (!empty($cached)) { echo $cached; exit; } // If cached was not found (or not usable), then read the database and build the response: // Read links from database (and filter private links if used it not logged in). $LINKSDB = new LinkDB($GLOBALS['config']['DATASTORE'], isLoggedIn() || $GLOBALS['config']['OPEN_SHAARLI'], $GLOBALS['config']['HIDE_PUBLIC_LINKS']); /* Some Shaarlies may have very few links, so we need to look back in time (rsort()) until we have enough days ($nb_of_days). */ $linkdates = array(); foreach ($LINKSDB as $linkdate => $value) { $linkdates[] = $linkdate; } rsort($linkdates); $nb_of_days = 7; // We take 7 days. $today = Date('Ymd'); $days = array(); foreach ($linkdates as $linkdate) { $day = substr($linkdate, 0, 8); // Extract day (without time) if (strcmp($day, $today) < 0) { if (empty($days[$day])) { $days[$day] = array(); } $days[$day][] = $linkdate; } if (count($days) > $nb_of_days) { break; // Have we collected enough days? } } // Build the RSS feed. header('Content-Type: application/rss+xml; charset=utf-8'); $pageaddr = escape(indexUrl()); echo '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">'; echo '<channel>'; echo '<title>Daily - ' . $GLOBALS['title'] . '</title>'; echo '<link>' . $pageaddr . '</link>'; echo '<description>Daily shared links</description>'; echo '<language>en-en</language>'; echo '<copyright>' . $pageaddr . '</copyright>' . PHP_EOL; // For each day. foreach ($days as $day => $linkdates) { $daydate = linkdate2timestamp($day . '_000000'); // Full text date $rfc822date = linkdate2rfc822($day . '_000000'); $absurl = escape(indexUrl() . '?do=daily&day=' . $day); // Absolute URL of the corresponding "Daily" page. // Build the HTML body of this RSS entry. $html = ''; $href = ''; $links = array(); // We pre-format some fields for proper output. foreach ($linkdates as $linkdate) { $l = $LINKSDB[$linkdate]; $l['formatedDescription'] = nl2br(keepMultipleSpaces(text2clickable($l['description']))); $l['thumbnail'] = thumbnail($l['url']); $l['timestamp'] = linkdate2timestamp($l['linkdate']); if (startsWith($l['url'], '?')) { $l['url'] = indexUrl() . $l['url']; // make permalink URL absolute } $links[$linkdate] = $l; } // Then build the HTML for this day: $tpl = new RainTPL(); $tpl->assign('title', $GLOBALS['title']); $tpl->assign('daydate', $daydate); $tpl->assign('absurl', $absurl); $tpl->assign('links', $links); $tpl->assign('rfc822date', escape($rfc822date)); $html = $tpl->draw('dailyrss', $return_string = true); echo $html . PHP_EOL; } echo '</channel></rss><!-- Cached version of ' . escape(pageUrl()) . ' -->'; $cache->cache(ob_get_contents()); ob_end_flush(); exit; }
" title="Add Transportation Charges Applicable">Transportation </a> </li> <a id="<?php echo pageUrl("ecnomicexpensis", $currentPage); ?> " href="indexThickBox.php?page=addEcnomicsExpenses&markId=<?php echo $markDetailId; ?> " title="Add Other Overhead Charges Applicable">Other Expences</a> </li> <li> <a id="<?php echo pageUrl("sellingPrice", $currentPage); ?> " href="indexThickBox.php?page=addSellingPrice&markId=<?php echo $markDetailId; ?> " title="Add Proposed Sale Price for each Species">Selling Price</a> </li> </ul> <?php $markDetailId = $_REQUEST['markId']; $markIdDetail = $common->getInfo('c_mark_detail', $markDetailId); echo "Working on Lot-No " . $markIdDetail[0]['vc_lotno'];
</li> <li> <a id="<?php echo pageUrl("marktrees", $currentPage); ?> " href="<?php echo BASE_URL; ?> index.php?page=markTrees" title="Enter marking details">Mark Trees</a> </li> <li> <li> <a id="<?php echo pageUrl("assignwork", $currentPage); ?> " href="<?php echo BASE_URL; ?> index.php?page=assignWorkList" title="Assign Work">Assign Work</a> </li> </ul> </div> <?php } ?> </td> </tr> </table>
function showMonthlyRSS() { // Cache system $query = $_SERVER["QUERY_STRING"]; $cache = new pageCache(pageUrl(), startsWith($query, 'do=weeklyrss') && !isLoggedIn()); $cached = $cache->cachedVersion(); if (!empty($cached)) { echo $cached; exit; } // If cached was not found (or not usable), then read the database and build the response: $LINKSDB = new linkdb(isLoggedIn() || $GLOBALS['config']['OPEN_SHAARLI']); // Read links from database (and filter private links if used it not logged in). /* Some Shaarlies may have very few links, so we need to look back in time (rsort()) until we have enough weeks ($nb_of_weeks). */ $linkdates = array(); foreach ($LINKSDB as $linkdate => $value) { $linkdates[] = $linkdate; } rsort($linkdates); $nb_of_days = 7; // We take 7 days. $today = Date('Ym'); $months = array(); foreach ($linkdates as $linkdate) { $day = substr($linkdate, 0, 6); // Extract day (without time) if (strcmp($day, $today) < 0) { if (empty($months[$day])) { $months[$day] = array(); } $months[$day][] = $linkdate; } if (count($months) > $nb_of_days) { break; } // Have we collected enough months ? } // Build the RSS feed. header('Content-Type: application/rss+xml; charset=utf-8'); $pageaddr = htmlspecialchars(indexUrl()); echo '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">'; echo '<channel><title>Monthly - ' . htmlspecialchars($GLOBALS['title']) . '</title><link>' . $pageaddr . '</link>'; echo '<description>Monthly shared links</description><language>en-en</language><copyright>' . $pageaddr . '</copyright>' . "\n"; foreach ($months as $month => $linkdates) { $monthdate = utf8_encode(strftime('%B %Y', linkdate2timestamp($month . '01_000000'))); // Full text date $rfc822date = linkdate2rfc822($month . '01_000000'); $absurl = htmlspecialchars(indexUrl() . '?do=monthly&month=' . $month); // Absolute URL of the corresponding "Daily" page. echo '<item><title>' . htmlspecialchars($GLOBALS['title'] . ' - ' . $monthdate) . '</title><guid>' . $absurl . '</guid><link>' . $absurl . '</link>'; echo '<pubDate>' . htmlspecialchars($rfc822date) . "</pubDate>\n"; // Build the HTML body of this RSS entry. $html = ''; $href = ''; $links = array(); $tags = array(); // We pre-format some fields for proper output. foreach ($linkdates as $linkdate) { $l = $LINKSDB[$linkdate]; $l['formatedDescription'] = nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($l['description'])))); $l['thumbnail'] = thumbnail($l['url']); $l['localdate'] = linkdate2locale($l['linkdate']); if (startsWith($l['url'], '?')) { $l['url'] = indexUrl() . $l['url']; } // make permalink URL absolute $links[$linkdate] = $l; $links[$linkdate]['taglist'] = explode(' ', $l['tags']); $tags = $l['tags']; } foreach ($tags as $itemtags) { $itemtags = explode(" ", $itemtags); foreach ($itemtags as $tag) { echo "<category>" . $tag . "</category>\n"; } } // Then build the HTML for this week: $tpl = new RainTPL(); $tpl->assign('links', $links); $html = $tpl->draw('weeklyrss', $return_string = true); echo "\n"; echo '<description><![CDATA[' . $html . ']]></description>' . "\n</item>\n\n"; } echo '</channel></rss>'; exit; }
//get page url function pageUrl() { $url = 'http'; if ($_SERVER["HTTPS"] == "on") { $url .= "s"; } $url .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } return $url; } $url = pageUrl(); if (substr($url, -1) == '/') { $url = substr($url, 0, -1); } @header("Location: {$url}/setup"); } else { include_once 'classes/config.php'; include_once 'classes/sessions.php'; include_once 'includes/news.inc.php'; include_once 'online.php'; include_once 'popular.php'; // load required javascripts used in main_1.htm $swfobject = 1; $ahah = 1; $codes_internal = ''; $codes = '';
</li> <li> <a id="<?php echo pageUrl("conversionHomeOpening", $currentPage); ?> " href='index.php?page=conversionHomeOpening&markId=<?php echo $markDetailId; ?> ' title="View your Profile"> Conversion Opening</a> </li> <li> <a id="<?php echo pageUrl("transportationHomeOpening", $currentPage); ?> " href='index.php?page=transportationHomeOpening&markId=<?php echo $markDetailId; ?> ' title="View your Profile"> Transportation Opening</a> </li> </ul> </div> <?php } ?>