本文整理汇总了PHP中UrlManager::get_url_data_from_id方法的典型用法代码示例。如果您正苦于以下问题:PHP UrlManager::get_url_data_from_id方法的具体用法?PHP UrlManager::get_url_data_from_id怎么用?PHP UrlManager::get_url_data_from_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UrlManager
的用法示例。
在下文中一共展示了UrlManager::get_url_data_from_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_lang
$form->addElement('textarea', 'description', get_lang('Description'));
//the first url with id = 1 will be always active
if (isset($_GET['url_id']) && $_GET['url_id'] != 1) {
$form->addElement('checkbox', 'active', null, get_lang('Active'));
}
$defaults['url'] = 'http://';
$form->setDefaults($defaults);
$submit_name = get_lang('AddUrl');
if (isset($_GET['url_id'])) {
$url_id = intval($_GET['url_id']);
$num_url_id = UrlManager::url_id_exist($url_id);
if ($num_url_id != 1) {
header('Location: access_urls.php');
exit;
}
$url_data = UrlManager::get_url_data_from_id($url_id);
$form->addElement('hidden', 'id', $url_data['id']);
$form->setDefaults($url_data);
$submit_name = get_lang('AddUrl');
}
if (!api_is_multiple_url_enabled()) {
header('Location: index.php');
exit;
}
$tool_name = get_lang('AddUrl');
$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
$interbreadcrumb[] = array("url" => 'access_urls.php', "name" => get_lang('MultipleAccessURLs'));
Display::display_header($tool_name);
if (isset($_GET['action'])) {
switch ($_GET['action']) {
case 'show_message':
示例2: array
$errorMsg = '';
$UserList = array();
$message = '';
if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent'];
$UserList = $_POST['sessionUsersList'];
if (!is_array($UserList)) {
$UserList = array();
}
if ($form_sent == 1) {
if ($access_url_id == 0) {
header('Location: access_url_edit_users_to_url.php?action=show_message&message=' . get_lang('SelectURL'));
exit;
} elseif (is_array($UserList)) {
$result = UrlManager::update_urls_rel_user($UserList, $access_url_id);
$url_info = UrlManager::get_url_data_from_id($access_url_id);
if (!empty($result)) {
$message .= 'URL: ' . $url_info['url'] . '<br />';
}
if (!empty($result['users_added'])) {
$message .= '<h4>' . get_lang('UsersAdded') . ':</h4>';
$i = 1;
$user_added_list = array();
foreach ($result['users_added'] as $user) {
$user_info = api_get_user_info($user);
if (!empty($user_info)) {
$user_added_list[] = $i . '. ' . api_get_person_name($user_info['firstname'], $user_info['lastname'], null, null, null, null, $user_info['username']);
$i++;
}
}
if (!empty($user_added_list)) {