function __construct() { if (loggedIn()) { new MenuItem(array("name" => "reportThis", "label" => "<i class='icon ion-flag'></i>", "menu" => "header_right", "title" => "Report This", "page" => "reportThis?p=" . currentURL())); } new Admintab("reported_content"); }
function prepareRequestUri() { $requestUri = ''; $url = currentURL(); $url_parsed = parse_url($url); if ($_SERVER['REQUEST_URI']) { $requestUri = $_SERVER['REQUEST_URI']; $schemeAndHttpHost = $url_parsed['scheme'] . '://' . $url_parsed['host'] . ':' . $url_parsed['port']; if (strpos($requestUri, $schemeAndHttpHost) === 0) { $requestUri = substr($requestUri, strlen($schemeAndHttpHost)); } } return $requestUri; }
function mk_contact_form($atts, $content = null) { $html = '<div class="mkcf-wrapper">'; // check for validation errors if (!empty($_SESSION['mk-validation-errors'])) { $html .= '<div class="alert-box error">'; $html .= implode('<br />', $_SESSION['mk-validation-errors']); $html .= '</div>'; // unset validation errors unset($_SESSION['mk-validation-errors']); } $html .= '<form method="post" action="' . currentURL() . '" id="mk-contact-form">'; // name field $html .= '<div class="input">'; $html .= '<label for="mk-name">Name</label>'; $html .= '<input type="text" class="input-text" id="mk-name" name="mk-name" value="" />'; $html .= '</div>'; // email field $html .= '<div class="input">'; $html .= '<label for="mk-email">Email</label>'; $html .= '<input type="email" class="input-text" id="mk-email" name="mk-email" value="" />'; $html .= '</div>'; // spam bait field $html .= '<div class="input" style="display:none;">'; $html .= '<label for="mk-url">URL</label>'; $html .= '<input type="text" class="input-text" id="mk-url" name="url" value="" />'; $html .= '</div>'; // message field $html .= '<div class="input">'; $html .= '<label for="mk-message">Message</label>'; $html .= '<textarea name="mk-message" rows="5" id="mk-message" class="input-text"></textarea>'; $html .= '</div>'; // submit $html .= '<div class="input">'; $html .= '<input type="hidden" value="' . encrypt(json_encode($atts), ENCRYPTION_KEY) . '" name="mk-atts" />'; $html .= '<input type="submit" value="Send" name="mk-contact" class="button" />'; $html .= '</div>'; $html .= '</form>'; $html .= '</div>'; return $html; }
protected function checkForceLocale(Request $request) { $allSupportedLocaleCodes = allSupportedLocaleCodes(); $isDirectLocale = in_array($request->segment(1), $allSupportedLocaleCodes); $forceLocale = $isDirectLocale ? currentLocaleCode() : SettingsFacade::getLocale(); if ($request->has(AppConfig::KEY_FORCE_LOCALE)) { $forceLocale = $request->input(AppConfig::KEY_FORCE_LOCALE); } if (in_array($forceLocale, $allSupportedLocaleCodes)) { if ($forceLocale != SettingsFacade::getLocale()) { SettingsFacade::setLocale($forceLocale); SettingsFacade::storeSession(); SettingsFacade::storeUser(); } if ($forceLocale != currentLocaleCode()) { $rdr = redirect(currentURL($forceLocale)); return SettingsFacade::storeCookie($rdr); } } return false; }
<?php $role_name = isset($_POST['role_name']) ? $_POST['role_name'] : ''; if (isset($_POST['submit'])) { create_role($role_name); sleep(1); header('location: ' . currentURL() . '?p=role'); print 'Role created. Click <a href="?p=role">here</a> to view created roles'; } ?> <form id="form" method="post" action=""> <table> <tr> <td><label for="role_name">Role's name:</label></td> <td><input type="text" name="role_name" size="60" maxlength="128" class="required" /></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit" /></td> <td><input type="reset" value="Reset" /></td> </tr> </table> </form>
<?php $uid = isset($_POST['uid']) ? $_POST['uid'] : ''; $user = user_load($uid); if (isset($_POST['submit'])) { delete_user($_POST['id']); sleep(1); header('location: ' . currentURL() . '?p=user'); print 'User deleted. Click <a href="?p=user">here</a> to view created users'; } ?> <h3>Do you want to delete the user "<?php print $user['User_Username']; ?> "?</h3> <form method="post" action=""> <input type="hidden" name="id" value="<?php print $uid; ?> "/> <input type="submit" name="submit" value="Delete" /> <button onclick="history.go(-1);return false;">Cancel</button> </form>
continue; } # Add to array $toShow[] = array('name' => $name, 'title' => $details['title'], 'checked' => $options[$name] ? ' checked="checked" ' : ''); } # Prepare variables to pass to template if ($options['encodePage']) { $vars['url'] = ''; # Currently visited URL } else { $vars['url'] = $URL['href']; # Currently visited URL } $vars['toShow'] = $toShow; # Options $vars['return'] = rawurlencode(currentURL()); # Return URL (for clearcookies) (i.e. current URL proxied) $vars['proxy'] = GLYPE_URL; # Base URL for proxy directory # Load the template $insert = loadTemplate('framedForm.inc', $vars); # Wrap in enable/disble override to prevent the overriden functions # affecting anything in the mini-form (like ad codes) if ($CONFIG['override_javascript']) { $insert = '<script type="text/javascript">disableOverride();</script>' . $insert . '<script type="text/javascript">enableOverride();</script>'; } } # And load the footer $footer = $CONFIG['footer_include']; } # Inject javascript unless sniffed
<td> <img src="' . currentURL() . 'images/banner_email.png" width="480" height="80" /> </td> </tr> <tr style="border: 1px solid black;"> <td> <p>Hi <b>' . $fullname . '</b></p> <p>Your new password is: ' . substr($pass, 0, 3) . '***</p> </td> </tr> </table>', '*****@*****.**'); print '<br/>User edited. Click <a href="?p=home">here</a> to go to home page<br/>'; print 'We sent you an email with your changed account information!'; } sleep(3); header('location: ' . currentURL() . '?p=home'); //else print 'This username or email is already taken!'; } else { print '<span style="color: red;">' . implode('<br />', $err) . '<br/></span>'; $old_name = isset($_POST['name']) ? $_POST['name'] : $user['User_Username']; $old_fullname = isset($_POST['fullname']) ? $_POST['fullname'] : $user['User_Fullname']; $old_mail = isset($_POST['mail']) ? $_POST['mail'] : $user['User_Mail']; $old_rid = isset($_POST['rid']) ? $_POST['rid'] : $user['Role_ID']; } } ?> <form id="form" method="post" action=""> <input type="hidden" name="uid" value="<?php print $uid; ?> "/>
function service_description($object) { $class_name = get_class($object); $methods = get_class_methods($class_name); $service = array("sdversion" => "1.0", "name" => "DemoService", "address" => currentURL(), "id" => "urn:md5:" . md5(currentURL())); $static = get_class_vars($class_name); foreach ($methods as $method_name) { $proc = array("name" => $method_name); $method = new ReflectionMethod($class_name, $method_name); $params = array(); foreach ($method->getParameters() as $param) { $params[] = $param->name; } $proc['params'] = $params; $help_str_name = $method_name . "_documentation"; if (array_key_exists($help_str_name, $static)) { $proc['help'] = $static[$help_str_name]; } $service['procs'][] = $proc; } return $service; }
<?php $cid = isset($_POST['cid']) ? $_POST['cid'] : ''; $code = isset($_POST['code']) ? $_POST['code'] : ''; $name = isset($_POST['name']) ? $_POST['name'] : ''; $new_code = isset($_POST['course_code']) ? $_POST['course_code'] : ''; $new_name = isset($_POST['course_name']) ? $_POST['course_name'] : ''; if (isset($_POST['submit'])) { edit_course($_POST['cid'], $new_code, $new_name); sleep(1); header('location: ' . currentURL() . '?p=course'); print 'Course edited. Click <a href="?p=course">here</a> to view created courses'; } ?> <form id="form" method="post" action=""> <input type="hidden" name="cid" value="<?php print $cid; ?> "/> <table> <tr> <td><label for="course_code">New course's code:</label></td> <td><input type="text" name="course_code" value="<?php print $code; ?> " size="60" maxlength="128" class="required" /></td> </tr> <tr> <td><label for="course_name">New course's name:</label></td> <td><input type="text" name="course_name" value="<?php print $name;
function error($type, $allowReload = false) { global $phrases, $flag; // Get extra arguments $args = func_get_args(); // Remove first argument (we have that as $type) array_shift($args); // Check error exists if (!isset($phrases[$type])) { // Force to the "unknown" error message $args = array($type); $type = 'unknown_error'; } // If in frame or ajax, don't redirect back to index if (isset($flag) && ($flag == 'frame' || $flag == 'ajax')) { // Extra arguments to take care of? if ($args) { // Error text must be generated by calling sprintf - we only have // the extra args as an array so we have to use call_user_func_array $errorText = call_user_func_array('sprintf', array_merge((array) $phrases[$type], $args)); } else { // Error text can be fetched simply from the $phrases array $errorText = $phrases[$type]; } die($errorText . ' <a href="index.php">Return to index</a>.'); } // Still here? Not frame so serialize to pass in query string $pass = $args ? '&p=' . base64_encode(serialize($args)) : ''; // Don't cache the error sendNoCache(); // Do we want to allow refresh? $return = $allowReload ? '&return=' . rawurlencode(currentURL()) : ''; // And go to error page redirect('index.php?e=' . $type . $return . $pass); exit; }
<?php include "settings.php"; include "utilities.php"; $imagefolder = $_SERVER['IMAGE_ROOT'] . $_SERVER['ALBUM_FOLDER']; $thumbsfolder = $_SERVER['THUMB_ROOT'] . $_SERVER['ALBUM_FOLDER']; if ($imagefolder == "") { $imagefolder = "."; } echo "<a href='" . currentScript() . "'>home</a>"; if ($_SERVER['ALBUM_FOLDER'] != "") { echo " > "; displayHeirarchy($_SERVER['ALBUM_FOLDER']); } echo "<br/><br/>"; displayDirectories($imagefolder, $_SERVER['ALBUM_FOLDER']); echo "<br/>"; displayPageLinks($imagefolder, $rowsperpage, $imagesperrow); displayThumbs($imagefolder, $thumbsfolder, $thumbsize, $imagesperrow, $rowsperpage); displayPageLinks($imagefolder, $rowsperpage, $imagesperrow); /*echo "<br/><br/>"; echo "<a href='".currentScript()."'>home</a>"; if ($albumfolder != "" ) { echo " > "; displayHeirarchy($albumfolder); }*/ echo "<div align='bottom'><a href='" . currentURL() . "/rss.php'><img border='0' src='rsslogo.gif'/></a><font size='2'>Album Feed</font></div>";
<?php include "settings.php"; include "utilities.php"; // get your news items from somewhere, e.g. your database: $myFile = $_SERVER['RSS_FILE']; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo "<rss version='2.0'>"; echo "<channel>"; echo "<title>" . $_SERVER['WEBSITE_TITLE'] . "</title>"; echo "<link>" . currentURL() . "</link>"; echo "<description>" . $_SERVER['WEBSITE_DESCRIPTION'] . "</description>"; preg_match_all("/<album>.*<name>(.*)<\\/name>.*<link>(.*)<\\/link>.*<\\/album>/", $theData, $matches, PREG_SET_ORDER); $reversedmatches = array_reverse($matches); $count = 0; foreach ($reversedmatches as $val) { writeItem($val[1], $val[2], ""); $count = $count + 1; if ($count >= $_SERVER['MAX_FEED_ITEMS']) { break; } } echo "</channel>"; echo "</rss>"; function writeItem($title, $link, $description) { echo "<item>"; echo "<title>" . $title . "</title>"; echo "<link>" . $link . "</link>";
<?php include "settings.php"; include "utilities.php"; $imagefolder = $_SERVER['IMAGE_ROOT'] . $_SERVER['ALBUM_FOLDER']; $thumbsfolder = $_SERVER['THUMB_ROOT'] . $_SERVER['ALBUM_FOLDER']; echo "<a href='" . currentURL() . "/view_album.php'>Home</a>"; if ($_SERVER['ALBUM_FOLDER'] != "") { echo " > "; displayHeirarchy($_SERVER['ALBUM_FOLDER']); } echo "<br/><br/>"; if (!isset($image)) { echo "Please specify an Image!"; } else { displayImage($imagefolder, $image, $thumbsfolder, $intermediatesize, TRUE); } ?>
<?php include "settings.php"; include "utilities.php"; // get your news items from somewhere, e.g. your database: $myFile = $_SERVER['RSS_FILE']; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo "<rss version='2.0'>"; echo "<channel>"; echo "<title>" . $_SERVER['WEBSITE_TITLE'] . "</title>"; echo "<link>" . currentURL() . "</link>"; echo "<description>" . $_SERVER['WEBSITE_DESCRIPTION'] . "</description>"; preg_match_all("/<album>.*<name>(.*)<\\/name>.*<link>(.*)<\\/link>.*<\\/album>/", $theData, $matches, PREG_SET_ORDER); $reversedmatches = array_reverse($matches); foreach ($reversedmatches as $val) { writeItem($val[1], $val[2], "from <a href='" . currentURL() . "'>" . $_SERVER['HTTP_HOST'] . "</a>"); } echo "</channel>"; echo "</rss>"; function writeItem($title, $link, $description) { echo "<item>"; echo "<title>" . $title . "</title>"; echo "<link>" . $link . "</link>"; echo "<description>" . $description . "</description>"; echo "</item>"; }
if (isset($_POST['flubber_submit'])) { $username = isset($_POST['flubber_username']) ? $_POST['flubber_username'] : ""; $password = isset($_POST['flubber_password']) ? $_POST['flubber_password'] : ""; if ($username == "") { addError("login.username.missing"); } if ($password == "") { addError("login.password.missing"); } if (getErrorCount() > 0) { $forwardpage = "views\\index.php"; } else { if (validate($username, $password) == true) { $_SESSION['username'] = $username; if (isset($_SESSION['current_url'])) { $curl = $_SESSION['current_url']; unset($_SESSION['current_url']); doAction("redirect", $curl); } else { doAction("home"); } $forward = false; } else { addError("login.account.invalid"); $forwardpage = "views\\index.php"; } } } else { $_SESSION['current_url'] = currentURL(); $forwardpage = "views/index.php"; }
<?php $uid = $_SESSION['uid']; $post_cid = isset($_POST['post_cid']) ? $_POST['post_cid'] : ''; $post_course = course_load($post_cid); $cid = isset($_POST['cid']) ? $_POST['cid'] : ''; $week = isset($_POST['week']) ? $_POST['week'] : ''; $title = isset($_POST['title']) ? $_POST['title'] : ''; $url = isset($_POST['url']) ? $_POST['url'] : ''; $body = isset($_POST['body']) ? $_POST['body'] : ''; $answer = isset($_POST['answer']) ? $_POST['answer'] : ''; if (isset($_POST['submit'])) { create_post($uid, $cid, $week, $title, $url, $body, $answer); if (mysql_affected_rows($link) == 1) { sleep(1); header('location: ' . currentURL() . '?p=post'); print 'Post created. Click <a href="?p=post">here</a> to view created posts'; } else { print 'Post not created'; } } ?> <link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" /> <link rel="stylesheet" type="text/css" href="markitup/sets/html/style.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="markitup/jquery.markitup.js"></script> <script type="text/javascript" src="markitup/sets/html/set.js"></script> <script language="javascript"> $(document).ready(function() { $('#body').markItUp(myHtmlSettings); $('#answer').markItUp(myHtmlSettings);
* are proprietary to SocialApparatus and its suppliers and may be covered by U.S. and Foreign * Patents, patents in process, and are protected by trade secret or copyright law. * * Dissemination of this information or reproduction of this material is strictly forbidden * unless prior written permission is obtained from SocialApparatus. * * Contact Shane Barron admin@socia.us for more information. */ namespace SocialApparatus; denyDirect(); $tabs = Vars("tabs"); $content = NULL; foreach ($tabs as $label => $url) { $current = currentURL(); if (currentURL() == $url) { $class = 'active'; } else { $class = ''; } $content .= <<<HTML <li role='presentation' class='{$class}'> <a href='{$url}' aria-controls='' role='tab'>{$label}</a> </li> HTML; } echo <<<HTML <div style="margin-bottom:10px;"> <ul class="nav nav-tabs" role="tablist"> {$content} </ul>
</table> </form> <?php } if ($_SESSION['username']) { header('Location: ' . $_SERVER['HTTP_REFERER'] . ''); } ?> <p id="nav"> <a href="<?php print currentURL(); ?> ?p=user/register">Register</a> | <a href="<?php print currentURL(); ?> ?p=user/password_reset" title="Password Lost and Found">Lost your password?</a> </p> </div> <div class="clear"></div> </div> </div> <?php } if (!isset($_SESSION['username'])) { //If not isset -> set with dumy value $_SESSION['username'] = null; } if ($_SESSION['username']) { $user = user_load($_SESSION['uid']);
<?php $semid = isset($_POST['semid']) ? $_POST['semid'] : ''; $semester = semester_load($semid); if (isset($_POST['submit'])) { delete_role($_POST['id']); sleep(1); header('location: ' . currentURL() . '?p=semester'); } ?> <h3>Do you want to delete the semester "<?php print $semester['Semester_Code']; ?> "?</h3> <form method="post" action=""> <input type="hidden" name="id" value="<?php print $semid; ?> "/> <input type="submit" name="submit" value="Delete" /> <button onclick="history.go(-1);return false;">Cancel</button> </form>
$search = mysql_query("SELECT User_Mail, User_Hash FROM ".PREFIX."USER WHERE User_Mail='".$email."' AND User_Hash='".$hash."'") or die(mysql_error()); $match = mysql_num_rows($search); if($match > 0){ // Make a safe query $query = sprintf("UPDATE `".PREFIX."USER` SET `User_Password` = '%s' WHERE `User_Mail` = '$email'", mysql_real_escape_string($newpassword)); mysql_query($query)or die('Could not update members: ' . mysql_error()); //Email out the infromation $subject = 'Online KMS - Your New Password'; $message = ' <table style="border: 1px solid black;"> <tr style="border: 1px solid black;"> <td> <img src="'.currentURL().'images/banner_email.png" width="480" height="80" /> </td> </tr> <tr style="border: 1px solid black;"> <td> <p>Your new password is as follows:</p> <p>Password: '******'</p> <p>Please make note this information has been encrypted into our database.</p> <p>This email was automatically generated.</p> </td> </tr> </table>'; send_mail($email, $subject, $message, '*****@*****.**'); print ' <table> <tr><th style="text-transform: none; text-align: left;">Notice from the system</th></tr>
function error($type, $allowReload = false) { global $CONFIG, $themeReplace, $options, $phrases, $flag; # Get extra arguments $args = func_get_args(); # Remove first argument (we have that as $type) array_shift($args); # Check error exists # Force to the "unknown" error message if (!isset($phrases[$type])) { $args = array($type); $type = 'unknown_error'; } if ($args) { # Error text must be generated by calling sprintf - we only have # the extra args as an array so we have to use call_user_func_array $errorText = call_user_func_array('sprintf', array_merge((array) $phrases[$type], $args)); } else { # Error text can be fetched simply from the $phrases array $errorText = $phrases[$type]; } # If in frame or ajax, don't redirect back to index if (isset($flag) && ($flag == 'frame' || $flag == 'ajax')) { die($errorText . ' <a href="index.php">Return to index</a>.'); } # Finally add it to the $themeReplace array to get it in there $themeReplace['error'] = '<div id="error">' . $errorText . '</div>'; # And a link to try again? $return = currentURL(); if (strlen($return) > 0) { $themeReplace['error'] .= '<p style="text-align:right">[<a href="' . htmlentities($return) . '">Reload ' . htmlentities(deproxyURL($return)) . '</a>]</p>'; } # Start with an empty array $toShow = array(); # Loop through the available options foreach ($CONFIG['options'] as $name => $details) { # Check we're allowed to choose if (!empty($details['force'])) { continue; } # Generate the HTML 'checked' where appropriate $checked = $options[$name] ? ' checked="checked"' : ''; # Add to the toShow array $toShow[] = array('name' => $name, 'title' => $details['title'], 'desc' => $details['desc'], 'escaped_desc' => str_replace("'", "\\'", $details['desc']), 'checked' => $checked); } sendNoCache(); $vars2['toShow'] = $toShow; echo loadTemplate('main', $vars2); # And flush buffer ob_end_flush(); exit; }
$old_week = isset($_POST['old_week']) ? $_POST['old_week'] : $post['Post_Week']; $old_title = isset($_POST['old_title']) ? $_POST['old_title'] : $post['Post_Title']; $old_url = isset($_POST['old_url']) ? $_POST['old_url'] : $post['Post_URL']; $old_body = isset($_POST['old_body']) ? $_POST['old_body'] : $post['Post_Question']; $old_answer = isset($_POST['old_answer']) ? $_POST['old_answer'] : $post['Post_Answer']; $cid = isset($_POST['cid']) ? $_POST['cid'] : ''; $week = isset($_POST['week']) ? $_POST['week'] : ''; $title = isset($_POST['title']) ? $_POST['title'] : ''; $url = isset($_POST['url']) ? $_POST['url'] : ''; $body = isset($_POST['body']) ? $_POST['body'] : ''; $answer = isset($_POST['answer']) ? $_POST['answer'] : ''; if (isset($_POST['submit'])) { if ($uid == $post['User_ID'] || $_SESSION['rid'] == 1 || $_SESSION['rid'] == 3) { edit_post($_POST['pid'], $cid, $week, $title, $url, $body, $answer); sleep(1); header('location: ' . currentURL() . '?p=question/' . $url); print 'Post edited. Click <a href="?p=post">here</a> to view posts'; } else { print 'Not authorized'; } } ?> <link rel="stylesheet" type="text/css" href="markitup/skins/markitup/style.css" /> <link rel="stylesheet" type="text/css" href="markitup/sets/html/style.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="markitup/jquery.markitup.js"></script> <script type="text/javascript" src="markitup/sets/html/set.js"></script> <script language="javascript"> $(document).ready(function() { //$('#body').markItUp(myHtmlSettings); //$('#answer').markItUp(myHtmlSettings);
<?php $course_code = isset($_POST['course_code']) ? $_POST['course_code'] : ''; $course_name = isset($_POST['course_name']) ? $_POST['course_name'] : ''; if (isset($_POST['submit'])) { create_course($course_code, $course_name); sleep(1); header('location: ' . currentURL() . '?p=course/' . $course_code); print 'Course created. Click <a href="?p=course">here</a> to view created courses'; } ?> <form id="form" method="post" action=""> <table> <tr> <td><label for="course_code">Course code:</label></td> <td><input type="text" name="course_code" size="60" maxlength="128" class="required" /></td> </tr> <tr> <td><label for="course_name">Course name:</label></td> <td><input type="text" name="course_name" size="60" maxlength="128" class="required" /></td> </tr> <tr> <td><input type="submit" name="submit" value="Submit" /></td> <td><input type="reset" value="Reset" /></td> </tr> </table> </form>
if (!count($err)) { create_user($rid, $name, $fullname, '', $pass, $mail, $hash); send_mail($mail, 'Online KMS Registration System - Your New Account', ' <table style="border: 1px solid black;"> <tr style="border: 1px solid black;"> <td> <img src="' . currentURL() . 'images/banner_email.png" width="480" height="80" /> </td> </tr> <tr style="border: 1px solid black;"> <td> <p>Hi <b>' . $fullname . '</b></p> <p>You have just registered an account on Online Knowledge Management system</p> <p>Your ID: ' . $name . '</p> <p>Your Password: '******'***</p> <p>Please click <a href="' . currentURL() . '?p=user/verify&email=' . $mail . '&hash=' . $hash . '">here</a> to activate your account now.</p> </td> </tr> </table> ', '*****@*****.**'); //sleep(1); //header('location: '.currentURL().'?p=home'); print '<br/>User created. Click <a href="?p=home">here</a> to go to home page<br/>'; print 'We sent you an email with your new account information!'; } else { print implode('<br />', $err); } } ?> <form id="form" method="post" action=""> <table>
function displayHeirarchy($albumfolder) { $heirarchy = split('/', $albumfolder); $runningalbum = ""; $first = TRUE; foreach ($heirarchy as $album) { if (!$first) { $runningalbum .= "/"; } else { $first = FALSE; } $runningalbum .= $album; echo "<a href='" . currentURL() . "/" . $_SERVER['GALLERY_ROOT'] . "view_album.php?album=" . $runningalbum . "'> " . $album . "</a> > "; } }
foreach ($optionsDetails as $name => $details) { // Check we're allowed to choose if (!empty($details['force'])) { continue; } // Should the checkbox be checked if (isset($options[$name])) { $checked = $options[$name] ? ' checked="checked"' : ''; } else { $checked = $details['default'] ? ' checked="checked"' : ''; } // Add to array $toShow[] = array('name' => $name, 'title' => $details['title'], 'checked' => $checked); } // Add the form $parserOptions['addForm'] = replaceTags(loadTemplate('framedForm.inc', array('url' => $toLoad, 'toShow' => $toShow, 'return' => urlencode(currentURL())))); } // Parse HTML $fetch->return = parseHTML($fetch->return, $fullDoc); // Encode the whole page? if ($options['encodePage']) { $fetch->return = encodeSource($fetch->return); } break; # CSS document # CSS document case 'css': $fetch->return = parseCSS($fetch->return); break; # Javascript document # Javascript document