本文整理汇总了PHP中isSuperUser函数的典型用法代码示例。如果您正苦于以下问题:PHP isSuperUser函数的具体用法?PHP isSuperUser怎么用?PHP isSuperUser使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isSuperUser函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: run
public function run(&$params)
{
//>>1.定义不需要登陆验证的地址
$noCheck = array('Login/index', 'Verify/index');
//>>2.获取用户正在访问的url地址
$requestURL = CONTROLLER_NAME . '/' . ACTION_NAME;
if (in_array($requestURL, $noCheck)) {
return;
}
header('Content-Type: text/html;charset=utf-8');
//>>1.判定用户是否登陆
if (!isLogin()) {
$loginService = D('Login', 'Service');
if (!$loginService->autoLogin()) {
//进行自动登录, 如果没有自动登录,就转向登录页面
redirect(U('Login/index'), 1, '请登陆!');
}
}
//>>3.如果是超级管理员不用在判定权限
if (isSuperUser()) {
return;
}
//>>2.判定登陆用户访问的url是否在他的权限范围之内
$urls = savePermissionURL();
if (!in_array($requestURL, $urls)) {
exit('权限不足!请求联系管理员!');
}
}
开发者ID:RAYNBINGHAN4,项目名称:www,代码行数:28,代码来源:CheckPermissionBehavior.class.php
示例2: run
public function run(&$params)
{
//
//判断当前访问的url在不在这个数组中,如果在就直接访问
$accessarr = array('Login/login', 'Login/logout');
$requestURL = CONTROLLER_NAME . '/' . ACTION_NAME;
if (in_array($requestURL, $accessarr)) {
return;
}
//判断用户是否登录,如果未登录直接重定向到登录页面
if (!islogin()) {
$loginService = D('Login', 'Service');
$loginService->autoLogin();
redirect(U('Login/login'), 1, '请登陆!');
exit;
}
//判断是否是超级管理员
if (isSuperUser()) {
return;
}
//最后在判断是否有访问某个控制器里方法的权限;
$arr = userUrl();
$arr = array_column($arr, 'url');
if (!in_array($requestURL, $arr)) {
echo "没有该权限";
exit;
}
}
开发者ID:black-tangyang,项目名称:php0805,代码行数:28,代码来源:CheckPermissionBehavior.class.php
示例3: addToolbar
function addToolbar($item)
{
$canDo = JHotelReservationHelper::getActions();
JRequest::setVar('hidemainmenu', 1);
if ($canDo->get('core.create') && ($item->hotel_state == 0 || isSuperUser(JFactory::getUser()->id))) {
JToolBarHelper::apply('hotel.apply');
JToolBarHelper::save('hotel.save');
}
JToolBarHelper::cancel('hotel.cancel');
}
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:10,代码来源:view.html.php
示例4: accessLevel
function accessLevel($page)
{
global $tables, $access_levels;
if (!$GLOBALS["require_login"] || isSuperUser()) {
return "all";
}
if (!isset($_SESSION["adminloggedin"])) {
return 0;
}
if (!is_array($_SESSION["logindetails"])) {
return 0;
}
## for non-supers we only allow owner views
## this is likely to need tweaking
return 'owner';
}
开发者ID:narareddy,项目名称:phplist3,代码行数:16,代码来源:accesscheck.php
示例5: checkHotels
function checkHotels($userId, $hotels)
{
if (isSuperUser($userId) || isManager($userId)) {
return $hotels;
}
$db = JFactory::getDBO();
$query = "SELECT b.hotel_id\r\n\t\t\t\t FROM #__users a,\r\n\t\t\t\t\t\t#__hotelreservation_user_hotel_mapping b\r\n\t\t\t\t\tWHERE a.id=b.user_id\r\n\t\t\t\t\t\t and a.id=" . $userId;
$db->setQuery($query);
$userHotels = $db->loadColumn();
if (count($userHotels) == 0) {
return null;
}
for ($i = 0, $a = count($hotels); $i < $a; $i++) {
$hotel = $hotels[$i];
if (!in_array($hotel->hotel_id, $userHotels) > 0) {
unset($hotels[$i]);
}
}
return $hotels;
}
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:20,代码来源:userAccess.php
示例6: menu
public function menu()
{
//向首页添加菜单栏数据,先判断是不是超级管理员
if (isSuperUser()) {
$menuModel = D('Menu');
$result = $menuModel->getList('id,url,name,parent_id,level');
} else {
$permissionIds = savePermissionID();
// dump($permissionIds);
if ($permissionIds) {
$permissionIdsStr = implode($permissionIds, ',');
$sql = "select distinct m.id,m.name,m.url,m.level,m.parent_id from menu as m join menu_permission as mp on m.id = mp.menu_id where mp.permission_id in ({$permissionIdsStr})";
// dump($sql);
$result = M()->query($sql);
// dump($result);exit;
}
}
$this->assign('menus', $result);
$this->display('menu');
}
开发者ID:RAYNBINGHAN4,项目名称:www,代码行数:20,代码来源:IndexController.class.php
示例7: accessLevel
function accessLevel($page)
{
global $tables, $access_levels;
if (!$GLOBALS["require_login"] || isSuperUser()) {
return "all";
}
if (!isset($_SESSION["adminloggedin"])) {
return 0;
}
if (!is_array($_SESSION["logindetails"])) {
return 0;
}
# check whether it is a page to protect
Sql_Query("select id from {$tables["task"]} where page = \"{$page}\"");
if (!Sql_Affected_Rows()) {
return "all";
}
$req = Sql_Query(sprintf('select level from %s,%s where adminid = %d and page = "%s" and %s.taskid = %s.id', $tables["task"], $tables["admin_task"], $_SESSION["logindetails"]["id"], $page, $tables["admin_task"], $tables["task"]));
$row = Sql_Fetch_Row($req);
return $access_levels[$row[0]];
}
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:21,代码来源:accesscheck.php
示例8: Sql_Query
}
if ($delete) {
Sql_Query(sprintf('delete from %s where id = %d', $tables["subscribepage"], $delete));
Sql_Query(sprintf('delete from %s where id = %d', $tables["subscribepage_data"], $delete));
Info($GLOBALS['I18N']->get('Deleted') . " {$delete}");
}
print formStart('name="pagelist" class="spageEdit" ');
print '<input type="hidden" name="active[-1]" value="1" />';
## to force the active array to exist
$ls = new WebblerListing($GLOBALS['I18N']->get('subscribe pages'));
$req = Sql_Query(sprintf('select * from %s %s order by title', $tables["subscribepage"], $subselect));
while ($p = Sql_Fetch_Array($req)) {
$ls->addElement($p["id"]);
$ls->setClass($p["id"], 'row1');
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('title'), stripslashes($p["title"]));
if ($require_login && isSuperUser() || !$require_login) {
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('owner'), adminName($p["owner"]));
if ($p["id"] == $default) {
$checked = 'checked="checked"';
} else {
$checked = "";
}
$ls->addColumn($p["id"], $GLOBALS['I18N']->get('default'), sprintf('<input type="radio" name="default" value="%d" %s onchange="document.pagelist.submit()" />', $p["id"], $checked));
} else {
$adminname = "";
$isdefault = "";
}
$ls->addColumn($p["id"], s('active'), sprintf('<input type="checkbox" name="active[%d]" value="1" %s onchange="document.pagelist.submit()" />', $p["id"], $p["active"] ? 'checked="checked"' : ''));
$ls->addRow($p["id"], $p["active"] ? '<span class="yes" title="' . $GLOBALS['I18N']->get('active') . '"></span>' : '<span class="no" title="' . $GLOBALS['I18N']->get('not active') . '"></span>', sprintf('<span class="edit"><a class="button" href="%s&id=%d" title="' . $GLOBALS['I18N']->get('edit') . '">%s</a></span>', PageURL2("spageedit", ""), $p["id"], $GLOBALS['I18N']->get('edit')) . sprintf('<span class="delete"><a class="button" href="javascript:deleteRec(\'%s\');" title="' . $GLOBALS['I18N']->get('delete') . '">%s</a></span>', PageURL2("spage", "", "delete=" . $p["id"]), $GLOBALS['I18N']->get('del')) . sprintf('<span class="view"><a class="button" href="%s&id=%d" title="' . $GLOBALS['I18N']->get('view') . '">%s</a></span>', getConfig("subscribeurl"), $p["id"], $GLOBALS['I18N']->get('view')));
}
print $ls->display();
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:spage.php
示例9:
?>
">Dashboard</a>
<a href="contacts.php" class="menubuttons <?php
if ($pagetitle == "Contact" || $pagetitle == "ContactDetails") {
echo "menubuttonsactive";
}
?>
">Contacts</a>
<a href="campaigns.php" class="menubuttons <?php
if ($pagetitle == "Campaigns") {
echo "menubuttonsactive";
}
?>
">Campaigns</a>
<?php
if (isSuperUser($row_userinfo)) {
?>
<a href="users.php" class="menubuttons <?php
if ($pagetitle == "Users") {
echo "menubuttonsactive";
}
?>
">Users</a>
<?php
}
?>
<span class="headerright">Logged in as <?php
echo $row_userinfo['user_email'];
?>
| <a href="logout.php">Log Out</a> | <a href="profile.php">Update Profile</a> </span><br clear="all" />
开发者ID:jmreardon,项目名称:donor-track,代码行数:31,代码来源:header.php
示例10: strtotime
echo $room->offer_id . "|" . $room->room_id . "|" . $room->current;
?>
][price][<?php
echo $dayString;
?>
]" id="room_price_<?php
echo $room->id;
?>
_<?php
echo $dayString;
?>
" onBlur="setCustomPrice()" value="<?php
echo $price;
?>
" <?php
if (!isSuperUser(JFactory::getUser()->id)) {
echo "disabled";
}
?>
>
( <?php
echo number_format($room->daily[$dayString]["price_final"], 2);
?>
)
</li>
<?php
$d = strtotime(date('Y-m-d', $d) . ' + 1 day ');
}
?>
</ul>
</div>
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:31,代码来源:edit.php
示例11: PageLinkButton
$toList = '';
}
print '<div class="actions">
' . PageLinkButton('send&new=1' . $toList, s('Send a campaign')) . PageLinkButton('importsimple', s('Import some more emails')) . '</div>';
}
if (!empty($rejectReport['invalid'])) {
$report .= "\n\n" . s('Rejected email addresses') . ":\n";
$report .= $rejectReport['invalid'];
}
sendMail(getConfig("admin_address"), s('phplist Import Results'), $report);
foreach ($GLOBALS['plugins'] as $pluginname => $plugin) {
$plugin->importReport($report);
}
return;
}
if ($GLOBALS["require_login"] && !isSuperUser()) {
$access = accessLevel("import1");
switch ($access) {
case "owner":
$subselectimp = " where owner = " . $_SESSION["logindetails"]["id"];
break;
case "all":
$subselectimp = "";
break;
case "none":
default:
$subselectimp = " where id = 0";
break;
}
}
if (isset($_GET['list'])) {
开发者ID:Gerberus,项目名称:phplist3,代码行数:31,代码来源:importsimple.php
示例12: accessLevel
if ($GLOBALS["require_login"] && !isSuperUser()) {
$access = accessLevel("bounce");
switch ($access) {
case "all":
$subselect = "";
break;
case "none":
default:
$subselect = " and " . $tables["list"] . ".id = 0";
break;
}
}
if (isset($start)) {
echo "<br />" . PageLink2("bounces", $GLOBALS['I18N']->get('BackToBList'), "start={$start}") . "\n";
}
if (isset($_GET["doit"]) && ($GLOBALS["require_login"] && isSuperUser() || !$GLOBALS["require_login"])) {
if ($useremail) {
$req = Sql_Fetch_Row_Query(sprintf('select id from %s where email = "%s"', $tables["user"], $useremail));
$userid = $req[0];
if (!$userid) {
print "{$useremail} => " . $GLOBALS['I18N']->get('NotFound') . "\n";
}
}
if (isset($userid) && $amount) {
Sql_Query(sprintf('update %s set bouncecount = bouncecount + %d where id = %d', $tables["user"], $amount, $userid));
if (Sql_Affected_Rows()) {
print sprintf($GLOBALS['I18N']->get('AddedToB'), $amount, $userid) . "\n";
} else {
print sprintf($GLOBALS['I18N']->get('AddedToB'), $amount, $userid) . "\n";
}
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:31,代码来源:bounce.php
示例13: Redirect
Redirect('list&tab=' . $aListCategories[0]);
}
}
print '<p class="total">' . $total . ' ' . $GLOBALS['I18N']->get('Lists') . '</p>';
$limit = '';
$query = ' select *' . ' from ' . $tables['list'] . $subselect . ' order by listorder ' . $limit;
$result = Sql_query($query);
$numlists = Sql_Affected_Rows($result);
$ls = new WebblerListing(s('Lists'));
/** Always Show a "list" of all subscribers
* https://mantis.phplist.com/view.php?id=17433
* many users are confused when they have more subscribers than members of lists
* this will avoid that confusion
* we can only do this for superusers of course
* */
if (SHOW_LIST_OFALL_SUBSCRIBERS && isSuperUser()) {
$query = ' select count(u.id) as total,' . ' sum(u.confirmed) as confirmed, ' . ' sum(u.blacklisted) as blacklisted ' . ' from ' . $tables['user'] . ' u';
$req = Sql_Query($query);
$membercount = Sql_Fetch_Assoc($req);
$members = $membercount['confirmed'];
$unconfirmedMembers = (int) ($membercount['total'] - $members);
$desc = s('All subscribers');
if ($unconfirmedMembers > 0) {
$membersDisplay = '<span class="memberCount" title="' . s('Confirmed members') . '">' . $members . '</span> <span class="unconfirmedCount" title="' . s('Unconfirmed members') . '">(' . $unconfirmedMembers . ')</span>';
} else {
$membersDisplay = '<span class="memberCount">' . $members . '</span>';
}
$element = '<!-- ' . $row['id'] . '-->' . s('All subscribers');
$ls->addElement($element);
$ls->setClass($element, 'rows row1');
$ls->addColumn($element, $GLOBALS['I18N']->get('Members'), '<div style="display:inline-block;text-align:right;width:50%;float:left;">' . $membersDisplay . '</div><span class="view" style="text-align:left;display:inline-block;float:right;width:48%;"><a class="button " href="./?page=members&id=all" title="' . $GLOBALS['I18N']->get('View Members') . '">' . $GLOBALS['I18N']->get('View Members') . '</a></span>');
开发者ID:dehvCurtis,项目名称:phplist,代码行数:31,代码来源:list.php
示例14: list
}
?>
/><label for="active"><?php
echo $GLOBALS['I18N']->get('Public list (listed on the frontend)');
?>
</label></div>
<div class="label"><label for="listorder"><?php
echo $GLOBALS['I18N']->get('Order for listing');
?>
</label></div>
<div class="field"><input type="text" name="listorder" value="<?php
echo $list["listorder"];
?>
" class="listorder" /></div>
<?php
if ($GLOBALS["require_login"] && (isSuperUser() || accessLevel("editlist") == "all")) {
if (empty($list["owner"])) {
$list["owner"] = $_SESSION["logindetails"]["id"];
}
$admins = $GLOBALS["admin_auth"]->listAdmins();
if (sizeof($admins) > 1) {
print '<div class="label"><label for="owner">' . $GLOBALS['I18N']->get('Owner') . '</label></div><div class="field"><select name="owner">';
foreach ($admins as $adminid => $adminname) {
printf(' <option value="%d" %s>%s</option>', $adminid, $adminid == $list["owner"] ? 'selected="selected"' : '', $adminname);
}
print '</select></div>';
} else {
print '<input type="hidden" name="owner" value="' . $_SESSION["logindetails"]["id"] . '" />';
}
} else {
print '<input type="hidden" name="owner" value="' . $_SESSION["logindetails"]["id"] . '" />';
开发者ID:narareddy,项目名称:phplist3,代码行数:31,代码来源:editlist.php
示例15: generate
function generate($title, $user, $object)
{
global $truncateText;
$results = $object->GetList(array(array("onlineuser_onlineuserid", "=", $user->onlineuserId)));
$alt = false;
$rowclass = "";
if (count($results) > 0 || isSuperUser(false)) {
$class = strtolower(get_class($object));
echo "<span class='adminrowheader'>{$title} Admin</span>";
if ($class != "platinum_membership" || isSuperUser(false)) {
echo " - <a href='" . $class . "_form.php' class='newslarge'>create new</a>";
}
echo "<div class=\"spacer\"></div>";
echo "<table class=\"table\">";
if (count($results) == 0) {
if (isSuperUser(false)) {
echo "<tr><td>";
echo "currently have no entries";
echo "</td></tr>";
}
} else {
$hasName = isset($results[0]->name);
$hasHeading = isset($results[0]->heading);
$hasDescription = isset($results[0]->description);
$hasText = isset($results[0]->text);
$hasLink = isset($results[0]->link);
if ($class == "platinum_membership" || $class == "supplier" || $class == "gold_membership") {
$hasStats = true;
} else {
$hasStats = false;
}
echo "<TR>";
if ($hasName) {
echo "<TD>Name</td>";
} elseif ($hasHeading) {
echo "<TD>Heading</td>";
}
if ($hasDescription) {
echo "<TD>Description</td>";
} elseif ($hasText) {
echo "<TD>Text</td>";
}
if ($hasLink) {
echo "<TD>URL</td>";
}
echo "<TD>Created</td>";
echo "<TD>Expires</td>";
echo "<td>Status</td>";
echo "<TD><!-- Functions --></td>";
if ($hasStats && isSuperUser(false)) {
echo "<TD>Impressions</TD>";
echo "<TD>Clicks</TD>";
}
echo "</tr>";
foreach ($results as $obj) {
if ($alt) {
$rowclass = "row_even";
} else {
$rowclass = "row_odd";
}
$alt = !$alt;
echo "<tr>";
if ($hasName) {
echo "<td class=\"{$rowclass}\">" . $obj->name . "</td>";
} else {
if ($hasHeading) {
echo "<td class=\"{$rowclass}\">" . $obj->heading . "</td>";
}
}
if ($hasDescription) {
echo "<td class=\"{$rowclass}\">" . strip_tags(substr($obj->description, 0, $truncateText)) . "...</td>";
} else {
if ($hasText) {
echo "<td class=\"{$rowclass}\">" . strip_tags(substr($obj->text, 0, $truncateText)) . "...</td>";
}
}
if ($hasLink) {
echo "<td class=\"{$rowclass}\">" . $obj->link . "</td>";
}
echo "<td class=\"{$rowclass}\">" . FormatDateTime($obj->dt_created, 7) . "</td>";
echo "<td class=\"{$rowclass}\">" . FormatDateTime($obj->dt_expire, 7) . "</td>";
$classId = $class . "Id";
$status = $class . "_status";
//echo "</td>";
if ($obj->{$status} != "temp" && $obj->dt_expire <= date("Y-m-d")) {
echo "<td class=\"{$rowclass}\">Expired</td><td class=\"{$rowclass}\"><ul>";
echo "<li><a href=\"renew.php?type={$class}&id=" . $obj->{$classId} . "\">Renew</a></li>";
} else {
switch ($obj->{$status}) {
case "temp":
echo "<td class=\"{$rowclass}\">Temporary</td><td class=\"{$rowclass}\"><ul>";
echo "<li><a href=\"activate.php?type={$class}&id=" . $obj->{$classId} . "\">Activate</a></li>";
break;
case "active":
echo "<td class=\"{$rowclass}\">Active</td><td class=\"{$rowclass}\"><ul>";
if (isSuperUser(false)) {
echo "<li><a href=\"deactivate.php?type={$class}&id=" . $obj->{$classId} . "\">Pause</a></li>";
}
break;
case "disabled":
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:scrapbook,代码行数:101,代码来源:common_functions.php
示例16: Info
if (TEST) {
print Info($GLOBALS['I18N']->get('Running in testmode, no emails will be sent. Check your config file.'));
}
if (version_compare(PHP_VERSION, '5.1.2', '<') && WARN_ABOUT_PHP_SETTINGS) {
Error($GLOBALS['I18N']->get('phpList requires PHP version 5.1.2 or higher'));
}
if (defined("ENABLE_RSS") && ENABLE_RSS && !function_exists("xml_parse") && WARN_ABOUT_PHP_SETTINGS) {
Warn($GLOBALS['I18N']->get('You are trying to use RSS, but XML is not included in your PHP'));
}
if (ALLOW_ATTACHMENTS && WARN_ABOUT_PHP_SETTINGS && (!is_dir($GLOBALS["attachment_repository"]) || !is_writable($GLOBALS["attachment_repository"]))) {
if (ini_get("open_basedir")) {
Warn($GLOBALS['I18N']->get('open_basedir restrictions are in effect, which may be the cause of the next warning'));
}
Warn($GLOBALS['I18N']->get('The attachment repository does not exist or is not writable'));
}
if (MANUALLY_PROCESS_QUEUE && isSuperUser() && empty($_GET['pi']) && (!isset($_GET['page']) || $_GET['page'] != 'processqueue' && $_GET['page'] != 'messages' && $_GET['page'] != 'upgrade')) {
## avoid error on uninitialised DB
if (Sql_Table_exists($tables['message'])) {
$queued_count = Sql_Fetch_Row_Query(sprintf('select count(id) from %s where status in ("submitted","inprocess") and embargo < now()', $tables['message']));
if ($queued_count[0]) {
$link = PageLinkButton('processqueue', s('Process the queue'));
$link2 = PageLinkButton('messages&tab=active', s('View the queue'));
if ($link || $link2) {
print Info(sprintf(s('You have %s message(s) waiting to be sent'), $queued_count[0]) . '<br/>' . $link . ' ' . $link2);
}
}
}
}
}
# always allow access to the about page
if (isset($_GET['page']) && $_GET['page'] == 'about') {
开发者ID:bcantwell,项目名称:website,代码行数:31,代码来源:index.php
示例17: saveConfirmation
function saveConfirmation($reservationDetails)
{
try {
$reservaitonId = $reservationDetails->reservationData->userData->confirmation_id;
if (count($reservationDetails->roomNotAvailable) > 0) {
foreach ($reservationDetails->roomNotAvailable as $room) {
$this->setError($room->room_name . " is not available between " . $reservationDetails->reservationData->userData->start_date . " and " . $reservationDetails->reservationData->userData->end_date);
}
return -1;
}
$startDate = $reservationDetails->reservationData->userData->start_date;
$endDate = $reservationDetails->reservationData->userData->end_date;
$reservaitonId = $this->storeConfirmation($reservationDetails);
$this->deleteReservaitonRooms($reservaitonId);
foreach ($reservationDetails->rooms as $room) {
$confirmationRoomId = $this->storeConfirmationRooms($reservaitonId, $room);
$this->storeConfirmationRoomPrices($confirmationRoomId, $room, $startDate, $endDate);
}
$this->deleteReservaitonExtraOptions($reservaitonId);
if (isset($reservationDetails->reservationData->userData->extraOptionIds) && is_array($reservationDetails->reservationData->userData->extraOptionIds)) {
//dmp($reservationDetails->extraOptions);
foreach ($reservationDetails->reservationData->userData->extraOptionIds as $extraOptionId) {
$extraOption = $this->getExtraOption($reservationDetails->extraOptions, $extraOptionId);
$this->storeConfirmationExtraOptions($reservaitonId, $extraOption);
}
}
if (isset($reservationDetails->reservationData->userData->guestDetails)) {
$this->deleteGuestDetails($reservaitonId);
$this->storeConfirmationGuestDetails($reservaitonId, $reservationDetails->reservationData->userData->guestDetails);
}
if (isset($reservationDetails->reservationData->userData->excursions)) {
if (count($reservationDetails->excursions)) {
foreach ($reservationDetails->excursions as $excursion) {
$confirmationExcursionId = $this->storeConfirmationExcursions($reservaitonId, $excursion);
$this->storeConfirmationExcursionPrices($confirmationExcursionId, $excursion, $startDate, $endDate);
}
}
}
if (!isSuperUser(JFactory::getUser()->id)) {
$this->addUser($reservationDetails, $reservaitonId);
}
//exit;
} catch (Exception $ex) {
JError::raiseWarning(500, $ex->getMessage());
return false;
}
//exit;
return $reservaitonId;
}
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:49,代码来源:confirmation(original).php
示例18: prepareVariablesBuckaroo
function prepareVariablesBuckaroo()
{
//TODO - remove this - this is only to calculate exact amount
$this->Reservation_Details_EMail = $this->getReservationDetails($this, false);
$query = " \tSELECT *\r\n\t\tFROM #__hotelreservation_paymentprocessors\r\n\t\tWHERE is_available = 1 AND paymentprocessor_id = " . $this->payment_processor_sel_id . "\r\n\t\tORDER BY paymentprocessor_name\r\n\t\t";
$this->_db->setQuery($query);
$configuration =& $this->_db->loadObject();
if ($configuration->paymentprocessor_type == PROCESSOR_BUCKAROO) {
$buckaroo = new Buckaroo();
if ($configuration->paymentprocessor_mode == 'test') {
$buckaroo->setPaymentServerUrl($configuration->paymentprocessor_address_devel);
} else {
$buckaroo->setPaymentServerUrl($configuration->paymentprocessor_address);
}
$buckaroo->setMerchantId($configuration->paymentprocessor_username);
$buckaroo->setSecretKey($configuration->paymentprocessor_password);
//$buckaroo->addPaymentMeanBrand("IDEAL,VISA,MASTERCARD");
$buckaroo->setCurrencyCode('EUR');
$buckaroo->setNormalReturnUrl(JURI::base() . "index.php/component/jhotelreservation/buckarooresponse");
$buckaroo->setAmount(my_round($this->total_cost > 0 ? $this->total_cost : $this->total - $this->total_payed, 2));
$isSuperUser = isSuperUser(JFactory::getUser()->id);
//if(!$isSuperUser){
// $buckaroo->addRequestedService("iDEAL");
// $buckaroo->addRequestedService("transfer");
// $buckaroo->addRequestedService("Paypal");
// $buckaroo->addRequestedService("Mastercard");
// $buckaroo->addRequestedService("Visa");
// $buckaroo->addRequestedService("payperemail");
//}
//$buckaroo->setAditionalService("creditmanagement");
$buckaroo->setInvoiceNumber($this->getStringIDConfirmation());
$buckaroo->setCulture('nl-NL');
?>
<form target='_self' name='form_<?php
echo $configuration->paymentprocessor_type;
?>
' id= 'form_<?php
echo $configuration->paymentprocessor_type;
?>
' method='post' action='<?php
echo $buckaroo->getPaymentServerUrl();
?>
'>
<div class='div_redirect_paysite'>
<?php
echo JText::_('LNG_WAIT_TO_REDIRECT_PAY_SITE', true);
?>
</div>
<?php
echo $buckaroo->getHtmlFields();
?>
</form>
<script>
window.onload = function(){
//alert(document.forms['form_<?php
echo $configuration->paymentprocessor_type;
?>
']);
document.forms['form_<?php
echo $configuration->paymentprocessor_type;
?>
'].submit();
};
</script>
<?php
}
}
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:69,代码来源:variables.php
示例19: OnlineUser
$errorText .= "<LI>Your fax number is {$result}";
}
}
if (($result = validate($password, "password", 45, 6)) !== true) {
$errorText .= "<LI>Your password is {$result}";
}
if ($_POST["readTerms"] != "on") {
$errorText .= "<LI>Please read the terms and then tick the box to proceed";
}
if ($errorText == "") {
$query = $db->Query("SELECT * FROM onlineuser WHERE email='" . $db->Escape($email) . "' LIMIT 1");
if ($db->Rows() > 0) {
$errorText .= "<LI>The email address you have entered is taken";
} else {
$user = new OnlineUser($email, $first_name, $last_name, $password, $address1, $address2, $address3, $postcode, $telephone, $fax, '', 'temp');
if (isSuperUser(false) && $status != "") {
$user->user_status = $status;
}
$userId = $user->Save();
$user = $user->Get($userId);
$created = strtotime($user->dt_created);
$mail = new Emailer();
$mail->setTo($email);
$mail->setFrom($configuration["fromEmail"]);
$mail->setSubject("Fastfoodjobsuk Registration");
$url = "http://www.fastfoodjobsuk.co.uk/register_activate.php?email={$email}&code={$created}";
$mail->bodyAdd("Dear {$first_name} {$last_name}");
$mail->bodyAdd("");
$mail->bodyAdd("Thank you for registering with Fast Food Jobs but as we take your privacy seriously, we just wanted to check you did register with our site.");
$mail->bodyAdd("In order to gain access to all of the web site functionality please click on here: {$url}");
$mail->bodyAdd("");
开发者ID:BackupTheBerlios,项目名称:scrapbook,代码行数:31,代码来源:register.php
示例20: moveUser
} else {
print '-> ' . $GLOBALS['I18N']->get('unable to find original email');
}
}
function moveUser($userid)
{
global $tables;
$newlist = $_GET['list'];
Sql_Query(sprintf('delete from %s where userid = %d', $tables['listuser'], $userid));
Sql_Query(sprintf('insert into %s (userid,listid,entered) values(%d,%d,now())', $tables['listuser'], $userid, $newlist));
}
function addUniqID($userid)
{
Sql_query(sprintf('update %s set uniqid = "%s" where id = %d', $GLOBALS['tables']['user'], getUniqID(), $userid));
}
if ($require_login && !isSuperUser() || !$require_login || isSuperUser()) {
$action_result = '';
$access = accessLevel('reconcileusers');
switch ($access) {
case 'all':
if (isset($_GET['option']) && $_GET['option']) {
set_time_limit(600);
switch ($_GET['option']) {
case 'markallconfirmed':
$list = sprintf('%d', $_GET['list']);
if ($list == 0) {
$action_result .= $GLOBALS['I18N']->get('Marking all subscribers confirmed');
Sql_Query("update {$tables['user']} set confirmed = 1");
} else {
$action_result .= sprintf($GLOBALS['I18N']->get('Marking all subscribers on list %s confirmed'), ListName($list));
Sql_Query(sprintf('UPDATE %s, %s SET confirmed =1 WHERE %s.id = %s.userid AND %s.listid= %d', $tables['user'], $tables['listuser'], $tables['user'], $tables['listuser'], $tables['listuser'], $list));
开发者ID:gillima,项目名称:phplist3,代码行数:31,代码来源:reconcileusers.php
注:本文中的isSuperUser函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论