当前位置: 首页>>代码示例>>PHP>>正文


PHP url_redirect函数代码示例

本文整理汇总了PHP中url_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP url_redirect函数的具体用法?PHP url_redirect怎么用?PHP url_redirect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了url_redirect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: login

 public function login()
 {
     $mail = isset($_POST['user_mail']) ? $_POST['user_mail'] : '';
     $password = isset($_POST['user_password']) ? encript_password($_POST['user_password']) : '';
     $data = $this->model('LoginModel');
     $result = $data->login_users($this->tableUsers, $mail, $password);
     url_redirect($result);
 }
开发者ID:chokonet,项目名称:alejandrocervantes.me,代码行数:8,代码来源:LoginController.php

示例2: delete_user

 private function delete_user($id)
 {
     $data = $this->model('CategoriesModel');
     $result = $data->delete($id);
     if ($result) {
         $result = site_url() . 'admin/categorias/?exito=6';
         url_redirect($result);
     } else {
         $result = site_url() . 'admin/categorias/?code=2';
         url_redirect($result);
     }
 }
开发者ID:chokonet,项目名称:alejandrocervantes.me,代码行数:12,代码来源:CategoriesController.php

示例3: infoPost

 public function infoPost($post_id = '')
 {
     $data = $this->model('CategoriesModel');
     $data_p = $this->model('PostsModel');
     $post = $data_p->get_Post($post_id);
     if ($post != false) {
         $data_f = $this->model('PostsModel');
         $datos = array('categorias' => $data->All(), 'post' => $post, 'imagenes' => $data_f->AllImages());
         $this->vew('admin/post', $datos);
     } else {
         $result = site_url() . 'admin/posts/';
         url_redirect($result);
     }
 }
开发者ID:chokonet,项目名称:alejandrocervantes.me,代码行数:14,代码来源:AdminController.php

示例4: brokendownloadS

function brokendownloadS()
{
    global $downloadsprefix, $db, $anonymous, $userinfo;
    if (!is_user()) {
        url_redirect(getlink());
    }
    $lid = intval($_POST['lid']);
    $ratinguser = $userinfo['user_id'];
    $db->sql_query("insert into " . $downloadsprefix . "_modrequest values (NULL, {$lid}, 0, 0, '', '', '', '{$ratinguser}', 1, '{$auth_name}', '{$email}', '{$filesize}', '{$version}', '{$homepage}')");
    include "header.php";
    downl_menu_tpl(1);
    echo '<br />';
    OpenTable();
    echo "<br /><center>" . _THANKSFORINFO . "<br /><br />" . _LOOKTOREQUEST . "</center><br />";
    CloseTable();
    include "footer.php";
}
开发者ID:cbsistem,项目名称:nexos,代码行数:17,代码来源:index.php

示例5: check_max_deal_purchase

 //if payable amount is equal to zero then process the customer directly
 if ($_POST['amount'] == 0) {
     //check deal quantity availability
     require_once DOCUMENT_ROOT . "/system/includes/transaction.php";
     $L_QTY0 = $qty;
     $COUPONID = $couponid;
     $USERID = $_SESSION['userid'];
     check_max_deal_purchase($COUPONID, $_POST["friendname"], $_POST["friendemail"], $L_QTY0, $USERID);
     check_deal_quantity($COUPONID, $_POST["friendname"], $_POST["friendemail"], $L_QTY0);
     $USERID = $_SESSION['userid'];
     $_SESSION['pay_mod_id'] = $_POST['pay_mod_id'];
     if (!isset($_SESSION['pay_mod_id'])) {
         if ($_POST["friendname"] != '' && $_POST["friendemail"] != '') {
             url_redirect(DOCROOT . "purchase.html?cid=" . $COUPONID . "&type=gift");
         } else {
             url_redirect(DOCROOT . "purchase.html?cid=" . $COUPONID);
         }
     }
     $user = "SELECT * FROM coupons_users where userid='{$USERID}'";
     $userSet = mysql_query($user);
     while ($r = mysql_fetch_array($userSet)) {
         $FIRSTNAME = html_entity_decode($r['firstname'], ENT_QUOTES);
         $LASTNAME = html_entity_decode($r['lastname'], ENT_QUOTES);
         $EMAIL = html_entity_decode($r['email'], ENT_QUOTES);
     }
     $PAYERID = '';
     $TRANSACTIONID = '';
     $CORRELATIONID = '';
     $PAYERSTATUS = '';
     $COUNTRYCODE = '';
     $USERID = $uid = $_SESSION['userid'];
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:validate.php

示例6: set_response_mes

    if (!preg_match("/^(\\+){0,1}(\\d|\\s|\\(|\\)|\\-){5,20}\$/", $mobileno)) {
        set_response_mes(-1, $language['invalid_mobile_number']);
        url_redirect($_SERVER['REQUEST_URI']);
    }
    if (!empty($mobileno)) {
        $val = add_mobilesubscriber($mobileno, $city);
        if ($val) {
            set_response_mes(1, $language['subscribe_success']);
            url_redirect($_SERVER['REQUEST_URI']);
        } else {
            set_response_mes(-1, $language['mobile_exits']);
            url_redirect($_SERVER['REQUEST_URI']);
        }
    } else {
        set_response_mes(-1, $language['try_again']);
        url_redirect($_SERVER['REQUEST_URI']);
    }
}
//get the categpry list
$category_list = mysql_query("select * from coupons_cities where status='A' order by cityname");
?>

<div class="width240 fl clr borderF2F mb20">
<div class="great_deals">
            <div class="great_top fl clr">
            	<h1><?php 
echo $language['mobile_subscription'];
?>
</h1>
            </div>
          <div class="great_center fl clr">
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:sms_subscriber.php

示例7: EditShop

//checking whether admin logged in or not.
$userid = $_SESSION["userid"];
$shopid = $url_arr[3];
$obj = new EditShop();
$obj->editShopDetails($shopid);
if ($_POST) {
    $shopname = htmlentities($_POST['shopname'], ENT_QUOTES);
    $shopaddress = htmlentities($_POST['shopaddress'], ENT_QUOTES);
    $city = $_POST["city"];
    $country = $_POST['country'];
    $lat = htmlentities($_POST['lat'], ENT_QUOTES);
    $lang = htmlentities($_POST['lang'], ENT_QUOTES);
    $result = updateShop($shopid, $userid, $shopname, $shopaddress, $city, $country, $lat, $lang);
    $coopon_url = DOCROOT . "admin/view/rep/shops/";
    set_response_mes(1, $admin_language['changesmodified']);
    url_redirect($coopon_url);
}
?>

<script type="text/javascript">
/* validation */
$(document).ready(function(){ $("#form_editshop").validate();});
</script>

<div class="form">
<div class="form_top"></div>
      <div class="form_cent"> 

<form name="form_editshop" id="form_editshop" method="post" action="" class="coopen_form fl" > 
<fieldset>
开发者ID:AdoSalkic,项目名称:personal,代码行数:30,代码来源:editshopdetails.php

示例8: set_response_mes

            if ($pay_ack["ACK"] == "Failure") {
                //failure operation
                set_response_mes(-1, "Request Unapproved");
                url_redirect(DOCROOT . "system/modules/affiliate/admin/pay-affiliates.php");
            } else {
                $transaction_id = $pay_ack['TRANSACTIONID'];
                mysql_query("insert into aff_payments(aff_id,date,time,sales,commission,uid) values('{$uid}',NOW(),NOW(),'{$sales}','{$amount}','{$aid}') ");
                //Insert the payment details to db
                mysql_query("insert into aff_archived_sales(aff_id,uid,date,time,payment,payout,ip,order_number,merchant) values('{$uid}','{$aid}',NOW(),NOW(),'{$sales}','{$amount}','{$ip}','{$transaction_id}','paypal')");
                //insert payout sales details
                //mysql_query("delete from aff_sales where aff_id=$uid and `approved` = '2' LIMIT 1"); // delete the sales details after payout the amount
                // here send full amt to the aff user, so delete all the records from aff_sales
                mysql_query("delete from aff_sales where aff_id='{$uid}' and `approved` = '2' and  fund_requested='1' ");
                // delete the sales details after payout the amount
                set_response_mes(1, "Request Approved");
                url_redirect(DOCROOT . "system/modules/affiliate/admin/pay-affiliates.php");
            }
            //set the response and redirect it....
        }
    }
}
function masspay_request($subject = '', $receiver_mail = '', $currency_code = '', $payer_id = '', $amount = '', $unique_id = '', $note = '')
{
    /**
     * Get required parameters from the web form for the request
     */
    $emailSubject = urlencode($subject);
    $receiverType = urlencode($receiver_mail);
    $currency = urlencode($currency_code);
    $nvpstr = '';
    //$count= count($_POST['receiveremail']);
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:MassPayReceipt.php

示例9: mail

    $SMTP_STATUS = SMTP_STATUS;
    if ($SMTP_STATUS == 1) {
        include DOCUMENT_ROOT . "/system/modules/SMTP/smtp.php";
        //mail send thru smtp
    } else {
        // To send HTML mail, the Content-type header must be set
        $headers = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
        // Additional headers
        $headers .= 'From: ' . $from . '' . "\r\n";
        $headers .= 'Bcc: ' . $to . '' . "\r\n";
        mail($to, $subject, $message, $headers);
    }
    //send_email($email,$to,$subject,$mes); //call email function
    set_response_mes(1, $language['thank_you_for_enquiry']);
    url_redirect(DOCROOT . 'contactus.html');
}
?>

<div class="work_bottom contactus">
<form action="" name="contactus" id="contactus" method="post">
<table width="100%" border="0" cellpadding="5" cellspacing="5" class="contact_user">
<tr><td align="right" valign="top">
<label><?php 
echo $language["contact_name"];
?>
 :</label>
</td><td>
<input name="name" type="text" class="required nospecialchars" title="<?php 
echo $language['valid_name'];
?>
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:contactus.php

示例10: ucfirst

                                <div class="fl clr mt10 ">
                                        <span class="font14 color333"><?php 
        echo ucfirst(htmlspecialchars_decode($row["shopname"]));
        ?>
<br/></span>
                                        <?php 
        echo nl2br(html_entity_decode($row["shop_address"], ENT_QUOTES));
        ?>
<br/>
					<?php 
        echo nl2br(html_entity_decode($row["cityname"], ENT_QUOTES));
        ?>
<br/>
					<?php 
        echo nl2br(html_entity_decode($row["countryname"], ENT_QUOTES));
        ?>
<br/>
                                </div>
                                <div class="clr fl" style="width:400px;">
                                      
                                        
                                </div>
                        </div>
                </div>
               <?php 
    }
} else {
    set_response_mes(1, $language['cannot_print']);
    url_redirect(DOCROOT . "my-coupons.html");
}
die;
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:print-coupon.php

示例11: Variable

    }
}
if (isset($_POST['btnVarUpdate'])) {
    require_once CLASSES . 'variable.php';
    $var_id = $_POST['hidVarID'];
    $var_name = $_POST['txtVarName'];
    $var_value = $_POST['txtVarVal'];
    $variable = new Variable($var_id, 'edit');
    if ($variable->update_variable($var_name, $var_value)) {
        unset($_POST['btnVarUpdate']);
        url_redirect(HTTP_SERVER . 'index.php?variable=1');
    } else {
    }
}
if (isset($_POST['btnVarAdd'])) {
    require_once CLASSES . 'variable.php';
    $var_name = $_POST['txtVarName'];
    $var_value = $_POST['txtVarVal'];
    $variable = new Variable();
    if ($variable->add_variable($var_name, $var_value)) {
        unset($_POST['btnVarAdd']);
        url_redirect(HTTP_SERVER . 'index.php?variable=1');
    } else {
    }
}
if (isset($_POST['btnUploadImg'])) {
    print_r($_FILES);
    if (imageUpload($_FILES['upImage']['tmp_name'], UPLOAD_DIR . $_FILES['upImage']['name'], UPLOAD_DIR . 'thumb_' . $_FILES['upImage']['name'])) {
        echo 'About Upload';
    }
}
开发者ID:Satan1301,项目名称:phpoopcms,代码行数:31,代码来源:submit.php

示例12: notify_request

/**
 * Redirects the browser to a specified anchor on the index.php page that sent a form from a CMS section.
 * @param   string    $id         HTML element id
 * @param   boolean   $success    no errors to display
 * @param   string    $customErr  if $success is false, type here your own custom message  
 */
function notify_request($id, $success, $customErr = "")
{
    global $_displayType, $_notifyMsg;
    $errorMessage = $_notifyMsg["ERROR"];
    if (!$success && !empty($customErr)) {
        $errorMessage = $customErr;
    }
    $_SESSION[$id] = $success ? display_text($_displayType["SUCCESS"], $_notifyMsg["SAVED"]) : display_text($_displayType["ERROR"], $errorMessage);
    url_redirect(dirname($_SERVER['SCRIPT_NAME']) . "/#" . $id);
}
开发者ID:Simo22,项目名称:smt2,代码行数:16,代码来源:functions.php

示例13: url_redirect

<?php

if ($_SESSION["userid"]) {
    url_redirect(DOCROOT . "profile.html");
}
$url_array = explode('=', $_SERVER['REQUEST_URI']);
if (isset($url_array[1])) {
    $_SESSION['referral_id'] = $url_array[1];
}
?>


<ul>
<li><a href="/" title="<?php 
echo $language['home'];
?>
"><?php 
echo $language['home'];
?>
 </a></li>
<li><span class="right_arrow"></span></li>
<li><a href="javascript:;" title="<?php 
echo $language['signup'];
?>
"><?php 
echo $language['signup'];
?>
</a></li>    
</ul>
<h1><?php 
echo $page_title;
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:registration.php

示例14: mail

                    $headers = 'MIME-Version: 1.0' . "\r\n";
                    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
                    // Additional headers
                    $headers .= 'From: ' . $from . '' . "\r\n";
                    mail($to, $subject, $message, $headers);
                }
                set_response_mes(1, $language["password_changed"]);
                url_redirect(DOCROOT . "change-password.html");
            } else {
                set_response_mes(-1, $language["not_matched"]);
                url_redirect(DOCROOT . "change-password.html");
            }
        }
    } else {
        set_response_mes(-1, $language["not_matched"]);
        url_redirect(DOCROOT . "change-password.html");
    }
}
?>
	 

<?php 
include "profile_submenu.php";
?>
<h1><?php 
echo $page_title;
?>
</h1>


<div class="work_bottom ">
开发者ID:AdoSalkic,项目名称:personal,代码行数:31,代码来源:change-password.php

示例15: check_words

            if ($username == $badname[0]) {
                $error = _SHOUTUSERBAN;
            }
        }
        $db->sql_freeresult($nameresult);
    }
    //look for bad words, then censor them.
    if ($shoutconf['censor']) {
        $comment = check_words($comment);
    }
    //if error just reload page, else add posting.
    if ($error) {
        cpg_error($error);
    } else {
        $db->sql_query("INSERT INTO " . $prefix . "_shoutblock VALUES (NULL, '" . Fix_Quotes($username) . "', '" . Fix_Quotes($comment) . "', '" . gmtime() . "')");
        url_redirect($CPG_SESS['user']['uri']);
    }
}
function nav_shouts()
{
    global $prefix, $db, $offset, $number, $shoutconf, $userinfo;
    $offset = intval($offset);
    $result = $db->sql_query("SELECT * FROM " . $prefix . "_shoutblock ORDER BY id DESC LIMIT {$offset},25");
    $loop = $db->sql_numrows($result);
    while ($row = $db->sql_fetchrow($result)) {
        echo '<div class="content">';
        $row[2] = set_smilies($row[2]);
        echo '<a href="' . getlink('Your_Account&amp;profile=' . $row[1]) . '"><strong>' . $row[1] . ':</strong></a>';
        if ($shoutconf['date']) {
            echo formatDateTime($row[3], '%d-%b-%Y ');
        }
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:index.php


注:本文中的url_redirect函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。