本文整理汇总了PHP中admFuncVariableIsValid函数的典型用法代码示例。如果您正苦于以下问题:PHP admFuncVariableIsValid函数的具体用法?PHP admFuncVariableIsValid怎么用?PHP admFuncVariableIsValid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了admFuncVariableIsValid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admFuncVariableIsValid
* @see http://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
*
***********************************************************************************************
*/
require_once '../../system/common.php';
// check if the call of the page was allowed
if ($gPreferences['enable_pm_module'] != 1 && $gPreferences['enable_mail_module'] != 1 && $gPreferences['enable_chat_module'] != 1) {
$gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
}
// check for valid login
if (!$gValidLogin) {
$gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
// Initialize and check the parameters
$getMsgId = admFuncVariableIsValid($_GET, 'msg_id', 'int', array('defaultValue' => 0));
if ($getMsgId > 0) {
$delMessage = new TableMessage($gDb, $getMsgId);
// Function to delete message
$delete = $delMessage->delete();
if ($delete) {
echo 'done';
} else {
echo 'delete not OK';
}
exit;
}
$headline = $gL10n->get('SYS_MESSAGES');
// add current url to navigation stack
$gNavigation->clear();
$gNavigation->addUrl(CURRENT_URL, $headline);
示例2: admFuncVariableIsValid
* Homepage : http://www.admidio.org
* License : GNU Public License 2 http://www.gnu.org/licenses/gpl-2.0.html
*
* Erzeugt einen RSS 2.0 - Feed mit Hilfe der RSS-Klasse fuer die 10 neuesten Ankuendigungen
*
* Spezifikation von RSS 2.0: http://www.feedvalidator.org/docs/rss2.html
*
* Parameters:
*
* headline - Headline for RSS-Feed
* (Default) Announcements
*
*****************************************************************************/
require_once '../../system/common.php';
// Initialize and check the parameters
$getHeadline = admFuncVariableIsValid($_GET, 'headline', 'string', array('defaultValue' => $gL10n->get('ANN_ANNOUNCEMENTS')));
// Nachschauen ob RSS ueberhaupt aktiviert ist...
if ($gPreferences['enable_rss'] != 1) {
$gMessage->setForwardUrl($gHomepage);
$gMessage->show($gL10n->get('SYS_RSS_DISABLED'));
}
// Nachschauen ob RSS ueberhaupt aktiviert ist bzw. das Modul oeffentlich zugaenglich ist
if ($gPreferences['enable_announcements_module'] != 1) {
// das Modul ist deaktiviert
$gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
}
//Objekt anlegen
$announcements = new ModuleAnnouncements();
/*** ab hier wird der RSS-Feed zusammengestellt**/
// create RSS feed object with channel information
$rss = new RSSfeed($gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline, $gCurrentOrganization->getValue('org_homepage'), $gL10n->get('ANN_RECENT_ANNOUNCEMENTS_OF_ORGA', $gCurrentOrganization->getValue('org_longname')), $gCurrentOrganization->getValue('org_longname'));
示例3: admFuncVariableIsValid
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
*
* Parameters:
*
* mode : 1 - Save organization preferences
* 2 - show welcome dialog for new organization
* 3 - create new organization
* 4 - show phpinfo()
* form - The name of the form preferences that were submitted.
***********************************************************************************************
*/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$getMode = admFuncVariableIsValid($_GET, 'mode', 'numeric', array('defaultValue' => 1));
$getForm = admFuncVariableIsValid($_GET, 'form', 'string');
// in ajax mode only return simple text on error
if ($getMode === 1) {
$gMessage->showHtmlTextOnly(true);
}
// only webmasters are allowed to edit organization preferences or create new organizations
if (!$gCurrentUser->isWebmaster()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
switch ($getMode) {
case 1:
$checkboxes = array();
try {
// first check the fields of the submitted form
switch ($getForm) {
case 'common':
示例4: unset
*
* Parameters:
*
* headline - Headline für Ics-Feed
* (Default) Events
* mode 1 - Textausgabe
* 2 - Download
* cat_id - show all dates of calendar with this id
*
*****************************************************************************/
require_once '../../system/common.php';
unset($_SESSION['dates_request']);
// Initialize and check the parameters
$getMode = admFuncVariableIsValid($_GET, 'mode', 'string', array('defaultValue' => 'actual', 'validValues' => array('actual', 'old', 'all')));
$getHeadline = admFuncVariableIsValid($_GET, 'headline', 'string', array('defaultValue' => $gL10n->get('DAT_DATES')));
$getCatId = admFuncVariableIsValid($_GET, 'cat_id', 'numeric');
// prüfen ob das Modul überhaupt aktiviert ist
if ($gPreferences['enable_dates_module'] == 0) {
// das Modul ist deaktiviert
$gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
} elseif ($gPreferences['enable_dates_module'] == 2) {
// nur eingelochte Benutzer dürfen auf das Modul zugreifen
require_once '../../system/login_valid.php';
}
// Nachschauen ob ical ueberhaupt aktiviert ist bzw. das Modul oeffentlich zugaenglich ist
if ($gPreferences['enable_dates_ical'] != 1) {
$gMessage->setForwardUrl($gHomepage);
$gMessage->show($gL10n->get('SYS_ICAL_DISABLED'));
}
//create Object
$dates = new ModuleDates();
示例5: admFuncVariableIsValid
/**
***********************************************************************************************
* @copyright 2004-2015 The Admidio Team
* @see http://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
***********************************************************************************************
*/
require_once '../../system/common.php';
// only users with the right to edit inventory could use this script
if (!$gCurrentUser->editInventory()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
$postFunction = admFuncVariableIsValid($_POST, 'function', 'string');
$postNickname = admFuncVariableIsValid($_POST, 'nickname', 'string');
$postMessage = admFuncVariableIsValid($_POST, 'message', 'string');
$postLines = admFuncVariableIsValid($_POST, 'state', 'number');
$log = array();
echo '<script>
$(function() {
$("button#submit").click(function() {
$.ajax({
url: "process.php",
type: "POST",
data: $("#template-form").serialize(),
success: function(data) {
$("#responsestatus").val(data);
$("#subscription-confirm").modal("show");
}
});
});
});
示例6: admFuncVariableIsValid
* @copyright 2004-2016 The Admidio Team
* @see http://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
*
* Parameters:
*
* CKEditor : ID of textarea, that had triggered the upload
* CKEditorFuncNum : function number, that will handle in the editor the new URL
* langCode : language code
***********************************************************************************************
*/
require_once 'common.php';
require_once 'login_valid.php';
$getCKEditor = admFuncVariableIsValid($_GET, 'CKEditor', 'string', array('directOutput' => true, 'requireValue' => true));
$getCKEditorFuncNum = admFuncVariableIsValid($_GET, 'CKEditorFuncNum', 'string', array('directOutput' => true, 'requireValue' => true));
$getlangCode = admFuncVariableIsValid($_GET, 'langCode', 'string', array('directOutput' => true));
$message = '';
try {
// checks if the server settings for file_upload are set to ON
if (ini_get('file_uploads') !== '1') {
$message = $gL10n->get('SYS_SERVER_NO_UPLOAD');
}
// if necessary create the module folders in adm_my_files
switch ($getCKEditor) {
case 'ann_description':
$folderName = 'announcements';
break;
case 'dat_description':
$folderName = 'dates';
break;
case 'lnk_description':
示例7: elseif
}
} elseif ($getMode === 6) {
// reload future role memberships
$count_show_roles = 0;
$roleStatement = getFutureRolesFromDatabase($getUserId);
$count_role = $roleStatement->rowCount();
getRoleMemberships('future_role_list', $user, $roleStatement, $count_role, true);
if ($count_role === 0) {
echo '<script type="text/javascript">$("#profile_future_roles_box").css({ \'display\':\'none\' })</script>';
} else {
echo '<script type="text/javascript">$("#profile_future_roles_box").css({ \'display\':\'block\' })</script>';
}
} elseif ($getMode === 7) {
// save membership date changes
$getMembershipStart = admFuncVariableIsValid($_GET, 'membership_start_date_' . $getMemberId, 'date', array('requireValue' => true));
$getMembershipEnd = admFuncVariableIsValid($_GET, 'membership_end_date_' . $getMemberId, 'date', array('requireValue' => true));
$member = new TableMembers($gDb, $getMemberId);
$role = new TableRoles($gDb, $member->getValue('mem_rol_id'));
// check if user has the right to edit this membership
if (!$role->allowedToAssignMembers($gCurrentUser)) {
exit($gL10n->get('SYS_NO_RIGHTS'));
}
$formatedStartDate = '';
$formatedEndDate = '';
// Check das Beginn Datum
$startDate = new DateTimeExtended($getMembershipStart, $gPreferences['system_date']);
if ($startDate->isValid()) {
// Datum formatiert zurueckschreiben
$formatedStartDate = $startDate->format('Y-m-d');
} else {
exit($gL10n->get('SYS_DATE_INVALID', $gL10n->get('SYS_START'), $gPreferences['system_date']));
示例8: admFuncVariableIsValid
* Activate new password
*
* @copyright 2004-2016 The Admidio Team
* @see http://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
*
* Parameters:
*
* aid .. Activation id for confirmation of new password
* usr_id .. Id of the user who wants a new password
***********************************************************************************************
*/
require_once 'common.php';
// Initialize and check the parameters
$getActivationId = admFuncVariableIsValid($_GET, 'aid', 'string', array('requireValue' => true));
$getUserId = admFuncVariableIsValid($_GET, 'usr_id', 'int', array('requireValue' => true));
// Systemmails und Passwort zusenden muessen aktiviert sein
if ($gPreferences['enable_system_mails'] != 1 || $gPreferences['enable_password_recovery'] != 1) {
$gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
}
$user = new TableUsers($gDb, $getUserId);
if ($user->getValue('usr_activation_code') === $getActivationId) {
// activate the new password
$user->setPassword($user->getValue('usr_new_password'), false, false);
$user->setPassword('', true, false);
$user->setValue('usr_activation_code', '');
$user->save();
$gMessage->setForwardUrl($g_root_path . '/adm_program/system/login.php', 2000);
$gMessage->show($gL10n->get('SYS_PWACT_PW_SAVED'));
} else {
$gMessage->show($gL10n->get('SYS_PWACT_CODE_INVALID'));
示例9: admFuncVariableIsValid
***********************************************************************************************
* Create and edit roles
*
* @copyright 2004-2015 The Admidio Team
* @see http://www.admidio.org/
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 only
*
* Parameters:
*
* rol_id: ID of role, that should be edited
***********************************************************************************************
*/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$getRoleId = admFuncVariableIsValid($_GET, 'rol_id', 'numeric');
// Initialize local parameters
$showSystemCategory = false;
// only users with the special right are allowed to manage roles
if (!$gCurrentUser->manageRoles()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
if ($getRoleId > 0) {
$headline = $gL10n->get('ROL_EDIT_ROLE');
} else {
$headline = $gL10n->get('SYS_CREATE_ROLE');
}
$gNavigation->addUrl(CURRENT_URL, $headline);
// Rollenobjekt anlegen
$role = new TableRoles($gDb);
if ($getRoleId > 0) {
示例10: admFuncVariableIsValid
* lst_id : Id of the list configuration that should be shown
* rol_id : (Optional) If a role id is set then the form field will be preassigned.
* active_role : 1 - (Default) List only active roles
* 0 - List only deactivated roles
* show_members : 0 - (Default) show active members of role
* 1 - show former members of role
* 2 - show active and former members of role
***********************************************************************************************
*/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$getListId = admFuncVariableIsValid($_GET, 'lst_id', 'numeric');
$getRoleId = admFuncVariableIsValid($_GET, 'rol_id', 'numeric');
$getActiveRole = admFuncVariableIsValid($_GET, 'active_role', 'boolean', array('defaultValue' => 1));
$getShowMembers = admFuncVariableIsValid($_GET, 'show_members', 'numeric');
// falls ehemalige Rolle, dann auch nur ehemalige Mitglieder anzeigen
if ($getActiveRole == 0) {
$getShowMembers = 1;
}
// set headline of the script
$headline = $gL10n->get('LST_MY_LIST') . ' - ' . $gL10n->get('LST_CONFIGURATION');
if ($getRoleId == 0) {
// Navigation faengt hier im Modul an
$gNavigation->clear();
}
$gNavigation->addUrl(CURRENT_URL, $headline);
$defaultColumnRows = 6;
// number of columns that should be shown
// Listenobjekt anlegen
$list = new ListConfiguration($gDb, $getListId);
示例11: admFuncVariableIsValid
* Copyright : (c) 2004 - 2015 The Admidio Team
* Homepage : http://www.admidio.org
* License : GNU Public License 2 http://www.gnu.org/licenses/gpl-2.0.html
*
* Parameters:
*
* room_id : ID of room, that should be shown
* headline : headline for room module
* (Default) SYS_ROOM
*
****************************************************************************/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$getRoomId = admFuncVariableIsValid($_GET, 'room_id', 'numeric');
$getHeadline = admFuncVariableIsValid($_GET, 'headline', 'string', array('defaultValue' => $gL10n->get('SYS_ROOM')));
// nur berechtigte User duerfen die Profilfelder bearbeiten
if (!$gCurrentUser->isWebmaster()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
// set headline of the script
if ($getRoomId > 0) {
$headline = $gL10n->get('SYS_EDIT_VAR', $getHeadline);
} else {
$headline = $gL10n->get('SYS_CREATE_VAR', $getHeadline);
}
// add current url to navigation stack
$gNavigation->addUrl(CURRENT_URL, $headline);
// Create room object
$room = new TableRooms($gDb);
if ($getRoomId > 0) {
示例12: admFuncVariableIsValid
*
* Parameters:
*
* pho_id: Id of photo album whose image you want to send
* photo_nr: Number of the photo of the choosen album
* usr_id: (optional) Id of the user who should receive the ecard
***********************************************************************************************
*/
require_once '../../system/common.php';
require_once 'ecard_function.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$getPhotoId = admFuncVariableIsValid($_GET, 'pho_id', 'int', array('requireValue' => true));
$getUserId = admFuncVariableIsValid($_GET, 'usr_id', 'int');
$getPhotoNr = admFuncVariableIsValid($_GET, 'photo_nr', 'int', array('requireValue' => true));
$showPage = admFuncVariableIsValid($_GET, 'show_page', 'int', array('defaultValue' => 1));
// Initialisierung lokaler Variablen
$funcClass = new FunctionClass($gL10n);
$templates = $funcClass->getFileNames(THEME_SERVER_PATH . '/ecard_templates/');
$template = THEME_SERVER_PATH . '/ecard_templates/';
$headline = $gL10n->get('ECA_GREETING_CARD_EDIT');
// pruefen ob das Modul ueberhaupt aktiviert ist
if ($gPreferences['enable_ecard_module'] != 1) {
// das Modul ist deaktiviert
$gMessage->show($gL10n->get('SYS_MODULE_DISABLED'));
}
// URL auf Navigationstack ablegen
$gNavigation->addUrl(CURRENT_URL, $headline);
// Fotoveranstaltungs-Objekt erzeugen oder aus Session lesen
if (isset($_SESSION['photo_album']) && $_SESSION['photo_album']->getValue('pho_id') == $getPhotoId) {
$photo_album =& $_SESSION['photo_album'];
示例13: admFuncVariableIsValid
<?php
/******************************************************************************
* Prepare values of import form for further processing
*
* Copyright : (c) 2004 - 2015 The Admidio Team
* Homepage : http://www.admidio.org
* License : GNU Public License 2 http://www.gnu.org/licenses/gpl-2.0.html
*
*****************************************************************************/
require_once '../../system/common.php';
require_once '../../system/login_valid.php';
// Initialize and check the parameters
$postImportCoding = admFuncVariableIsValid($_POST, 'import_coding', 'string', array('requireValue' => true, 'validValues' => array('iso-8859-1', 'utf-8')));
$postRoleId = admFuncVariableIsValid($_POST, 'import_role_id', 'numeric');
$postUserImportMode = admFuncVariableIsValid($_POST, 'user_import_mode', 'numeric', array('requireValue' => true));
$_SESSION['import_request'] = $_POST;
unset($_SESSION['import_csv_request']);
// nur berechtigte User duerfen User importieren
if (!$gCurrentUser->editUsers()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
if (strlen($_FILES['userfile']['tmp_name'][0]) == 0) {
$gMessage->show($gL10n->get('SYS_FIELD_EMPTY', $gL10n->get('SYS_FILE')));
} elseif ($_FILES['userfile']['error'][0] == 1) {
//Dateigroesse ueberpruefen Servereinstellungen
$gMessage->show($gL10n->get('SYS_FILE_TO_LARGE_SERVER', $gPreferences['max_file_upload_size']));
} elseif ($postRoleId == 0) {
$gMessage->show($gL10n->get('SYS_FIELD_EMPTY', $gL10n->get('SYS_ROLE')));
}
// Rolle einlesen und pruefen, ob der User diese selektieren kann und dadurch nicht
示例14: admFuncVariableIsValid
* Copyright : (c) 2004 - 2015 The Admidio Team
* Homepage : http://www.admidio.org
* License : GNU Public License 2 http://www.gnu.org/licenses/gpl-2.0.html
*
* Parameters:
*
* inv_id : id of inventory whose photo should be changed
* new_photo : 0 (Default) show current stored inventory photo
* 1 show uploaded photo of current session
*
*****************************************************************************/
require '../../system/common.php';
require '../../system/login_valid.php';
// Initialize and check the parameters
$getItemId = admFuncVariableIsValid($_GET, 'inv_id', 'numeric', array('requireValue' => true));
$getNewPhoto = admFuncVariableIsValid($_GET, 'new_photo', 'boolean');
// lokale Variablen der Uebergabevariablen initialisieren
$image = null;
$picpath = THEME_SERVER_PATH . '/images/no_profile_pic.png';
// only users with the right to edit inventory could use this script
if ($gCurrentUser->editInventory() == false) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
}
// read inventory data and show error if inventory doesn't exists
$gInventoryFields = new InventoryFields($gDb, $gCurrentOrganization->getValue('org_id'));
$inventory = new Inventory($gDb, $gInventoryFields, $getItemId);
if ($inventory->getValue('inv_id') == 0) {
$gMessage->show($gL10n->get('SYS_INVALID_PAGE_VIEW'));
}
//Foto aus adm_my_files
if ($gPreferences['profile_photo_storage'] == 1 && $getNewPhoto == 0) {
示例15: admFuncVariableIsValid
// then show nothing. Second call is with POST parameters then show preview
require_once '../../system/common.php';
require_once 'ecard_function.php';
//$gMessage->showTextOnly(true);
$gMessage->showThemeBody(false);
$gMessage->showInModaleWindow();
if (strlen($_POST['ecard_template']) === 0) {
$gMessage->show($gL10n->get('SYS_FIELD_EMPTY', $gL10n->get('ECA_TEMPLATE')));
}
// Initialize and check the parameters
$ecardMessage = '';
$postTemplateName = admFuncVariableIsValid($_POST, 'ecard_template', 'file', array('requireValue' => true));
$postPhotoId = admFuncVariableIsValid($_POST, 'photo_id', 'int', array('requireValue' => true));
$postPhotoNr = admFuncVariableIsValid($_POST, 'photo_nr', 'int', array('requireValue' => true));
$nameRecipient = admFuncVariableIsValid($_POST, 'name_recipient', 'string');
$emailRecipient = admFuncVariableIsValid($_POST, 'email_recipient', 'string');
if (isset($_POST['ecard_message'])) {
$ecardMessage = $_POST['ecard_message'];
}
$imageUrl = $g_root_path . '/adm_program/modules/photos/photo_show.php?pho_id=' . $postPhotoId . '&photo_nr=' . $postPhotoNr . '&max_width=' . $gPreferences['ecard_thumbs_scale'] . '&max_height=' . $gPreferences['ecard_thumbs_scale'];
$funcClass = new FunctionClass($gL10n);
// read content of template file
$ecardDataToParse = $funcClass->getEcardTemplate($postTemplateName, THEME_SERVER_PATH . '/ecard_templates/');
if ($ecardDataToParse === '') {
$gMessage->show($gL10n->get('SYS_ERROR_PAGE_NOT_FOUND'));
}
echo '
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">' . $gL10n->get('SYS_NOTE') . '</h4>
</div>