/** * Loads the form's fields with the internship's information. * TODO: Use getter methods instead of just accessing Internship member variables directly. */ public function plugInternship() { $this->plugStudent(); $this->plugDept(); $this->plugFaculty(); $this->plugAgency(); $this->plugInternInfo(); $this->plugCourseInfo(); // We're editing an internship... // If this internship's term is in the past, then replace the term list with just that term if (!in_array($this->intern->term, array_keys(Term::getFutureTermsAssoc()))) { // Remove the term dropdown and repalce it $this->form->dropElement('term'); $this->form->addSelect('term', array($this->intern->term => Term::rawToRead($this->intern->term))); $this->form->setLabel('term', 'Select Term'); $this->form->addCssClass('term', 'form-control'); } $this->form->setMatch('term', $this->intern->term); $this->form->setMatch('experience_type', $this->intern->getExperienceType()); // Plug $this->form->plugIn($this->formVals); /** * * * Emergency Contacts */ //javascript('jquery'); PHPWS_Core::initModClass('intern', 'EmergencyContactFactory.php'); $contacts = EmergencyContactFactory::getContactsForInternship($this->intern); $emgContactJson = json_encode($contacts); Layout::add(javascriptMod('intern', 'emergencyContact', array('existing_contacts_json' => $emgContactJson))); }
function showFP() { $db = new PHPWS_DB('ps_page'); $db->addWhere('front_page', 1); if ($db->isTableColumn('deleted')) { $db->addWhere('deleted', 0); } Key::restrictView($db, 'pagesmith'); $db->loadClass('pagesmith', 'PS_Page.php'); $result = $db->getObjects('PS_Page'); if (!PHPWS_Error::logIfError($result) && !empty($result)) { PHPWS_Core::initModClass('pagesmith', 'PageSmith.php'); foreach ($result as $page) { $content = $page->view(); if ($content && !PHPWS_Error::logIfError($content)) { if (Current_User::allow('pagesmith', 'edit_page', $page->id)) { $content .= sprintf('<p class="pagesmith-edit">%s</p>', $page->editLink()); } Layout::add($content, 'pagesmith', 'view_' . $page->id, TRUE); } } } else { return null; } }
public function main() { $auth = Current_User::getAuthorization(); if (!Current_User::isLogged() || !$auth->local_user) { PHPWS_Core::errorPage('403'); } $result = $this->init(); if (PHPWS_Error::isError($result)) { PHPWS_Error::log($result); Layout::add(PHPWS_ControlPanel::display(dgettext('users', 'The is a problem with My Page.'))); return; } elseif (!$result) { Layout::add(PHPWS_ControlPanel::display(dgettext('users', 'No modules are registered to My Page.'))); return; } $panel = My_Page::cpanel(); $module = $panel->getCurrentTab(); if (!$this->moduleIsRegistered($module)) { Layout::add(dgettext('users', 'This module is not registered with My Page')); return; } $content = My_Page::userOption($module); if (PHPWS_Error::isError($content)) { $content = $content->getMessage(); } Layout::add(PHPWS_ControlPanel::display($content)); }
public static function process() { if (!Current_User::authorized('analytics')) { Current_User::disallow(); } $panel = self::cpanel(); if (isset($_REQUEST['command'])) { $command = $_REQUEST['command']; } else { $command = $panel->getCurrentTab(); } switch ($command) { case 'list': $panel->setContent(self::listTrackers()); break; case 'new': $panel->setContent(self::newTracker()); break; case 'create': $panel->setContent(self::createTracker()); break; case 'edit': $panel->setContent(self::editTracker()); break; case 'delete': $panel->setContent(self::deleteTracker()); break; case 'save_tracker': $panel->setContent(self::saveTracker()); break; } Layout::add(PHPWS_ControlPanel::display($panel->display())); }
public function show($archive = FALSE) { javascript('/jquery/'); javascript('/jquery_ui/'); $tpl = array(); $tpl['PAGER'] = $this->pager->get(); Layout::add(PHPWS_Template::process($tpl, 'faxmaster', 'faxList.tpl')); }
public function showHMS($content) { $tpl = array(); $tpl['MAIN'] = $content; $navbar = new NavBar(); $tpl['NAVBAR'] = $navbar->show(); \Layout::addStyle('hms', 'css/hms.css'); \Layout::add(\PHPWS_Template::process($tpl, 'hms', 'hms.tpl')); }
private function display() { \Layout::addStyle('properties'); $tpl['TITLE'] = $this->title; $tpl['CONTENT'] = $this->content; $tpl['MESSAGE'] = $this->message; $final_content = \PHPWS_Template::process($tpl, 'properties', 'admin.tpl'); \Layout::add(\PHPWS_ControlPanel::display($this->panel->display($final_content))); }
public static function shortcuts() { if (!Current_User::allow('access')) { Current_User::disallow(); return; } $modal = new Modal('access-shortcut', null, dgettext('access', 'Shortcuts')); $modal->sizeSmall(); $button = '<button class="btn btn-success" id="save-shortcut">Save</button>'; $modal->addButton($button); \Layout::add((string) $modal); javascript('jquery'); \Layout::includeJavascript('mod/access/javascript/access.min.js'); PHPWS_Core::initModClass('access', 'Shortcut.php'); PHPWS_Core::initCoreClass('DBPager.php'); $pager = new DBPager('access_shortcuts', 'Access_Shortcut'); $pager->setModule('access'); $pager->setTemplate('forms/shortcut_list.tpl'); $pager->setLink('index.php?module=access&tab=shortcuts'); $pager->addToggle('class="bgcolor1"'); $pager->setSearch('keyword'); $form = new PHPWS_Form('shortcut_list'); $form->addHidden('module', 'access'); $form->addHidden('command', 'post_shortcut_list'); $options['none'] = ''; if (Current_User::allow('access', 'admin_options')) { $options['active'] = dgettext('access', 'Activate'); $options['deactive'] = dgettext('access', 'Deactivate'); } $options['delete'] = dgettext('access', 'Delete'); $form->addSelect('list_action', $options); $page_tags = $form->getTemplate(); $page_tags['MENU_FIX'] = PHPWS_Text::secureLink(dgettext('access', 'Update menu links'), 'access', array('command' => 'menu_fix')); $page_tags['PAGE_FIX'] = PHPWS_Text::secureLink(dgettext('access', 'Shortcut all pages'), 'access', array('command' => 'page_fix')); if (PHPWS_Settings::get('access', 'forward_ids')) { $page_tags['PAGE_FORWARDING'] = PHPWS_Text::secureLink(dgettext('access', 'Turn OFF autoforwarding of Pagesmith id pages'), 'access', array('command' => 'autoforward_off')); } else { $page_tags['PAGE_FORWARDING'] = PHPWS_Text::secureLink(dgettext('access', 'Turn ON autoforwarding of Pagesmith id pages'), 'access', array('command' => 'autoforward_on')); } $page_tags['MENU_WARNING'] = dgettext('menu', 'This change is irreversable. Please backup menu_links prior to running it.'); $page_tags['URL_LABEL'] = dgettext('access', 'Url'); $page_tags['ACTIVE_LABEL'] = dgettext('access', 'Active?'); $page_tags['ACTION_LABEL'] = dgettext('access', 'Action'); $page_tags['CHECK_ALL_SHORTCUTS'] = javascript('check_all', array('checkbox_name' => 'shortcut[]')); $js_vars['value'] = dgettext('access', 'Go'); $js_vars['select_id'] = $form->getId('list_action'); $js_vars['action_match'] = 'delete'; $js_vars['message'] = dgettext('access', 'Are you sure you want to delete the checked shortcuts?'); $page_tags['SUBMIT'] = javascript('select_confirm', $js_vars); $pager->addPageTags($page_tags); $pager->addRowTags('rowTags'); $content = $pager->get(); return $content; }
public static function showFeeds() { PHPWS_Core::initModClass('rss', 'Feed.php'); $db = new PHPWS_DB('rss_feeds'); $db->addWhere('display', 1); $result = $db->getObjects('RSS_Feed'); if (empty($result)) { return; } foreach ($result as $feed) { $listing[] = $feed->view(); } Layout::add(implode('', $listing), 'rss', 'feeds'); }
public static function userStatusSidebar() { $game = Factory::getCurrent(); if (empty($game)) { $vars['current_game'] = 'No game scheduled. Check back later.'; } else { $vars['current_game'] = Factory::getGameStatus($game); } $vars['student_status'] = \tailgate\Factory\Lottery::getStudentStatus(); $template = new \Template(); $template->addVariables($vars); $template->setModuleTemplate('tailgate', 'User/sidebar.html'); $content = $template->get(); \Layout::add($content, 'tailgate', 'user_info'); }
public function view() { $key = \Key::getCurrent(); if (!\Key::checkKey($key)) { return; } $tpl = array(); $allSettings = $this->settings->getAll(); foreach ($allSettings as $key => $value) { if ($value == 1) { $tpl[$key] = ""; // dummy template } } $content = \PHPWS_Template::process($tpl, 'addthis', 'addThis.tpl'); \Layout::add($content, 'addthis', 'DEFAULT'); }
public function process() { // This hack is the most awful hack ever. Fix phpWebSite so that // user logins are logged separately. if (Current_User::isLogged() && !isset($_SESSION['HMS_LOGGED_THE_LOGIN'])) { $username = strtolower(Current_User::getUsername()); HMS_Activity_Log::log_activity($username, ACTIVITY_LOGIN, $username, NULL); $_SESSION['HMS_LOGGED_THE_LOGIN'] = $username; } if (!Current_User::isLogged() && $this->context->get('action') != 'ShowFrontPage') { NQ::simple('hms', hms\NotificationView::ERROR, 'You must be logged in to do that.'); $action = 'ShowFrontPage'; } else { $action = $this->context->get('action'); } $cmd = CommandFactory::getCommand($action); if (HMS_DEBUG) { $cmd->execute($this->context); } else { try { $cmd->execute($this->context); } catch (PermissionException $p) { NQ::Simple('hms', hms\NotificationView::ERROR, 'You do not have permission to perform that action. If you believe this is an error, please contact University Housing.'); $nv = new hms\NotificationView(); $nv->popNotifications(); Layout::add($nv->show()); } catch (Exception $e) { try { $message = $this->formatException($e); NQ::Simple('hms', hms\NotificationView::ERROR, 'An internal error has occurred, and the authorities have been notified. We apologize for the inconvenience.'); $this->emailError($message); $nv = new hms\NotificationView(); $nv->popNotifications(); Layout::add($nv->show()); } catch (Exception $e) { $message2 = $this->formatException($e); echo "HMS has experienced a major internal error. Attempting to email an admin and then exit."; $message = "Something terrible has happened, and the exception catch-all threw an exception.\n\nThe first exception was:\n\n{$message}\n\nThe second exception was:\n\n{$message2}"; mail(FROM_ADDRESS, 'A Major HMS Error Has Occurred', $message); exit; } } } }
public static function showBlocks($key) { $db = new PHPWS_DB('block'); $db->addWhere('block_pinned.key_id', $key->id); $db->addWhere('id', 'block_pinned.block_id'); Key::restrictView($db, 'block'); $result = $db->getObjects('Block_Item'); if (PHPWS_Error::isError($result)) { PHPWS_Error::log($result); return NULL; } if (empty($result)) { return NULL; } foreach ($result as $block) { $block->setPinKey($key); Layout::add($block->view(), 'block', $block->getContentVar()); $GLOBALS['Current_Blocks'][$block->id] = TRUE; } }
public function view() { $tpl = array(); /* foreach($allSettings as $key=>$value){ if($value == 1){ $tpl[$key] = ""; // dummy template } } */ if ($this->settings->get('enabled') === true) { return; } $tpl['fb_url'] = $this->settings->get('fb_url'); $tpl['width'] = $this->settings->get('width'); $tpl['height'] = $this->settings->get('height'); if ($this->settings->get('show_header') == 1) { $tpl['show_header'] = 'true'; } else { $tpl['show_header'] = 'false'; } if ($this->settings->get('show_border') == 1) { $tpl['show_border'] = 'true'; } else { $tpl['show_border'] = 'false'; } if ($this->settings->get('show_stream') == 1) { $tpl['show_stream'] = 'true'; } else { $tpl['show_stream'] = 'false'; } if ($this->settings->get('show_faces') == 1) { $tpl['show_faces'] = 'true'; } else { $tpl['show_faces'] = 'false'; } $content = PHPWS_Template::process($tpl, 'likebox', 'likebox.tpl'); Layout::add($content, 'likebox', 'DEFAULT'); }
public static function action() { if (!Current_User::allow('block')) { Current_User::disallow(); return; } $panel = Block_Admin::cpanel(); if (isset($_REQUEST['action'])) { $action = $_REQUEST['action']; } else { $tab = $panel->getCurrentTab(); if (empty($tab)) { $action = 'new'; } else { $action =& $tab; } } $content = Block_Admin::route($action); $panel->setContent($content); $finalPanel = $panel->display(); Layout::add(PHPWS_ControlPanel::display($finalPanel)); }
public static function main() { $tpl['MESSAGE'] = NULL; $message = RSS_Admin::getMessage(); PHPWS_Core::initModClass('rss', 'Feed.php'); PHPWS_Core::initModClass('rss', 'Channel.php'); if (!Current_User::allow('rss')) { Current_User::disallow(); } $panel = RSS_Admin::adminPanel(); if (isset($_REQUEST['command'])) { $command = $_REQUEST['command']; } elseif (isset($_REQUEST['tab'])) { $command = $_REQUEST['tab']; } else { $command = $panel->getCurrentTab(); } if (isset($_REQUEST['channel_id'])) { $channel = new RSS_Channel($_REQUEST['channel_id']); } else { $channel = new RSS_Channel(); } if (isset($_REQUEST['feed_id'])) { $feed = new RSS_Feed($_REQUEST['feed_id']); } else { $feed = new RSS_Feed(); } switch ($command) { case 'channels': $tpl = RSS_Admin::channels(); break; case 'settings': $tpl = RSS_Admin::settings(); break; case 'save_settings': $result = RSS_Admin::save_settings(); if (!$result) { PHPWS_Settings::save('rss'); $result = dgettext('rss', 'Settings saved successfully.'); } $tpl = RSS_Admin::settings(); $tpl['MESSAGE'] =& $result; break; case 'feedInfo': $feed = new RSS_Feed(filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT)); echo json_encode($feed); exit; break; case 'save_feed': $result = $feed->post(); if (is_array($result)) { $tpl['CONTENT'] = RSS_Admin::editFeed($feed, true); $tpl['MESSAGE'] = implode('<br />', $result); } else { $result = $feed->save(); PHPWS_Core::reroute('index.php?module=rss&tab=import'); } break; case 'edit_channel': $tpl = RSS_Admin::editChannel($channel); break; case 'post_channel': $result = $channel->post(); if (is_array($result)) { $message = implode('<br />', $result); $tpl = RSS_Admin::editChannel($channel); } else { $result = $channel->save(); if (PHPWS_Error::isError($result)) { RSS_Admin::sendMessage(dgettext('rss', 'An error occurred when saving your channel.'), 'channels'); } else { RSS_Admin::sendMessage(dgettext('rss', 'Channel saved.'), 'channels'); } } break; case 'reset_feed': $feed->reset(); case 'import': $tpl = RSS_Admin::import(); break; case 'turn_on_display': $feed->display = 1; $feed->save(); $tpl = RSS_Admin::import(); break; case 'turn_off_display': $feed->display = 0; $feed->save(); $tpl = RSS_Admin::import(); break; case 'add_feed': $tpl = RSS_Admin::editFeed($feed); Layout::nakedDisplay(PHPWS_Template::process($tpl, 'rss', 'main.tpl')); exit; break; case 'edit_feed': $tpl = RSS_Admin::editFeed($feed); Layout::nakedDisplay(PHPWS_Template::process($tpl, 'rss', 'main.tpl')); exit; break; case 'delete_feed': $feed->delete(); $tpl = RSS_Admin::import(); break; default: PHPWS_Core::errorPage('404'); break; } if (!empty($message)) { $tpl['MESSAGE'] = $message; } $content = PHPWS_Template::process($tpl, 'rss', 'main.tpl'); $panel->setContent($content); $content = $panel->display(); Layout::add(PHPWS_ControlPanel::display($content)); }
<?php /** * * See docs/AUTHORS and docs/COPYRIGHT for relevant info. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author Jeremy Booker <jbooker at tux dot appstate dot edu> */ //PHPWS_Core::initModClass('skeleton', 'Skeleton_Runtime.php'); //Skeleton_Runtime::showBlock(); if (!isset($_REQUEST['module'])) { PHPWS_Core::initModClass('faxmaster', '../index.php'); } if (!Current_User::isLogged()) { Layout::add('<div class="text-center"><a href="secure" class="btn btn-lg btn-primary">Sign In</a></div>'); }
public function loginMenu() { $vars['k'] = $this->key; $vars['cop'] = 'edit_property'; $tpl['CREATE'] = \PHPWS_Text::moduleLink('Create property', 'properties', $vars); $vars['cop'] = 'view_properties'; $tpl['VIEW'] = \PHPWS_Text::moduleLink('View properties', 'properties', $vars); $vars['cop'] = 'edit_contact'; $tpl['EDIT'] = \PHPWS_Text::moduleLink('Edit my information', 'properties', $vars); $vars['cop'] = 'logout'; $tpl['LOGOUT'] = \PHPWS_Text::moduleLink('Logout', 'properties', $vars); $content = \PHPWS_Template::process($tpl, 'properties', 'mini_contact.tpl'); \Layout::add($content, 'properties', 'contact_login'); }
public static function addEndBody($content) { Layout::add($content, 'analytics', 'end_body'); }
$select_f_statuts = HtmlForm::afficher_select(Form::$tab_select_statut , 'f_statut' /*select_nom*/ , FALSE /*option_first*/ , $statut /*selection*/ , '' /*optgroup*/); // Javascript Layout::add( 'js_inline_before' , 'var input_date = "'.TODAY_FR.'";' ); Layout::add( 'js_inline_before' , 'var date_mysql = "'.TODAY_MYSQL.'";' ); Layout::add( 'js_inline_before' , 'var LOGIN_LONGUEUR_MAX = '. LOGIN_LONGUEUR_MAX.';' ); Layout::add( 'js_inline_before' , 'var PASSWORD_LONGUEUR_MAX = '.PASSWORD_LONGUEUR_MAX.';' ); Layout::add( 'js_inline_before' , 'var tab_login_modele = new Array();' ); Layout::add( 'js_inline_before' , 'var tab_mdp_longueur_mini = new Array();' ); foreach($_SESSION['TAB_PROFILS_ADMIN']['LOGIN_MODELE'] as $profil_sigle => $login_modele) { Layout::add( 'js_inline_before' , 'tab_login_modele["'.$profil_sigle.'"] = "'.$login_modele.'";' ); } foreach($_SESSION['TAB_PROFILS_ADMIN']['MDP_LONGUEUR_MINI'] as $profil_sigle => $mdp_longueur_mini) { Layout::add( 'js_inline_before' , 'tab_mdp_longueur_mini["'.$profil_sigle.'"] = '.$mdp_longueur_mini.';' ); } ?> <ul class="puce"> <li><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=support_administrateur__gestion_parents">DOC : Gestion des parents</a></span></li> <li><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=support_administrateur__import_users_sconet#toggle_responsables_doublons_comptes">DOC : Import d'utilisateurs depuis Siècle / STS-Web - Doublons de comptes responsables</a></span></li> </ul> <hr /> <form action="./index.php?page=administrateur_parent&section=gestion" method="post" id="form_prechoix"> <div><label class="tab" for="f_debut_nom">Recherche :</label>le nom commence par <input type="text" id="f_debut_nom" name="f_debut_nom" value="<?php echo html($debut_nom) ?>" size="5" /> le prénom commence par <input type="text" id="f_debut_prenom" name="f_debut_prenom" value="<?php echo html($debut_prenom) ?>" size="5" /> <input type="hidden" id="f_afficher" name="f_afficher" value="1" /><button id="actualiser" type="submit" class="actualiser">Actualiser.</button></div> <div><label class="tab" for="f_statut">Statut :</label><?php echo $select_f_statuts ?></div> <p class="ti"><button id="f_doublon" name="f_doublon" type="submit" class="rechercher">Rechercher</button> des responsables homonymes susceptibles d'être des comptes en double.</p> </form>
<?php /** * @author Matthew McNaney <mcnaney at gmail dot com> * @version $Id$ */ if (!defined('PHPWS_SOURCE_DIR')) { include '../../core/conf/404.html'; exit; } if ($_SESSION['User']->isLogged()) { Layout::add(PHPWS_ControlPanel::display()); }
* sans même la garantie implicite de COMMERCIALISABILITÉ ni d’ADÉQUATION À UN OBJECTIF PARTICULIER. * Consultez la Licence Publique Générale GNU Affero pour plus de détails. * * Vous devriez avoir reçu une copie de la Licence Publique Générale GNU Affero avec SACoche ; * si ce n’est pas le cas, consultez : <http://www.gnu.org/licenses/>. * */ if(!defined('SACoche')) {exit('Ce fichier ne peut être appelé directement !');} $TITRE = html(Lang::_("Niveaux")); // Formulaire des familles de niveaux, en 2 catégories $select_niveau_famille = HtmlForm::afficher_select(DB_STRUCTURE_COMMUN::DB_OPT_familles_niveaux() , 'f_famille' /*select_nom*/ , '' /*option_first*/ , FALSE /*selection*/ , 'familles_niveaux' /*optgroup*/); // Javascript Layout::add( 'js_inline_before' , 'var ID_NIVEAU_PARTAGE_MAX = '.ID_NIVEAU_PARTAGE_MAX.';' ); ?> <div><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=support_administrateur__gestion_niveaux">DOC : Niveaux</a></span></div> <div id="zone_partage"> <hr /> <h2>Niveaux partagés (officiels)</h2> <table class="form"> <thead> <tr> <th>Référence</th> <th>Nom complet</th> <th class="nu"><q class="ajouter" title="Ajouter un niveau."></q></th> </tr> </thead>
echo'<select id="select_action_groupe_deplacer_id_initial" name="select_action_groupe_deplacer_id_initial" class="hide"></select>'.NL; echo'<select id="select_action_deplacer_explication" name="select_action_deplacer_explication" class="hide">' .'<option value="deplacer_domaine">vers le référentiel (d\'une autre matière)</option>' .'<option value="deplacer_theme">vers le domaine (d\'une autre matière)</option>' .'</select>'.NL; echo'<select id="select_action_groupe_deplacer_id_final" name="select_action_groupe_deplacer_id_final" class="hide"></select>'.NL; echo'</p>'.NL; echo'<p><span class="tab"></span><button id="bouton_valider_groupe" type="button" class="valider" disabled>Valider cette action</button><label id="ajax_msg_groupe"> </label></p>'; echo'<p id="groupe_modifier_avertissement" class="hide">'.NL; echo'<span class="danger">Cette opération n\'est pas anodine, utilisez-là en période creuse et après avoir demandé à un administrateur de sauvegarder la base.</span><br />'; echo'<span class="astuce">Un administrateur a aussi la possibilité de convertir tous les référentiels d\'une matière vers une nouvelle matière (<span class="manuel"><a class="pop_up" href="'.SERVEUR_DOCUMENTAIRE.'?fichier=support_administrateur__gestion_matieres#toggle_deplacer_referentiels">DOC.</a></span>).</span>'; echo'</p>'.NL; } else { Layout::add( 'js_inline_before' , 'var listing_id_matieres_autorisees = "";' ); echo'<p class="astuce">Droit d\'accès :<br />'.$texte_profil.'.</p>'.NL; } } ?> </form> <form action="#" method="post" id="zone_elaboration_referentiel" onsubmit="return false;" class="arbre_dynamique"> </form> <div id="zone_socle_item" class="arbre_dynamique hide"> <h2>Relation au socle commun</h2> <form action="#" method="post"> <p> <label class="tab">Item disciplinaire :</label><span class="f_nom i"></span><br /> <label class="tab">Socle commun :</label>Cocher ci-dessous (<span class="astuce">cliquer sur un intitulé pour déployer son contenu</span>).<br />
public function view() { if (empty($this->id)) { \Layout::add('<h1>Sorry</h1><p>This property is not in our system. Please return to the <a href="./">property listing page</a> to try again.</p>'); return; } $tpl = $this->getBaseTpl(); $refund = '<span style="font-size : 90%">(Refundable)</span>'; \PHPWS_Core::initModClass('properties', 'Contact.php'); $max_width = PANEL_WIDTH; $max_height = PANEL_HEIGHT; \Layout::addStyle('properties', 'view.css'); $tpl['NAME'] = $this->viewLink($this->name); $photos = $this->getPhotos(); if ($photos) { javascriptMod('properties', 'galleryview', array('panel_width' => $max_width, 'panel_height' => $max_height)); foreach ($photos as $p) { if (is_file($p['path'])) { $dim = getimagesize($p['path']); $width =& $dim[0]; $height =& $dim[1]; $diff = \PHPWS_File::getDiff($width, $max_width, $height, $max_height); $new_width = round($width * $diff); $new_height = round($height * $diff); if ($new_width > $max_width || $new_height > $max_height) { $diff = \PHPWS_File::getDiff($new_width, $max_width, $new_height, $max_height); $new_width = round($width * $diff); $new_height = round($height * $diff); } } else { $p['path'] = PHPWS_SOURCE_HTTP . 'mod/properties/img/no_photo.gif'; $p['title'] = 'Photo not found'; $new_width = '150px'; $new_height = '113px'; } $all[] = sprintf('<li><img src="%s" title="%s" /> <div class="panel-content lightbox"> <a class="lightbox" href="%s"><img src="%s" width="%s" height="%s" /></a> </div></li>', Photo::thumbnailPath($p['path']), $p['title'], $p['path'], $p['path'], $new_width, $new_height); } $tpl['PHOTOS'] = implode("\n", $all); } else { $tpl['NO_PHOTO'] = '<img src="' . PHPWS_SOURCE_HTTP . 'mod/properties/img/no_photo.gif" alt="No photo" title="No photos available" />'; } $contact = new Contact($this->contact_id); if (!empty($contact->company_address)) { $tpl['COMPANY_ADDRESS'] = $contact->getCompanyAddress(); $tpl['GOOGLE_COMPANY'] = sprintf('<a target="_blank" href="http://maps.google.com/maps?q=%s"> <img class="google-map" src="%smod/properties/img/google-pin-red.gif" title="Google maps" target="_blank" /></a>', Property::googleMapUrl($contact->company_address), PHPWS_SOURCE_HTTP); } $tpl['COMPANY_NAME'] = $contact->getCompanyUrl(); $tpl['EMAIL'] = $contact->getEmailAddress(true); $tpl['PHONE'] = $contact->getPhone(); $tpl['TIMES_AVAILABLE'] = $contact->getTimesAvailable(); $tpl['ADDRESS'] = $this->getAddress(); $tpl['GOOGLE_MAP'] = sprintf('<a target="_blank" href="http://maps.google.com/maps?q=%s"> <img src="%smod/properties/img/google-pin-red.gif" title="Google maps" target="_blank" /></a>', Property::googleMapUrl($this->address), PHPWS_SOURCE_HTTP); $tpl['LEASE_TYPE'] = $this->getLeaseType(); if ($this->efficiency) { $tpl['BEDROOMS'] = 'One room efficiency'; } else { $tpl['BEDROOMS'] = $this->bedroom_no; } $tpl['BATHROOMS'] = $this->getBathroomNo(); if ($this->window_number) { $tpl['WINDOWS'] = 'Yes'; } else { $tpl['WINDOWS'] = 'No'; } if (!empty($this->admin_fee_amt)) { $tpl['ADMIN_FEE'] = '$' . $this->getAdminFeeAmt(); $tpl['ADMIN_FEE_REFUND'] = $this->admin_fee_refund ? $refund : null; } if (!empty($this->parking_fee)) { $tpl['PARKING_FEE'] = '$' . $this->getParkingFee(); } if (!empty($this->security_amt)) { $tpl['SECURITY_AMT'] = '$' . $this->getSecurityAmt(); $tpl['SECURITY_REFUND'] = $this->security_refund ? $refund : null; } if (!empty($this->other_fees)) { $tpl['OTHER_FEES'] = $this->getOtherFees(); } if (!empty($this->clean_fee_amt)) { $tpl['CLEAN_FEE_AMT'] = '$' . $this->getCleanFeeAmt(); $tpl['CLEAN_FEE_REFUND'] = $this->clean_fee_refund ? $refund : null; } $tpl['PARKING_PER_UNIT'] = $this->getParkingPerUnit(); if ($this->pets_allowed) { $tpl['PETS_ALLOWED'] = 'Yes'; $tpl['PET_TYPES'] = $this->getPetType(); if ($this->pet_deposit) { $tpl['PET_DEPOSIT'] = '$' . $this->getPetDeposit() . ' <span style="font-size : 90%">(refundable)</span>'; } else { $tpl['PET_DEPOSIT'] = 'None'; } if ($this->pet_fee) { $tpl['PET_FEE'] = '$' . $this->getPetFee() . ' <span style="font-size : 90%">(nonrefundable)</span>'; } else { $tpl['PET_FEE'] = 'None'; } } else { $tpl['PETS_ALLOWED'] = 'No'; } $utility_allowance = false; $tpl['STUDENT_TYPE'] = $this->getStudentType(); if ($this->util_water) { $utility_allowance = true; $tpl['UTIL_WATER'] = $this->getUtilWater(); } if ($this->util_trash) { $utility_allowance = true; $tpl['UTIL_TRASH'] = $this->getUtilTrash(); } if ($this->util_power) { $utility_allowance = true; $tpl['UTIL_POWER'] = $this->getUtilPower(); } if ($this->util_fuel) { $utility_allowance = true; $tpl['UTIL_FUEL'] = $this->getUtilFuel(); } if ($this->util_cable) { $utility_allowance = true; $tpl['UTIL_CABLE'] = $this->getUtilCable(); } if ($this->util_internet) { $utility_allowance = true; $tpl['UTIL_INTERNET'] = $this->getUtilInternet(); } if ($this->util_phone) { $utility_allowance = true; $tpl['UTIL_PHONE'] = $this->getUtilPhone(); } $photo = new Photo(); $photo->setPropertyId($this->id); if (isset($_GET['photo'])) { $data['pid'] = $this->id; } $data['view'] = 1; if (\Current_User::allow('properties')) { javascriptMod('properties', 'photo_upload', $data); $tpl['ADD_PHOTO'] = $photo->uploadNew(false); $tpl['EDIT'] = \PHPWS_Text::secureLink('<i class="fa fa-edit"></i> Edit', 'properties', array('aop' => 'edit_property', 'pid' => $this->id), null, null, 'btn btn-default'); if (!$this->active) { $tpl['ACTIVE'] = '<div id="not-active">This property is currently NOT ACTIVE</div>'; } } elseif (isset($_SESSION['Contact_User']->id) && $_SESSION['Contact_User']->id == $this->contact_id) { if (!$this->active) { $tpl['ACTIVE'] = '<div id="not-active">This property is currently NOT ACTIVE</div>'; } $data['is_contact'] = 1; javascriptMod('properties', 'photo_upload', $data); $tpl['ADD_PHOTO'] = $photo->uploadNew(false); $tpl['EDIT'] = \PHPWS_Text::moduleLink('Edit property', 'properties', array('cop' => 'edit_property', 'pid' => $this->id, 'k' => $_SESSION['Contact_User']->getKey())); } elseif (!$this->active) { \Layout::add('This property is currently not available'); return; } $heat_type = $this->getHeatType(); if ($heat_type) { $tpl['HEAT_TYPE'] = implode(', ', $this->getHeatType()); } $content = \PHPWS_Template::process($tpl, 'properties', 'view.tpl'); \Layout::add($content); }
* soit la version 3 de cette licence, soit (à votre gré) toute version ultérieure. * * SACoche est distribué dans l’espoir qu’il vous sera utile, mais SANS AUCUNE GARANTIE : * sans même la garantie implicite de COMMERCIALISABILITÉ ni d’ADÉQUATION À UN OBJECTIF PARTICULIER. * Consultez la Licence Publique Générale GNU Affero pour plus de détails. * * Vous devriez avoir reçu une copie de la Licence Publique Générale GNU Affero avec SACoche ; * si ce n’est pas le cas, consultez : <http://www.gnu.org/licenses/>. * */ if (!defined('SACoche')) { exit('Ce fichier ne peut être appelé directement !'); } $TITRE = html(Lang::_("Nettoyer / Initialiser la base")); $label = version_compare($_SESSION['VERSION_BASE'], VERSION_BASE_STRUCTURE, '=') ? 'valide' : 'alerte'; Layout::add('js_inline_before', 'var nb_devoirs_annee_scolaire_precedente = ' . DB_STRUCTURE_ADMINISTRATEUR::DB_compter_devoirs_annees_scolaires_precedentes() . ';'); ?> <p><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE; ?> ?fichier=support_administrateur__gestion_nettoyage">DOC : Nettoyage et initialisation annuelle de la base</a></span></p> <hr /> <h2>Version de la base</h2> <div class="astuce">La base de données est mise à jour automatiquement.</div> <div>Version attendue : <?php echo VERSION_BASE_STRUCTURE; ?>
{ $methode_calcul_texte = ($DB_ROW['referentiel_calcul_limite']==0) ? 'Seule la meilleure saisie compte '.$texte_retroactif.'.' : 'Meilleure des '.$DB_ROW['referentiel_calcul_limite'].' dernières saisies '.$texte_retroactif.'.'; } elseif(in_array($DB_ROW['referentiel_calcul_methode'],array('bestof2','bestof3'))) // si 2 | 3 meilleures notes { $nb_best = (int)substr($DB_ROW['referentiel_calcul_methode'],-1); $methode_calcul_texte = ($DB_ROW['referentiel_calcul_limite']==0) ? 'Moyenne des '.$nb_best.' meilleures saisies '.$texte_retroactif.'.' : 'Moyenne des '.$nb_best.' meilleures saisies parmi les '.$DB_ROW['referentiel_calcul_limite'].' dernières '.$texte_retroactif.'.'; } $tab_colonne[$DB_ROW['matiere_id']][$DB_ROW['niveau_id']] = '<td class="hc">'.str_replace('◄DATE►',Html::date_texte($DB_ROW['referentiel_partage_date']),$tab_partage[$DB_ROW['referentiel_partage_etat']]).'</td>'.'<td>'.$methode_calcul_texte.'</td>'; Layout::add( 'js_inline_before' , ' tab_partage_etat["'.$DB_ROW['matiere_id'].'_'.$DB_ROW['niveau_id'].'"] = "'.$DB_ROW['referentiel_partage_etat'].'";' ); Layout::add( 'js_inline_before' , ' tab_calcul_methode["'.$DB_ROW['matiere_id'].'_'.$DB_ROW['niveau_id'].'"] = "'.$DB_ROW['referentiel_calcul_methode'].'";' ); Layout::add( 'js_inline_before' , ' tab_calcul_limite["'.$DB_ROW['matiere_id'].'_'.$DB_ROW['niveau_id'].'"] = "'.$DB_ROW['referentiel_calcul_limite'].'";' ); Layout::add( 'js_inline_before' , 'tab_calcul_retroactif["'.$DB_ROW['matiere_id'].'_'.$DB_ROW['niveau_id'].'"] = "'.$DB_ROW['referentiel_calcul_retroactif'].'";' ); Layout::add( 'js_inline_before' , ' tab_information["'.$DB_ROW['matiere_id'].'_'.$DB_ROW['niveau_id'].'"] = "'.str_replace('"','\"',$DB_ROW['referentiel_information']).'";' ); } Layout::add( 'js_inline_before' , '// ]]>' ); } // Construction du formulaire select du nombre de demandes $select_demandes = '<select name="f_eleve_demandes" class="t9">'; for($nb_demandes=0 ; $nb_demandes<10 ; $nb_demandes++) { $texte = ($nb_demandes>0) ? ( ($nb_demandes>1) ? $nb_demandes.' demandes' : '1 seule demande' ) : 'aucune demande' ; $select_demandes .= '<option value="'.$nb_demandes.'">'.$texte.'</option>'; } $select_demandes .= '</select>'; $infobulle = ' <img src="./_img/bulle_aide.png" width="16" height="16" alt="" title="Nombre maximal de demandes d\'évaluations simultanées autorisées pour un élève." />'; $label = '<label> </label>'; // On construit et affiche les tableaux résultants foreach($tab_matiere as $matiere_id => $tab) { $matiere_nom = $tab['nom'];
$icone_impression = '<q class="imprimer_non" title="Accès restreint à l\'impression PDF :<br />' . $profils_impression_pdf . '."></q>'; } if ($etat != '0absence') { $tab_affich[$classe_id . '_' . $groupe_id]['fiche'] = '<td id="cg_' . $classe_id . '_' . $groupe_id . '" class="hc notnow">' . $label_avant . $affich_etat . $checkbox . $label_apres . '<br />' . $icone_saisie . $icone_tampon . $icone_verification . $icone_voir_html . $icone_impression . $icone_voir_pdf . '</td>'; } elseif ($checkbox != '') { $tab_affich[$classe_id . '_' . $groupe_id]['fiche'] = '<td class="hc notnow">' . $label_avant . $affich_etat . $checkbox . $label_apres . '</td>'; } else { $tab_affich[$classe_id . '_' . $groupe_id]['fiche'] = '<td class="hc notnow">' . $affich_etat . '</td>'; } // tableau javascript pour desactiver ce qui est inaccessible $disabled_examiner = strpos($icone_verification, 'detailler_non') ? 'true' : 'false'; $disabled_imprimer = strpos($icone_impression, 'imprimer_non') ? 'true' : 'false'; $disabled_voir_pdf = strpos($icone_voir_pdf, 'archive_non') ? 'true' : 'false'; Layout::add('js_inline_before', 'tab_disabled["examiner"]["' . $classe_id . '_' . $groupe_id . '"]=' . $disabled_examiner . ';'); Layout::add('js_inline_before', 'tab_disabled["imprimer"]["' . $classe_id . '_' . $groupe_id . '"]=' . $disabled_imprimer . ';'); Layout::add('js_inline_before', 'tab_disabled["voir_pdf"]["' . $classe_id . '_' . $groupe_id . '"]=' . $disabled_voir_pdf . ';'); } } // //////////////////////////////////////////////////////////////////////////////////////////////////// // Affichage du tableau. // //////////////////////////////////////////////////////////////////////////////////////////////////// echo '<table id="table_accueil"><thead>' . NL; foreach ($tab_affich as $ligne_id => $tab_colonne) { echo '<tr>' . implode('', $tab_colonne) . '</tr>' . NL; echo !$ligne_id ? '</thead><tbody>' . NL : ''; } echo '</tbody></table>' . NL; // //////////////////////////////////////////////////////////////////////////////////////////////////// // Affichage du formulaire pour modifier les états d'accès. // //////////////////////////////////////////////////////////////////////////////////////////////////// if ($affichage_formulaire_statut) {
} elseif (Form::$tab_choix['type_synthese']) { $class_form_periode = 'show'; } elseif (Form::$tab_choix['type_individuel']) { if (Form::$tab_choix['remplissage'] == 'plein' || Form::$tab_choix['colonne_bilan'] == 'oui') { $class_form_periode = 'show'; } else { $class_form_periode = 'hide'; } } else { $class_form_periode = 'hide'; } $is_periode_requise = $class_form_periode == 'show' ? 'true' : 'false'; // Javascript Layout::add('js_inline_before', 'var date_mysql = "' . TODAY_MYSQL . '";'); Layout::add('js_inline_before', 'var is_multiple = ' . $is_select_multiple . ';'); Layout::add('js_inline_before', 'var periode_requise = ' . $is_periode_requise . ';'); // Fabrication du tableau javascript "tab_groupe_periode" pour les jointures groupes/périodes HtmlForm::fabriquer_tab_js_jointure_groupe($tab_groupes, TRUE, FALSE); ?> <div><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE; ?> ?fichier=releves_bilans__releve_grille_referentiel">DOC : Grille d'items d'un référentiel.</a></span></div> <hr /> <form action="#" method="post" id="form_select"><fieldset> <p class="<?php echo $class_form_type; ?> ">
$select_individuel_format = HtmlForm::afficher_select(Form::$tab_select_individuel_format , 'f_individuel_format' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['releve_individuel_format'] /*selection*/ , '' /*optgroup*/); $select_groupe = HtmlForm::afficher_select($tab_groupes , 'f_groupe' /*select_nom*/ , $of_g /*option_first*/ , $sel_g /*selection*/ , 'regroupements' /*optgroup*/); $select_eleves_ordre = HtmlForm::afficher_select(Form::$tab_select_eleves_ordre , 'f_eleves_ordre' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['eleves_ordre'] /*selection*/ , '' /*optgroup*/); $select_periode = HtmlForm::afficher_select($tab_periodes , 'f_periode' /*select_nom*/ , 'periode_personnalisee' /*option_first*/ , FALSE /*selection*/ , '' /*optgroup*/); $select_orientation = HtmlForm::afficher_select(Form::$tab_select_orientation , 'f_orientation' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['orientation'] /*selection*/ , '' /*optgroup*/); $select_marge_min = HtmlForm::afficher_select(Form::$tab_select_marge_min , 'f_marge_min' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['marge_min'] /*selection*/ , '' /*optgroup*/); $select_pages_nb = HtmlForm::afficher_select(Form::$tab_select_pages_nb , 'f_pages_nb' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['pages_nb'] /*selection*/ , '' /*optgroup*/); $select_couleur = HtmlForm::afficher_select(Form::$tab_select_couleur , 'f_couleur' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['couleur'] /*selection*/ , '' /*optgroup*/); $select_fond = HtmlForm::afficher_select(Form::$tab_select_fond , 'f_fond' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['fond'] /*selection*/ , '' /*optgroup*/); $select_legende = HtmlForm::afficher_select(Form::$tab_select_legende , 'f_legende' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['legende'] /*selection*/ , '' /*optgroup*/); $select_cases_nb = HtmlForm::afficher_select(Form::$tab_select_cases_nb , 'f_cases_nb' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['cases_nb'] /*selection*/ , '' /*optgroup*/); $select_cases_larg = HtmlForm::afficher_select(Form::$tab_select_cases_size , 'f_cases_larg' /*select_nom*/ , FALSE /*option_first*/ , Form::$tab_choix['cases_largeur'] /*selection*/ , '' /*optgroup*/); // Javascript Layout::add( 'js_inline_before' , 'var date_mysql = "'.TODAY_MYSQL.'";' ); Layout::add( 'js_inline_before' , 'var is_multiple = '.$is_select_multiple.';' ); // Fabrication du tableau javascript "tab_groupe_periode" pour les jointures groupes/périodes HtmlForm::fabriquer_tab_js_jointure_groupe( $tab_groupes , TRUE /*tab_groupe_periode*/ , FALSE /*tab_groupe_niveau*/ ); ?> <div><span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=releves_bilans__releve_items_multimatiere">DOC : Relevé d'items pluridisciplinaire.</a></span></div> <div class="astuce">Un administrateur ou un directeur doit régler l'ordre d'affichage des matières (<span class="manuel"><a class="pop_up" href="<?php echo SERVEUR_DOCUMENTAIRE ?>?fichier=releves_bilans__reglages_syntheses_bilans#toggle_ordre_matieres">DOC</a></span>).</div> <hr /> <form action="#" method="post" id="form_select"><fieldset> <p class="<?php echo $class_form_option ?>"> <label class="tab"><img alt="" src="./_img/bulle_aide.png" width="16" height="16" title="Une colonne et deux lignes de synthèse peuvent être ajoutées.<br />Dans ce cas, une note sur 20 peut aussi être affichée." /> Opt. relevé :</label><?php if(!in_array($_SESSION['USER_PROFIL_TYPE'],array('parent','eleve'))) { echo $select_individuel_format.' avec '.$select_cases_nb.' d\'évaluation<br /><span class="tab"></span>'; } else { echo'<input type="hidden" id="f_individuel_format" name="f_individuel_format" value="'.Form::$tab_choix['releve_individuel_format'].'" />'; } ?><label for="f_etat_acquisition"><input type="checkbox" id="f_etat_acquisition" name="f_etat_acquisition" value="1"<?php echo $check_etat_acquisition ?> /> Colonne état d'acquisition</label><span id="span_etat_acquisition" class="<?php echo $class_etat_acquisition ?>"> <label for="f_moyenne_scores"><input type="checkbox" id="f_moyenne_scores" name="f_moyenne_scores" value="1"<?php echo $check_moyenne_score ?> /> Ligne moyenne des scores</label> <label for="f_pourcentage_acquis"><input type="checkbox" id="f_pourcentage_acquis" name="f_pourcentage_acquis" value="1"<?php echo $check_pourcentage_acquis ?> /> Ligne pourcentage d'items acquis</label> <label for="f_conversion_sur_20" class="<?php echo $class_conversion_sur_20 ?>"><input type="checkbox" id="f_conversion_sur_20" name="f_conversion_sur_20" value="1"<?php echo $check_conversion_sur_20 ?> /> Conversion en note sur 20</label></span> </p> <p class="<?php echo $class_form_eleve ?>">
/** * Unlike the add function, which appends a content variable's * data, set OVERWRITES the current values */ public static function set($text, $module = null, $contentVar = null) { Layout::checkSettings(); if (!isset($contentVar)) { $contentVar = DEFAULT_CONTENT_VAR; } $GLOBALS['Layout'][$module][$contentVar] = NULL; Layout::add($text, $module, $contentVar); }