function getHeader($pVar) { echo "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" /><title>"; getPageTitle($pVar); echo "</title>"; echo "<link href=\""; echo $pVar['StylePath']; echo "\" type=\"text/css\" rel=\"stylesheet\"></style></head><body>"; }
function modifyPost($id) { global $wpdb; $post = $wpdb->get_results("SELECT post_title, post_content, FROM wp_posts WHERE id = {$id}"); $content = $post[0]->post_content; $url = getUrlFromPost($content); $new_title = getPageTitle($url); $new_title = str_replace("NewsPicks - ", "", $new_title); $link = '<a href="' . $url . '" target="_blank" class="read">詳しい記事を読む</a>'; $image = getPageImage($url); $wpdb->query("UPDATE wp_posts SET post_title = '{$new_title}' WHERE id = {$id} "); $wpdb->query("UPDATE wp_posts SET post_thumbnail = '{$image}' WHERE id = {$id} "); if (stristr($content, " / ") != FALSE) { $comment = explode(' / ', $content); $content = $comment[0] . $link; } else { $content = $link; } $wpdb->query("UPDATE wp_posts SET post_content = '{$content}' WHERE id = {$id} "); }
function getNodeHtml($pageId, $userId, $module, $action, $parentPath) { $htmlOut = ''; if (getPermissions($userId, $pageId, $action, $module)) { $pageInfo = getPageInfo($pageId); $pagePath = $parentPath; if ($pageInfo['page_name'] != '') { $pagePath .= $pageInfo['page_name'] . '/'; } $htmlOut .= "<li><a href=\"{$pagePath}\">" . getPageTitle($pageId) . "</a>\n"; $childrenQuery = 'SELECT `page_id` FROM `' . MYSQL_DATABASE_PREFIX . 'pages` WHERE `page_parentid` <> `page_id` AND `page_parentid` = \'' . $pageId . '\' AND `page_displayinsitemap` = 1'; $childrenResult = mysql_query($childrenQuery); $childrenHtml = ''; while ($childrenRow = mysql_fetch_row($childrenResult)) { $childrenHtml .= $this->getNodeHtml($childrenRow[0], $userId, $module, $action, $pagePath); } if ($childrenHtml != '') { $htmlOut .= "<ul>{$childrenHtml}</ul>\n"; } $htmlOut .= "</li>\n"; } return $htmlOut; }
function submitRegistrationForm($moduleCompId, $userId, $silent = false, $disableCaptcha = false) { ///-------------------------Get anonymous unique negative user id--------------- if ($userId == 0) { $useridQuery = "SELECT MIN(`user_id`) - 1 AS MIN FROM `form_regdata` WHERE 1"; $useridResult = mysql_query($useridQuery); if (mysql_num_rows($useridResult) > 0) { $useridRow = mysql_fetch_assoc($useridResult); $userId = $useridRow['MIN']; } else { $userId = -1; } } ///-----------------------------Anonymous user id ends------------------------------- ///---------------------------- CAPTCHA Validation ---------------------------------- if (!$disableCaptcha) { $captchaQuery = 'SELECT `form_usecaptcha` FROM `form_desc` WHERE `page_modulecomponentid` = \'' . $moduleCompId . "'"; $captchaResult = mysql_query($captchaQuery); $captchaRow = mysql_fetch_row($captchaResult); if ($captchaRow[0] == 1) { if (!submitCaptcha()) { return false; } } } ///------------------------ CAPTCHA Validation Ends Here ---------------------------- $query = "SELECT `form_elementid`,`form_elementtype` FROM `form_elementdesc` WHERE `page_modulecomponentid`='{$moduleCompId}'"; $result = mysql_query($query); $allFieldsUpdated = true; while ($elementRow = mysql_fetch_assoc($result)) { $type = $elementRow['form_elementtype']; $elementId = $elementRow['form_elementid']; $postVarName = "form_" . $moduleCompId . "_element_" . $elementRow['form_elementid']; $functionName = "submitRegistrationForm" . ucfirst(strtolower($type)); $elementDescQuery = "SELECT `form_elementname`,`form_elementsize`,`form_elementtypeoptions`,`form_elementmorethan`," . "`form_elementlessthan`,`form_elementcheckint`,`form_elementisrequired` FROM `form_elementdesc` " . "WHERE `page_modulecomponentid`='{$moduleCompId}' AND `form_elementid` ='{$elementId}'"; $elementDescResult = mysql_query($elementDescQuery); if (!$elementDescResult) { displayerror('E69 : Invalid query: ' . mysql_error()); return false; } $elementDescRow = mysql_fetch_assoc($elementDescResult); $elementName = $elementDescRow['form_elementname']; $elementSize = $elementDescRow['form_elementsize']; $elementTypeOptions = $elementDescRow['form_elementtypeoptions']; $elementMoreThan = $elementDescRow['form_elementmorethan']; $elementLessThan = $elementDescRow['form_elementlessthan']; $elementCheckInt = $elementDescRow['form_elementcheckint'] == 1 ? true : false; $elementIsRequired = $elementDescRow['form_elementisrequired'] == 1 ? true : false; if ($functionName($moduleCompId, $elementId, $userId, $postVarName, $elementName, $elementSize, $elementTypeOptions, $elementMoreThan, $elementLessThan, $elementCheckInt, $elementIsRequired) == false) { // displayerror("Error in inputting data in function $functionName."); $allFieldsUpdated = false; break; } } if (!$allFieldsUpdated) { if ($userId < 0) { unregisterUser($moduleCompId, $userId); } else { if (!verifyUserRegistered($moduleCompId, $userId)) { $deleteelementdata_query = "DELETE FROM `form_elementdata` WHERE `user_id` = '{$userId}' AND `page_modulecomponentid` ='{$moduleCompId}' "; $deleteelementdata_result = mysql_query($deleteelementdata_query); } return false; } } else { if (!verifyUserRegistered($moduleCompId, $userId)) { registerUser($moduleCompId, $userId); } else { updateUser($moduleCompId, $userId); } if (!$silent) { $footerQuery = "SELECT `form_footertext`, `form_sendconfirmation` FROM `form_desc` WHERE `page_modulecomponentid` = '{$moduleCompId}'"; $footerResult = mysql_query($footerQuery); $footerRow = mysql_fetch_row($footerResult); $footerText = $footerRow[0]; $footerTextLength = strlen($footerText); if ($footerTextLength > 7) { if (substr($footerText, 0, 4) == '<!--' && substr($footerText, $footerTextLength - 3) == '-->') { $footerText = substr($footerText, 4, $footerTextLength - 7); } else { $footerText = ''; } } else { $footerText = ''; } displayinfo($footerText == '' ? "User successfully registered!" : $footerText); // send mail code starts here - see common.lib.php for more if ($footerRow[1]) { $from = ''; // Default CMS email will be added automatically if this is left blank $to = getUserEmail($userId); $pageId = getPageIdFromModuleComponentId('form', $moduleCompId); $parentPage = getParentPage($pageId); $formname = getPageTitle($parentPage); $keyid = $finalName = str_pad($userId, 5, '0', STR_PAD_LEFT); $key = ''; $mailtype = "form_registration_mail"; $messenger = new messenger(false); global $onlineSiteUrl; $messenger->assign_vars(array('FORMNAME' => "{$formname}", 'KEY' => "{$key}", 'WEBSITE' => CMS_TITLE, 'DOMAIN' => $onlineSiteUrl, 'NAME' => getUserFullName($userId))); if ($messenger->mailer($to, $mailtype, $key, $from)) { displayinfo("You have been succesfully registered to {$formname} and a registration confirmation mail has been sent. Kindly check your e-mail."); } else { displayerror("Registration confirmation mail sending failure. Kindly contact webadmin@pragyan.org"); } } // send mail code ends here } } return true; }
/** * Displays the page header * * @since 1.0 * @package facileManager * * @param string $response Page form response * @param string $title The page title * @param bool $allowed_to_add Whether the user can add new * @param string $name Name value of plus sign * @param string $rel Rel value of plus sign * @return string */ function printPageHeader($response = null, $title = null, $allowed_to_add = false, $name = null, $rel = null) { global $__FM_CONFIG; if (empty($title)) { $title = getPageTitle(); } echo '<div id="body_container">' . "\n"; if (!empty($response)) { echo '<div id="response"><p class="error">' . $response . "</p></div>\n"; } else { echo '<div id="response" style="display: none;"></div>' . "\n"; } echo '<h2>' . $title; if ($allowed_to_add) { echo displayAddNew($name, $rel); } echo '</h2>' . "\n"; }
<!DOCTYPE html> <?php require 'utilities/utils.php'; if (array_key_exists('page', $_GET)) { $askedPage = $_GET['page']; } else { $askedPage = "accueil"; } $authorized = checkPage($askedPage); if ($authorized) { $pageTitle = getPageTitle($askedPage); } else { $pageTitle = "Cette page n'est pas accessible"; $askedPage = "erreur"; } generateHTMLHeader($pageTitle); ?> <div class="container"> <?php generateMenu($askedPage); ?> <div class="jumbotron"> <?php echo "<h1>{$pageTitle}</h1>"; ?> <p>Ceci est le site du binet photo</p> </div> <div id="content"> <?php if ($authorized) {
public function actionView() { global $sourceFolder, $cmsFolder, $templateFolder, $moduleFolder, $urlRequestRoot; require_once "{$sourceFolder}/{$moduleFolder}/faculty/template_edit.php"; $viewDetail = ""; $templateId = getTemplateId($this->moduleComponentId); $sectionDetail = getTemplateDataFromModuleComponentId($this->moduleComponentId); $title = getPageTitle(getPageIdFromModuleComponentId("faculty", $this->moduleComponentId)); $getImage = "SELECT * FROM `faculty_module` WHERE `page_moduleComponentId`={$this->moduleComponentId}"; $getImageQuery = mysql_query($getImage); $isExistPh = mysql_fetch_assoc($getImageQuery); $viewDetail .= <<<IMG \t <div style="text-align:center;"> \t <img src="{$isExistPh['photo']}" /> \t </div> IMG; require_once $sourceFolder . "/pngRender.class.php"; $render = new pngrender(); $emailId = getEmailForFaculty($this->moduleComponentId); $ret = $render->transform("[tex]" . $emailId . "[/tex]"); $viewDetail .= "<h3 style='text-align:center;'>Email:{$ret}</h3>"; while ($sectionDetailArray = mysql_fetch_assoc($sectionDetail)) { $sectionId = $sectionDetailArray['template_sectionId']; $printFacData = printFacultyData($sectionId, $this->moduleComponentId, 0); if ($printFacData != "") { $viewDetail .= <<<facultyName \t\t<h2>{$sectionDetailArray['template_sectionName']}</h2><hr> facultyName; } $viewDetail .= "<br/><br/>"; $sectionChildNode1DetailQuery = "SELECT * FROM `faculty_template` WHERE `template_id`={$templateId} AND "; $sectionChildNode1DetailQuery .= "`template_sectionParentId`={$sectionDetailArray['template_sectionId']}"; $sectionChildNode1DetailResult = mysql_query($sectionChildNode1DetailQuery); $viewDetail .= $printFacData; while ($sectionChildNode1DetailArray = mysql_fetch_assoc($sectionChildNode1DetailResult)) { $facultyData = printFacultyData($sectionChildNode1DetailArray['template_sectionId'], $this->moduleComponentId, 1); $viewDetail .= <<<facultyName \t\t<h3>{$facultyData}</h3> facultyName; $sectionChildNode2DetailQuery = "SELECT * FROM `faculty_template` WHERE `template_id`={$templateId} AND "; $sectionChildNode2DetailQuery .= "`template_sectionParentId`={$sectionChildNode1DetailArray['template_sectionId']}"; $sectionChildNode2DetailResult = mysql_query($sectionChildNode2DetailQuery); while ($sectionChildNode2DetailArray = mysql_fetch_assoc($sectionChildNode2DetailResult)) { $facultyDataChild = printFacultyData($sectionChildNode2DetailArray['template_sectionId'], $this->moduleComponentId, 1); $viewDetail .= <<<facultyName \t\t <h4>{$facultyDataChild}</h4> facultyName; } $viewDetail .= "<br/>"; } } return $viewDetail; }
<?php include_once "{$_SERVER['DOCUMENT_ROOT']}/phase5/inc/inc.info.php"; session_start(); # Checks if logged in. If NOT logged in, the login button stays the same. # If IS logged in, the login button changes to logout. if (isset($_SESSION['loggedin'])) { $loggedin = $_SESSION['loggedin']; } # Gets ID. ID is passed as a GET method. Creates a Title class # this class contains all the title data if (isset($_GET['id'])) { getTitleData($_GET['id']); $_SESSION['title_id'] = $_GET['id']; } $pageTitle = getPageTitle(); // To get the title for favoriting $_SESSION['title'] = $pageTitle; if (isset($_SESSION['favorites'])) { if (in_array($_SESSION['title'], $_SESSION['favorites'])) { $isFavorite = true; } } include_once "{$_SERVER['DOCUMENT_ROOT']}/phase5/inc/header.php"; // Body content ?> <div class="wrap"> <div class="row"> <div class="col-md-8"> <img class="img-responsive img-rounded pull-right" src="../images/info_banner_1.jpg" alt="<?php getTitle();
function checkIfUserAlreadyHasThisUrl($url, $userID) { $query = "SELECT * from links where url = ? and userID = ?"; $params = [$url, $userID]; $result = selectQuery($query, $params); if (count($result) == 1) { return 0; } else { return 1; } } if (checkIfUserAlreadyHasThisUrl($url, $userID) == 0) { echo "link already exists"; break; } else { $title = getPageTitle($url); $query = "INSERT into links (userID, url, title, timestamp) VALUES (?, ?, ?, now())"; $params = [$userID, $url, $title]; $lastInserted = editQuery($query, $params); if (strlen($tags) > 0) { $tagString = strtolower($tags); $tags = stringToArray($tagString); $tags = array_unique($tags); foreach ($tags as $tag) { $query = "SELECT * from tags WHERE tag = ?"; $params = [$tag]; $res = selectQuery($query, $params); if (count($res) == 0) { $query = "INSERT into tags (tag) VALUES (?)"; $params = [$tag]; editQuery($query, $params);
function create_quiz_list($php_filename) { global $interface_lang; $html_filename = "./html/" . substr($php_filename, 0, -4) . "-list.html"; $base_filename = basename($php_filename, ".php"); $page_title = getPageTitle($php_filename); ob_start(); include $php_filename; echo <<<_END <!DOCTYPE html> <html lang="{$interface_lang}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Μελετώ: {$page_title}</title> <link rel="stylesheet" href="/css/greek-visual-keyboard.css"> <link rel="stylesheet" href="/css/quiz.css"> <link rel="stylesheet" href="/css/styles.css"> </head> <body> _END; navbar(dirname($php_filename)); echo <<<_END <div class="center"> {$page_title}<br> <p id="quizTitle"></p> <div id="loading"><img src="/img/icons/spin.gif" alt="spinner"></div> <table id="list"> </table> <p> <a href="index.html"><img src="/img/icons/revert.png" alt="back"></a> <img src="/img/icons/spacer.png" alt=" "> <a href="{$base_filename}.html"><img src="/img/icons/pencil_plain.png" alt="pencil"></a> <img src="/img/icons/spacer.png" alt=" "> <a href="/html/{$interface_lang}/index.html"><img src="/img/icons/home.png" alt="home"></a> </p> </div> <!-- end center --> <script src="/js/jquery.js"></script> <!-- preload icons --> <script src="/js/preload-icons.js"></script> <!-- quiz scripts --> <script src="{$base_filename}.js"></script> <script src="/js/list.js"></script> <script> \$(window).load(function () { \$("#loading").hide(); }); </script> </body> </html> _END; file_put_contents($html_filename, ob_get_clean()); }
<?php getHeader($pVar); getPageTitle($pVar); ?> <h1>Vediamo se funziona davvero questa pagina di Template</h1> <?php testing(); getFooter(); closePage();
include 'db_connect.php'; include 'core.php'; if (isset($_GET['logout'])) { session_destroy(); echo "<script>\n\n\n setTimeout(window.location.replace('/scc/'), 300);\n\n </script>"; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title><?php if (isset($_GET['page'])) { echo getPageTitle($_GET['page']); } ?> </title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="layout" content="main"/> <script src="js/jquery/jquery-1.8.2.min.js" type="text/javascript" ></script> <link href="css/customize-template.css" type="text/css" media="screen, projection" rel="stylesheet" /> <link href="css/treeview.css" type="text/css" media="screen, projection" rel="stylesheet" /> <style> </style> <script src="js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
<?php # Include files required for the site to work properly. require_once "includes/scripts/php/config.php"; require_once "includes/scripts/php/functions.php"; # Get some information that will be needed to render the page properly. $validUser = userAuth($connection); # If a page has been requested, get the information for it. if (isset($_GET['p'])) { $page = getPage($_GET['p']); $pageTitle = getPageTitle($_GET['p']); } else { $page = "home.php"; $pageTitle = "- Home"; } # If the user is logged into a valid account, get information needed to # display the page. if ($validUser) { # Get the account's username from the active session. session_start(); $username = $_SESSION['user'][0]; session_write_close(); # Get the name associated with the user's account. $name = getName($username, $connection); # Determine if there are any active, unaccepted challenges for the # account. $hasChallenges = hasChallenges($username, $connection); } ?> <!DOCTYPE html>
die('not found'); } foreach ($fql_query_obj as $key => $row) { $like_count[$key] = $row['like_count']; } array_multisort($like_count, SORT_DESC, $fql_query_obj); $ranking = array_slice($fql_query_obj, 0, $limit); apc_store($hash_key, $ranking); } $string = "<tr>\n"; $string .= "<th>title</th>\n"; $string .= "<th>liked</th>\n"; $string .= "</tr>\n"; foreach ($ranking as &$val) { //if ($val['like_count'] == 0) continue; $val['title'] = getPageTitle($val['url']); $string .= "<tr>"; $string .= '<td><a href="' . $val['url'] . '" target="_blank">' . $val['title'] . "</a></td>\n"; $string .= "<td>" . $val['like_count'] . "</td>\n"; $string .= "</tr>\n"; } echo $string; exit; function getPageTitle($url) { // なぜか file_get_contentsが動かないのでとりあえず… return $url; $html = file_get_contents($url); $html = mb_convert_encoding($html, mb_internal_encoding(), "auto"); if (preg_match("/<title>(.*?)<\\/title>/i", $html, $matches)) { return $matches[1];
function groupManagementForm($currentUserId, $modifiableGroups, &$pagePath) { require_once "group.lib.php"; global $ICONS; global $urlRequestRoot, $cmsFolder, $templateFolder, $moduleFolder, $sourceFolder; $scriptsFolder = "{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/scripts"; $imagesFolder = "{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/images"; /// Parse any get variables, do necessary validation and stuff, so that we needn't check inside every if $groupRow = $groupId = $userId = null; $subAction = ''; //isset($_GET['subaction']) ? $_GET['subaction'] : ''; if (isset($_GET['subsubaction']) && $_GET['subsubaction'] == 'editgroup' && isset($_GET['groupname']) || isset($_POST['btnEditGroup']) && isset($_POST['selEditGroups'])) { $subAction = 'showeditform'; } elseif (isset($_GET['subsubaction']) && $_GET['subsubaction'] == 'associateform') { $subAction = 'associateform'; } elseif (isset($_GET['subsubaction']) && $_GET['subsubaction'] == 'deleteuser' && isset($_GET['groupname']) && isset($_GET['useremail'])) { $subAction = 'deleteuser'; } elseif (isset($_POST['btnAddUserToGroup'])) { $subAction = 'addusertogroup'; } elseif (isset($_POST['btnSaveGroupProperties'])) { $subAction = 'savegroupproperties'; } elseif (isset($_POST['btnEditGroupPriorities']) || isset($_GET['subsubaction']) && $_GET['subsubaction'] == 'editgrouppriorities') { $subAction = 'editgrouppriorities'; } if (isset($_POST['selEditGroups']) || isset($_GET['groupname'])) { $groupRow = getGroupRow(isset($_POST['selEditGroups']) ? escape($_POST['selEditGroups']) : escape($_GET['groupname'])); $groupId = $groupRow['group_id']; if ($subAction != 'editgrouppriorities' && (!$groupRow || !$groupId || $groupId < 2)) { displayerror('Error! Invalid group requested.'); return; } if (!is_null($groupId)) { if ($modifiableGroups[count($modifiableGroups) - 1]['group_priority'] < $groupRow['group_priority']) { displayerror('You do not have the permission to modify the selected group.'); return ''; } } } if (isset($_GET['useremail'])) { $userId = getUserIdFromEmail($_GET['useremail']); } if ($subAction != 'editgrouppriorities' && (isset($_GET['subaction']) && $_GET['subaction'] == 'editgroups' && !is_null($groupId))) { if ($subAction == 'deleteuser') { if ($groupRow['form_id'] != 0) { displayerror('The group is associated with a form. To remove a user, use the edit registrants in the assoicated form.'); } elseif (!$userId) { displayerror('Unknown E-mail. Could not find a registered user with the given E-mail Id'); } else { $deleteQuery = 'DELETE FROM `' . MYSQL_DATABASE_PREFIX . 'usergroup` WHERE `user_id` = \'' . $userId . '\' AND `group_id` = ' . $groupId; $deleteResult = mysql_query($deleteQuery); if (!$deleteResult || mysql_affected_rows() != 1) { displayerror('Could not delete user with the given E-mail from the given group.'); } else { displayinfo('Successfully removed user from the current group'); if ($userId == $currentUserId) { $virtue = ''; $maxPriorityGroup = getMaxPriorityGroup($pagePath, $currentUserId, array_reverse(getGroupIds($currentUserId)), $virtue); $modifiableGroups = getModifiableGroups($currentUserId, $maxPriorityGroup, $ordering = 'asc'); } } } } elseif ($subAction == 'savegroupproperties' && isset($_POST['txtGroupDescription'])) { $updateQuery = "UPDATE `" . MYSQL_DATABASE_PREFIX . "groups` SET `group_description` = '" . escape($_POST['txtGroupDescription']) . "' WHERE `group_id` = '{$groupId}'"; $updateResult = mysql_query($updateQuery); if (!$updateResult) { displayerror('Could not update database.'); } else { displayinfo('Changes to the group have been successfully saved.'); } $groupRow = getGroupRow($groupRow['group_name']); } elseif ($subAction == 'addusertogroup' && isset($_POST['txtUserEmail']) && trim($_POST['txtUserEmail']) != '') { if ($groupRow['form_id'] != 0) { displayerror('The selected group is associated with a form. To add a user, register the user to the form.'); } else { $passedEmails = explode(',', escape($_POST['txtUserEmail'])); for ($i = 0; $i < count($passedEmails); $i++) { $hyphenPos = strpos($passedEmails[$i], '-'); if ($hyphenPos >= 0) { $userEmail = trim(substr($passedEmails[$i], 0, $hyphenPos - 1)); } else { $userEmail = escape($_POST['txtUserEmail']); } $userId = getUserIdFromEmail($userEmail); if (!$userId || $userId < 1) { displayerror('Unknown E-mail. Could not find a registered user with the given E-mail Id'); } if (!addUserToGroupName($groupRow['group_name'], $userId)) { displayerror('Could not add the given user to the current group.'); } else { displayinfo('User has been successfully inserted into the given group.'); } } } } elseif ($subAction == 'associateform') { if (isset($_POST['btnAssociateGroup'])) { $pageIdArray = array(); $formPageId = parseUrlReal(escape($_POST['selFormPath']), $pageIdArray); if ($formPageId <= 0 || getPageModule($formPageId) != 'form') { displayerror('Invalid page selected! The page you selected is not a form.'); } elseif (!getPermissions($currentUserId, $formPageId, 'editregistrants', 'form')) { displayerror('You do not have the permissions to associate the selected form with a group.'); } else { $formModuleId = getModuleComponentIdFromPageId($formPageId, 'form'); require_once "{$sourceFolder}/{$moduleFolder}/form.lib.php"; if (isGroupEmpty($groupId) || form::getRegisteredUserCount($formModuleId) == 0) { associateGroupWithForm($groupId, $formModuleId); $groupRow = getGroupRow($groupRow['group_name']); } else { displayerror('Both the group and the form already contain registered users, and the group cannot be associated with the selected form.'); } } } elseif (isset($_POST['btnUnassociateGroup'])) { if ($groupRow['form_id'] <= 0) { displayerror('The selected group is currently not associated with any form.'); } elseif (!getPermissions($currentUserId, getPageIdFromModuleComponentId('form', $groupRow['form_id']), 'editregistrants', 'form')) { displayerror('You do not have the permissions to unassociate the form from this group.'); } else { unassociateFormFromGroup($groupId); $virtue = ''; $maxPriorityGroup = getMaxPriorityGroup($pagePath, $currentUserId, array_reverse(getGroupIds($currentUserId)), $virtue); $modifiableGroups = getModifiableGroups($currentUserId, $maxPriorityGroup, $ordering = 'asc'); $groupRow = getGroupRow($groupRow['group_name']); } } } if ($modifiableGroups[count($modifiableGroups) - 1]['group_priority'] < $groupRow['group_priority']) { displayerror('You do not have the permission to modify the selected group.'); return ''; } $usersTable = '`' . MYSQL_DATABASE_PREFIX . 'users`'; $usergroupTable = '`' . MYSQL_DATABASE_PREFIX . 'usergroup`'; $userQuery = "SELECT `user_email`, `user_fullname` FROM {$usergroupTable}, {$usersTable} WHERE `group_id` = '{$groupId}' AND {$usersTable}.`user_id` = {$usergroupTable}.`user_id` ORDER BY `user_email`"; $userResult = mysql_query($userQuery); if (!$userResult) { displayerror('Error! Could not fetch group information.'); return ''; } $userEmails = array(); $userFullnames = array(); while ($userRow = mysql_fetch_row($userResult)) { $userEmails[] = $userRow[0]; $userFullnames[] = $userRow[1]; } $groupEditForm = <<<GROUPEDITFORM \t\t\t<h2>Group '{$groupRow['group_name']}' - '{$groupRow['group_description']}'</h2><br /> \t\t\t<fieldset style="padding: 8px"> \t\t\t\t<legend>{$ICONS['User Groups']['small']}Group Properties</legend> \t\t\t\t<form name="groupeditform" method="POST" action="./+admin&subaction=editgroups&groupname={$groupRow['group_name']}"> \t\t\t\t\tGroup Description: <input type="text" name="txtGroupDescription" value="{$groupRow['group_description']}" /> \t\t\t\t\t<input type="submit" name="btnSaveGroupProperties" value="Save Group Properties" /> \t\t\t\t</form> \t\t\t</fieldset> \t\t\t<br /> \t\t\t<fieldset style="padding: 8px"> \t\t\t\t<legend>{$ICONS['User Groups']['small']}Existing Users in Group:</legend> GROUPEDITFORM; $userCount = mysql_num_rows($userResult); global $urlRequestRoot, $cmsFolder, $templateFolder, $sourceFolder; $deleteImage = "<img src=\"{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/icons/16x16/actions/edit-delete.png\" alt=\"Remove user from the group\" title=\"Remove user from the group\" />"; for ($i = 0; $i < $userCount; $i++) { $isntAssociatedWithForm = $groupRow['form_id'] == 0; if ($isntAssociatedWithForm) { $groupEditForm .= '<a onclick="return confirm(\'Are you sure you wish to remove this user from this group?\')" href="./+admin&subaction=editgroups&subsubaction=deleteuser&groupname=' . $groupRow['group_name'] . '&useremail=' . $userEmails[$i] . '">' . $deleteImage . "</a>"; } $groupEditForm .= " {$userEmails[$i]} - {$userFullnames[$i]}<br />\n"; } $associateForm = ''; if ($groupRow['form_id'] == 0) { $associableForms = getAssociableFormsList($currentUserId, !isGroupEmpty($groupId)); $associableFormCount = count($associableForms); $associableFormsBox = '<select name="selFormPath">'; for ($i = 0; $i < $associableFormCount; ++$i) { $associableFormsBox .= '<option value="' . $associableForms[$i][2] . '">' . $associableForms[$i][1] . ' - ' . $associableForms[$i][2] . '</option>'; } $associableFormsBox .= '</select>'; $associateForm = <<<GROUPASSOCIATEFORM \t\t\tSelect a form to associate the group with: {$associableFormsBox} \t\t\t<input type="submit" name="btnAssociateGroup" value="Associate Group with Form" /> GROUPASSOCIATEFORM; } else { $associatedFormPageId = getPageIdFromModuleComponentId('form', $groupRow['form_id']); $associateForm = 'This group is currently associated with the form: ' . getPageTitle($associatedFormPageId) . ' (' . getPagePath($associatedFormPageId) . ')<br />' . '<input type="submit" name="btnUnassociateGroup" value="Unassociate" />'; } $groupEditForm .= '</fieldset>'; if ($groupRow['form_id'] == 0) { $groupEditForm .= <<<GROUPEDITFORM \t\t\t\t<br /> \t\t\t\t<fieldset style="padding: 8px"> \t\t\t\t\t<legend>{$ICONS['Add']['small']}Add Users to Group</legend> \t\t\t\t\t<form name="addusertogroup" method="POST" action="./+admin&subaction=editgroups&groupname={$groupRow['group_name']}"> \t\t\t\t\t\tEmail ID: <input type="text" name="txtUserEmail" id="txtUserEmail" value="" style="width: 256px" autocomplete="off" /> \t\t\t\t\t\t<div id="suggestionDiv" class="suggestionbox"></div> \t\t\t\t\t\t<script language="javascript" type="text/javascript" src="{$scriptsFolder}/ajaxsuggestionbox.js"></script> \t\t\t\t\t\t<script language="javascript" type="text/javascript"> \t\t\t\t\t\t<!-- \t\t\t\t\t\t\tvar addUserBox = new SuggestionBox(document.getElementById('txtUserEmail'), document.getElementById('suggestionDiv'), "./+admin&doaction=getsuggestions&forwhat=%pattern%"); \t\t\t\t\t\t\taddUserBox.loadingImageUrl = '{$imagesFolder}/ajaxloading.gif'; \t\t\t\t\t\t--> \t\t\t\t\t\t</script> \t\t\t\t\t\t<input type="submit" name="btnAddUserToGroup" value="Add User to Group" /> \t\t\t\t\t</form> \t\t\t\t</fieldset> GROUPEDITFORM; } $groupEditForm .= <<<GROUPEDITFORM \t\t\t<br /> \t\t\t<fieldset style="padding: 8px"> \t\t\t\t<legend>{$ICONS['Group Associate Form']['small']}Associate With Form</legend> \t\t\t\t<form name="groupassociationform" action="./+admin&subaction=editgroups&subsubaction=associateform&groupname={$groupRow['group_name']}" method="POST"> \t\t\t\t\t{$associateForm} \t\t\t\t</form> \t\t\t</fieldset> GROUPEDITFORM; return $groupEditForm; } if ($subAction == 'editgrouppriorities') { $modifiableCount = count($modifiableGroups); $userMaxPriority = $maxPriorityGroup = 1; if ($modifiableCount != 0) { $userMaxPriority = max($modifiableGroups[0]['group_priority'], $modifiableGroups[$modifiableCount - 1]['group_priority']); $maxPriorityGroup = $modifiableGroups[0]['group_priority'] > $modifiableGroups[$modifiableCount - 1]['group_priority'] ? $modifiableGroups[0]['group_id'] : $modifiableGroups[$modifiableCount - 1]['group_id']; } if (isset($_GET['dowhat']) && !is_null($groupId)) { if ($_GET['dowhat'] == 'incrementpriority' || $_GET['dowhat'] == 'decrementpriority') { shiftGroupPriority($currentUserId, $groupRow['group_name'], $_GET['dowhat'] == 'incrementpriority' ? 'up' : 'down', $userMaxPriority, true); } elseif ($_GET['dowhat'] == 'movegroupup' || $_GET['dowhat'] == 'movegroupdown') { shiftGroupPriority($currentUserId, $groupRow['group_name'], $_GET['dowhat'] == 'movegroupup' ? 'up' : 'down', $userMaxPriority, false); } elseif ($_GET['dowhat'] == 'emptygroup') { emptyGroup($groupRow['group_name']); } elseif ($_GET['dowhat'] == 'deletegroup') { if (deleteGroup($groupRow['group_name'])) { $virtue = ''; $maxPriorityGroup = getMaxPriorityGroup($pagePath, $currentUserId, array_reverse(getGroupIds($currentUserId)), $virtue); $modifiableGroups = getModifiableGroups($currentUserId, $maxPriorityGroup, $ordering = 'asc'); } } $modifiableGroups = reevaluateGroupPriorities($modifiableGroups); } elseif (isset($_GET['dowhat']) && $_GET['dowhat'] == 'addgroup') { if (isset($_POST['txtGroupName']) && isset($_POST['txtGroupDescription']) && isset($_POST['selGroupPriority'])) { $existsQuery = 'SELECT `group_id` FROM `' . MYSQL_DATABASE_PREFIX . "groups` WHERE `group_name` = '" . escape($_POST['txtGroupName']) . "'"; $existsResult = mysql_query($existsQuery); if (trim($_POST['txtGroupName']) == '') { displayerror('Cannot create a group with an empty name. Please type in a name for the new group.'); } elseif (mysql_num_rows($existsResult) >= 1) { displayerror('A group with the name you specified already exists.'); } else { $idQuery = 'SELECT MAX(`group_id`) FROM `' . MYSQL_DATABASE_PREFIX . 'groups`'; $idResult = mysql_query($idQuery); $idRow = mysql_fetch_row($idResult); $newGroupId = 2; if (!is_null($idRow[0])) { $newGroupId = $idRow[0] + 1; } $newGroupPriority = 1; if ($_POST['selGroupPriority'] <= $userMaxPriority && $_POST['selGroupPriority'] > 0) { $newGroupPriority = escape($_POST['selGroupPriority']); } $addGroupQuery = 'INSERT INTO `' . MYSQL_DATABASE_PREFIX . 'groups` (`group_id`, `group_name`, `group_description`, `group_priority`) ' . "VALUES({$newGroupId}, '" . escape($_POST['txtGroupName']) . "', '" . escape($_POST['txtGroupDescription']) . "', '{$newGroupPriority}')"; $addGroupResult = mysql_query($addGroupQuery); if ($addGroupResult) { displayinfo('New group added successfully.'); if (isset($_POST['chkAddMe'])) { $insertQuery = 'INSERT INTO `' . MYSQL_DATABASE_PREFIX . "usergroup`(`user_id`, `group_id`) VALUES ('{$currentUserId}', '{$newGroupId}')"; if (!mysql_query($insertQuery)) { displayerror('Error adding user to newly created group: ' . $insertQuery . '<br />' . mysql_query()); } } $virtue = ''; $maxPriorityGroup = getMaxPriorityGroup($pagePath, $currentUserId, array_reverse(getGroupIds($currentUserId)), $virtue); $modifiableGroups = getModifiableGroups($currentUserId, $maxPriorityGroup, $ordering = 'asc'); } else { displayerror('Could not run MySQL query. New group could not be added.'); } } } $modifiableGroups = reevaluateGroupPriorities($modifiableGroups); } $modifiableCount = count($modifiableGroups); if ($modifiableGroups[0]['group_priority'] < $modifiableGroups[$modifiableCount - 1]['group_priority']) { $modifiableGroups = array_reverse($modifiableGroups); } $previousPriority = $modifiableGroups[0]['group_priority']; global $cmsFolder, $urlRequestRoot, $moduleFolder, $templateFolder, $sourceFolder; $iconsFolderUrl = "{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}/common/icons/16x16"; $moveUpImage = '<img src="' . $iconsFolderUrl . '/actions/go-up.png" title="Increment Group Priority" alt="Increment Group Priority" />'; $moveDownImage = '<img src="' . $iconsFolderUrl . '/actions/go-down.png" alt="Decrement Group Priority" title="Decrement Group Priority" />'; $moveTopImage = '<img src="' . $iconsFolderUrl . '/actions/go-top.png" alt="Move to next higher priority level" title="Move to next higher priority level" />'; $moveBottomImage = '<img src="' . $iconsFolderUrl . '/actions/go-bottom.png" alt="Move to next lower priority level" title="Move to next lower priority level" />'; $emptyImage = '<img src="' . $iconsFolderUrl . '/actions/edit-clear.png" alt="Empty Group" title="Empty Group" />'; $deleteImage = '<img src="' . $iconsFolderUrl . '/actions/edit-delete.png" alt="Delete Group" title="Delete Group" />'; $groupsForm = '<h3>Edit Group Priorities</h3><br />'; for ($i = 0; $i < $modifiableCount; $i++) { if ($modifiableGroups[$i]['group_priority'] != $previousPriority) { $groupsForm .= '<br /><br /><hr /><br />'; } $groupsForm .= '<span style="margin: 4px;" title="' . $modifiableGroups[$i]['group_description'] . '">' . '<a href="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=incrementpriority&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $moveUpImage . '</a>' . '<a href="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=decrementpriority&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $moveDownImage . '</a>' . '<a href="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=movegroupup&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $moveTopImage . '</a>' . '<a href="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=movegroupdown&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $moveBottomImage . '</a>' . '<a onclick="return confirm(\'Are you sure you want to empty this group?\')" href="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=emptygroup&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $emptyImage . '</a>' . '<a onclick="return confirm(\'Are you sure you want to delete this group?\')" href="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=deletegroup&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $deleteImage . '</a>' . '<a href="./+admin&subaction=editgroups&groupname=' . $modifiableGroups[$i]['group_name'] . '">' . $modifiableGroups[$i]['group_name'] . "</a></span>\n"; $previousPriority = $modifiableGroups[$i]['group_priority']; } $priorityBox = '<option value="1">1</option>'; for ($i = 2; $i <= $userMaxPriority; ++$i) { $priorityBox .= '<option value="' . $i . '">' . $i . '</option>'; } $groupsForm .= <<<GROUPSFORM \t\t<br /><br /> \t\t<fieldset style="padding: 8px"> \t\t\t<legend>Create New Group:</legend> \t\t\t<form name="groupaddform" method="POST" action="./+admin&subaction=editgroups&subsubaction=editgrouppriorities&dowhat=addgroup"> \t\t\t\t<label>Group Name: <input type="text" name="txtGroupName" value="" /></label><br /> \t\t\t\t<label>Group Description: <input type="text" name="txtGroupDescription" value="" /></label><br /> \t\t\t\t<label>Group Priority: <select name="selGroupPriority">{$priorityBox}</select><br /> \t\t\t\t<label><input type="checkbox" name="chkAddMe" value="addme" /> Add me to group</label><br /> \t\t\t\t<input type="submit" name="btnAddNewGroup" value="Add Group" /> \t\t\t</form> \t\t</fieldset> GROUPSFORM; return $groupsForm; } $modifiableCount = count($modifiableGroups); $groupsBox = '<select name="selEditGroups">'; for ($i = 0; $i < $modifiableCount; ++$i) { $groupsBox .= '<option value="' . $modifiableGroups[$i]['group_name'] . '">' . $modifiableGroups[$i]['group_name'] . ' - ' . $modifiableGroups[$i]['group_description'] . "</option>\n"; } $groupsBox .= '</select>'; $groupsForm = <<<GROUPSFORM \t\t<form name="groupeditform" method="POST" action="./+admin&subaction=editgroups"> \t\t\t{$groupsBox} \t\t\t<input type="submit" name="btnEditGroup" value="Edit Selected Group" /><br /><br /> \t\t\t<input type="submit" name="btnEditGroupPriorities" value="Add/Shuffle/Remove Groups" /> \t\t</form> GROUPSFORM; return $groupsForm; }
/** * Prints the RDF trackback url information for external clients to autodiscover. * This code is invisible and within comments on the theme page. * * For theme usage. * */ function printTrackbackRDF() { global $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_album, $_zp_current_image; // check if Zenpage is there... if (getOption('zp_plugin_zenpage')) { if (is_NewsArticle()) { $trackback = $this->getTrackbackURL($_zp_current_zenpage_news); $title = getNewsTitle(); $permalink = $this->getPermalinkURL($_zp_current_zenpage_news, $host); } if (is_Pages()) { $trackback = $this->getTrackbackURL($_zp_current_zenpage_page); $title = getPageTitle(); $permalink = $this->getPermalinkURL($_zp_current_zenpage_page); } } if (in_context(ZP_ALBUM)) { $trackback = $this->getTrackbackURL($_zp_current_album); $title = getAlbumTitle(); $permalink = $this->getPermalinkURL($_zp_current_album); } if (in_context(ZP_IMAGE)) { $trackback = $this->getTrackbackURL($_zp_current_image); $title = getImageTitle(); $permalink = $this->getPermalinkURL($_zp_current_image); } echo $this->rdf_autodiscover("", $title, "", $permalink, $trackback, ""); }
setBuildUpdateConfigFlag($server_serial_no, 'yes', 'build'); header('Location: ' . $GLOBALS['basename'] . $uri_params); } } } } printHeader(); @printMenu(); $avail_types = buildSubMenu(strtolower($option_type)); $avail_servers = buildServerSubMenu($server_serial_no); $sort_direction = null; $sort_field = 'cfg_name'; if (isset($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']])) { extract($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']], EXTR_OVERWRITE); } echo printPageHeader($response, $display_option_type . ' ' . getPageTitle(), currentUserCan('manage_servers', $_SESSION['module']), $name, $rel); echo <<<HTML <div id="pagination_container" class="submenus"> \t<div> \t<div class="stretch"></div> \t{$avail_types} \t{$avail_servers} \t</div> </div> HTML; $result = basicGetList('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'config', array('domain_id', $sort_field, 'cfg_name'), 'cfg_', "AND cfg_type='{$display_option_type_sql}' AND server_serial_no='{$server_serial_no}'", null, false, $sort_direction); $fm_module_options->rows($result); printFooter(); function buildSubMenu($option_type = 'global') {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title><?php echo getPageTitle(); ?> </title> <meta name="title" content="Cassandra Cluster Admin" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.flot.js"></script> <script type="text/javascript" src="js/cassandra_cluster_admin.js"></script> <script type="text/javascript" src="js/bootstrap.min.js"></script> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> </head> <body> <h1 id="cca_title"><a href="./">Cassandra Cluster Admin</a></h1> <?php if (CCA_LOGIN_REQUIRED && isset($_SESSION['cca_login'])) { ?> <div class="float_right"><a href="logout.php">Logout</a></div><?php } ?> <div class="clear_both"></div>
ini_set('xdebug.var_display_max_data', -1); include 'scrapyController.php'; $html = file_get_contents('http://www.ultimatewasher.com/manhole-guards.htm'); //get the html returned from the following url $ultimate_page = new DOMDocument(); libxml_use_internal_errors(TRUE); //disable libxml errors if (!empty($html)) { //if any html is actually returned $ultimate_page->loadHTML($html); libxml_clear_errors(); //remove errors for yucky html $ultimate_xpath = new DOMXPath($ultimate_page); $page = array(); // Get Page Title $page = getPageTitle($ultimate_xpath, $page); echo "<h1>" . $page["title"] . "</h1>"; // Get image menu $page = getImageMenu($ultimate_xpath, $page); // // Get caption menu $page = getImageMenuCaption($ultimate_xpath, $page); // Get h2 blue bar title // Case 1: blue bar title is in a table with td.section-title-1 $page_row = $ultimate_xpath->query('//td[@class="section-title-1"]'); if ($page_row->length > 0) { $i = 0; foreach ($page_row as $row) { $page["subTitle"][$i]["title"] = $row->nodeValue; $node = $row->parentNode; // Get all products in a table > tr > td structure $j = 0;
if ($result !== true) { $response = $result; $form_data = $_POST; } else { setBuildUpdateConfigFlag($server_serial_no, 'yes', 'build'); header('Location: ' . $GLOBALS['basename'] . '?type=' . $_POST['sub_type'] . $server_serial_no_uri); } } } } $server_serial_no_uri = null; printHeader(); @printMenu(); $avail_types = buildSubMenu($type, $server_serial_no_uri); $avail_servers = buildServerSubMenu($server_serial_no); echo printPageHeader($response, getPageTitle() . ' ' . $display_type, currentUserCan('manage_servers', $_SESSION['module']), $type); echo <<<HTML <div id="pagination_container" class="submenus"> \t<div> \t<div class="stretch"></div> \t{$avail_types} \t{$avail_servers} \t</div> </div> HTML; $sort_direction = null; $sort_field = 'cfg_data'; if (isset($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']])) { extract($_SESSION[$_SESSION['module']][$GLOBALS['path_parts']['filename']], EXTR_OVERWRITE); }
function createPage() { $expressionNameSpaceId = MWNamespace::getCanonicalIndex('expression'); wfDebug( "NS ID: $expressionNameSpaceId \n" ); return createPage( $expressionNameSpaceId, getPageTitle( $this->spelling ) ); }
>Hide recommended articles that are linked in the text <br/><input type="checkbox" name="hideRelated" onchange="this.form.submit()" <?php echo $checkedRelated; ?> >Hide recommended articles that are in the Related Links section </form> <hr/> <?php if ($showresults) { ?> <h3> <?php echo 'Recommendations for article: ' . removeUnderscores(getPageTitle($selectPageId)); ?> (<a target="blank" href="<?php echo getURL(getPageTitle($selectPageId)); ?> ">link</a>) </h3> <p><?php echo $algorithmExplanation; ?> </p> <table class="rec-table"> <thead> <th>Recommended article</th> <th>URL</th> <th>Place in article</th> <th>Score</th> </thead> <tbody>
</script> </head> <body onload="init()"> <div class="mainArea"> <?php showHeader($uid, ""); ?> <div class="rest"> <div class="personalDetailsArea"> <div id="dialogRegister"> <div style="width: 100%; height: 40px; background: white; color: black; border-radius: 10px 10px 0px 0px; box-shadow: 0px 0px 10px 2px gray inset; text-align: center; font-size: 24px; font-weight: bold; padding-top: 5px;"> <?php echo getPageTitle($enterpriseName, $_SERVER["PHP_SELF"] . "?sid={$sid}"); ?> </div> <div style="padding: 5px 20px 5px 5px; float: right; font-size: 12px;"> <label style="color: white;"><?php echo $entAddress . " " . $entCity; ?> </label> </div> <div style="padding-top: 10px;"> <?php if ($si_stat) { ?> <div style="background: green; text-align: center;"> <div style="padding: 5px; font-size: 20px; display: inline-block; color: yellow;"><?php echo $si_stat;
</script> </head> <body onload="init()"> <div class="mainArea"> <?php showHeader($uid, ""); ?> <div class="rest"> <div class="personalDetailsArea"> <div id="dialogRegister"> <div style="width: 100%; height: 40px; background: white; color: black; border-radius: 10px 10px 0px 0px; box-shadow: 0px 0px 10px 2px gray inset; text-align: center; font-size: 24px; font-weight: bold; padding-top: 5px;"> <?php echo getPageTitle("Settings", $_SERVER["PHP_SELF"]); ?> </div> <?php if ($uid) { ?> <form id="settingsForm1" method="post" action="changeSettings.php" onsubmit="return formValidate(this.id,'se',1,2,3);"> <div style="width: 450px; margin: 10px auto 10px auto; color: orange; background: white; box-shadow: 0px 0px 10px 2px gray; padding: 10px; border-radius: 10px;"> <?php if ($ps) { echo getMessageDialog($ps); } ?> <div style="padding: 5px; border-bottom: 1px solid silver;"> <div style="display: inline-block; width: 40%;">Current Password </div>
function getNodeHtmlforPagelist($pageId, $userId, $module, $action, $parentPath, $depth) { global $cmsFolder, $urlRequestRoot, $templateFolder; $tempFolder = "{$urlRequestRoot}/{$cmsFolder}/{$templateFolder}"; $imagesFolder = "{$tempFolder}/common/icons/32x32"; $imagesFolder2 = "{$tempFolder}/common/images/pagethumbs"; $goimage = "{$tempFolder}/common/icons/16x16/actions/media-skip-forward.png"; if ($depth != 0) { $htmlOut = ''; if (getPermissions($userId, $pageId, $action, $module)) { if (isset($_POST['hell'])) { $pageId = escape($_POST['hell']); unset($_POST['hell']); $htmlOut .= $this->generatePagelist($pageId, $userId, $permId, $action = '', $depth); } else { $pageInfo = getPageInfo($pageId); if (isset($_POST['hell2'])) { $pagePath = escape($_POST['hell2']); unset($_POST['hell2']); } else { $pagePath = $parentPath; if ($pageInfo['page_name'] != '') { $pagePath .= $pageInfo['page_name'] . '/'; } } $pagename = $pageInfo['page_name']; $htmlOut .= "<li><form method ='POST' action='./'><input type='image' src=\"{$goimage}\" name='pagename' alt='Go' title='Click to list pages from here'><input type='hidden' name='hell' value='{$pageId}' /><input type='hidden' name='hell2' value='{$pagePath}' /><a href=\"{$pagePath}\">"; /** ************************************************************************************************************************************************************** The following lines are for thumb images of each page listed in the page of type pagelist : By Default: the home icon is set as default thumb image for each page. This can be changed by doing following actions: a) Create a folder called 'pagethumbs' in folder '/cms/templates/common' b) put all the images (size preferably 32x32 ) with the name same as the name of the page. e.g. for a page whose name is 'hello' in table _pages the name of the image in the above said folder should be 'hello.png' c) Add comment symbol i.e. // in front of line saying : $thumbname="$imagesFolder/actions/go-home.png"; (currently it is line 159 if not changed) THAT'S IT ************************************************************************************************************************************************************* */ $thumbname = "{$imagesFolder}/actions/go-home.png"; $htmlOut .= "<span class='list'><img src='{$thumbname}' alt=' !sorry! '>" . getPageTitle($pageId) . "</span></a>\n</form>"; $childrenQuery = 'SELECT `page_id`, `page_displayinmenu` FROM `' . MYSQL_DATABASE_PREFIX . 'pages` WHERE `page_parentid` <> `page_id` AND `page_parentid` = ' . $pageId; $childrenResult = mysql_query($childrenQuery); $childrenHtml = ''; while ($childrenRow = mysql_fetch_row($childrenResult)) { if ($childrenRow[1] == 1 && $depth != 0) { $childrenHtml .= $this->getNodeHtmlforPagelist($childrenRow[0], $userId, $module, $action, $pagePath, $depth - 1); } } if ($childrenHtml != '') { $htmlOut .= "<ul>{$childrenHtml}</ul>\n"; } $htmlOut .= "</li>\n"; } } return $htmlOut; } }
</script> </head> <body onload="init()"> <div class="mainArea"> <?php showHeader($uid, ""); ?> <div class="rest"> <div class="personalDetailsArea"> <div id="dialogRegister"> <div style="width: 100%; height: 40px; background: white; color: black; border-radius: 10px 10px 0px 0px; box-shadow: 0px 0px 10px 2px gray inset; text-align: center; font-size: 24px; font-weight: bold; padding-top: 5px;"> <?php echo getPageTitle("Personal Details", $_SERVER["PHP_SELF"]); ?> </div> <div class="pDArea"> <div class="mainLoginArea"> <?php $res = mysql_query("select Email,Username,Phone from customerdetails where CID='{$uid}'"); $row = mysql_fetch_array($res); ?> <div class="width100" style="padding-top: 10px; border-right: 1px solid white;"> <form action="updatePersonalDetails.php" method="post" onsubmit="return validate();" > <table class="tableStyle"> <tr> <td> <span class="regText"> Username </span> <span class="errorMessages" id="error4">Please enter your Name!!!</span> </td> </tr>
function isLinked($pageId, $recPageId) { $recPageTitle = mysql_real_escape_string(getPageTitle($recPageId)); $result = mysql_query("SELECT * FROM ec_wikipagelinks WHERE pl_from = {$pageId} AND pl_title = \"{$recPageTitle}\""); return mysql_num_rows($result); }
/** * Prints a RSS link * * @param string $option type of RSS: "News" feed for all news articles * "Category" for only the news articles of the category that is currently selected * "NewsWithImages" for all news articles and latest images * "Comments" for all news articles and pages * "Comments-news" for comments of only the news article it is called from * "Comments-page" for comments of only the page it is called from * "Comments-all" for comments from all albums, images, news articels and pages * @param string $categorylink The specific category you want a RSS feed from (only 'Category' mode) * @param string $prev text to before before the link * @param string $linktext title of the link * @param string $next text to appear after the link * @param bool $printIcon print an RSS icon beside it? if true, the icon is zp-core/images/rss.png * @param string $class css class * @param string $lang optional to display a feed link for a specific language (currently works for latest images only). Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used. */ function printZenpageRSSLink($option = 'News', $categorylink = '', $prev = '', $linktext = '', $next = '', $printIcon = true, $class = null, $lang = NULL) { global $_zp_current_category; if ($printIcon) { $icon = ' <img src="' . FULLWEBPATH . '/' . ZENFOLDER . '/images/rss.png" alt="RSS Feed" />'; } else { $icon = ''; } if (!is_null($class)) { $class = 'class="' . $class . '"'; } if (empty($lang)) { $lang = getOption("locale"); } if ($option == 'Category') { if (!is_null($categorylink)) { $categorylink = '&category=' . sanitize($categorylink); } elseif (empty($categorylink) and !is_null($_zp_current_category)) { $categorylink = '&category=' . $_zp_current_category->getTitlelink(); } else { $categorylink = ''; } } $linktext = html_encode($linktext); switch ($option) { case "News": if (getOption('RSS_articles')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-news&lang=" . $lang . "\" title=\"" . gettext("News RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Category": if (getOption('RSS_articles')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-news&lang=" . $lang . $categorylink . "\" title=\"" . gettext("News Category RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "NewsWithImages": if (getOption('RSS_articles')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-news&withimages&lang=" . $lang . "\" title=\"" . gettext("News and Gallery RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&type=zenpage&lang=" . $lang . "\" title=\"" . gettext("Zenpage Comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments-news": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&id=" . getNewsID() . "&title=" . urlencode(getNewsTitle()) . "&type=news&lang=" . $lang . "\" title=\"" . gettext("News article comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments-page": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&id=" . getPageID() . "&title=" . urlencode(getPageTitle()) . "&type=page&lang=" . $lang . "\" title=\"" . gettext("Page Comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; case "Comments-all": if (getOption('RSS_article_comments')) { echo $prev . "<a {$class} href=\"" . WEBPATH . "/index.php?rss-comments&type=allcomments&lang=" . $lang . "\" title=\"" . gettext("Page Comments RSS") . "\" rel=\"nofollow\">" . $linktext . "{$icon}</a>" . $next; } break; } }
/** * Prints the url to a specific zenpage page * * @param string $linktext Text for the URL * @param string $titlelink page to include in URL * @param string $prev text to insert before the URL * @param string $next text to follow the URL * @param string $class optional class */ function printPageURL($linktext = NULL, $titlelink = NULL, $prev = '', $next = '', $class = NULL) { if (!is_null($class)) { $class = 'class="' . $class . '"'; } if (is_null($linktext)) { $linktext = getPageTitle(); } echo $prev . "<a href=\"" . html_encode(getPageURL($titlelink)) . "\" {$class} title=\"" . html_encode($linktext) . "\">" . html_encode($linktext) . "</a>" . $next; }
require_once 'sqlfuncs.php'; sesVerifySession(); $strFunc = sanitize(getRequest('func', 'open_invoices')); $strList = sanitize(getRequest('list', '')); $strForm = sanitize(getRequest('form', '')); if (!$strFunc) { $strFunc = 'open_invoices'; } if ($strFunc == 'logout') { header('Location: ' . getSelfPath() . '/logout.php'); exit; } if (!$strFunc && $strForm) { $strFunc = 'invoices'; } $title = getPageTitle($strFunc, $strList, $strForm); if ($strFunc == 'system' && getRequest('operation', '') == 'dbdump' && sesAccessLevel([ROLE_BACKUPMGR, ROLE_ADMIN])) { create_db_dump(); exit; } echo htmlPageStart(_PAGE_TITLE_ . " - {$title}", getSetting('session_keepalive') ? ['js/keepalive.js'] : null); $normalMenuRights = [ROLE_READONLY, ROLE_USER, ROLE_BACKUPMGR]; $astrMainButtons = [['name' => 'invoice', 'title' => 'locShowInvoiceNavi', 'action' => 'open_invoices', 'levels_allowed' => [ROLE_READONLY, ROLE_USER, ROLE_BACKUPMGR]], ['name' => 'archive', 'title' => 'locShowArchiveNavi', 'action' => 'archived_invoices', 'levels_allowed' => [ROLE_READONLY, ROLE_USER, ROLE_BACKUPMGR]], ['name' => 'company', 'title' => 'locShowClientNavi', 'action' => 'companies', 'levels_allowed' => [ROLE_USER, ROLE_BACKUPMGR]], ['name' => 'reports', 'title' => 'locShowReportNavi', 'action' => 'reports', 'levels_allowed' => [ROLE_READONLY, ROLE_USER, ROLE_BACKUPMGR]], ['name' => 'settings', 'title' => 'locShowSettingsNavi', 'action' => 'settings', 'action' => 'settings', 'levels_allowed' => [ROLE_USER, ROLE_BACKUPMGR]], ['name' => 'system', 'title' => 'locShowSystemNavi', 'action' => 'system', 'levels_allowed' => [ROLE_BACKUPMGR, ROLE_ADMIN]], ['name' => 'logout', 'title' => 'locLogout', 'action' => 'logout', 'levels_allowed' => null]]; ?> <body> <div class="pagewrapper ui-widget-content"> <div class="ui-widget"> <div id="maintabs" class="navi ui-widget-header ui-tabs"> <ul class="ui-tabs-nav ui-helper-clearfix ui-corner-all"> <?php