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


PHP getpost函数代码示例

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


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

示例1: FormPost

 public function FormPost()
 {
     $out = array();
     $out["map"] = array();
     foreach (getpost() as $name => $value) {
         if (matches($name, "map")) {
             $map = json_decode(FormHelper::Decode($value));
             foreach ($map as $mapped) {
                 $parts = explode('|', $mapped);
                 if (contains($parts[0], '__')) {
                     $d = explode('__', $parts[0]);
                     if (!isset($out["map"][$d[0]])) {
                         $out["map"][$d[0]] = array();
                     }
                     $out["map"][$d[0]][$d[1]] = AJAX::fp($parts[1]);
                 } else {
                     $mapped[$parts[0]] = AJAX::fp($parts[1]);
                 }
             }
         } else {
             if (contains($name, '__')) {
                 $d = explode("__", $name);
                 if (!isset($out[$d[0]])) {
                     $out[$d[0]] = array();
                 }
                 $out[$d[0]][$d[1]] = base64_decode(urldecode($value));
             } else {
                 $out[$name] = FormHelper::Decode($value);
             }
         }
     }
     $out['signal'] = json_decode($out['signal'], true);
     return $out;
 }
开发者ID:h3rb,项目名称:page,代码行数:34,代码来源:AJAX.php

示例2: getpostdate

function getpostdate($dname)
{
    $minute = getpost($dname . '_minute') ? zeroleftpad((int) getpost($dname . '_minute'), 2) : '00';
    $hour = getpost($dname . '_hour') ? zeroleftpad((int) getpost($dname . '_hour'), 2) : '12';
    $day = getpost($dname . '_day') ? zeroleftpad((int) getpost($dname . '_day'), 2) : 1;
    $month = getpost($dname . '_month') ? zeroleftpad((int) getpost($dname . '_month'), 2) : 1;
    $year = getpost($dname . '_year') ? (int) getpost($dname . '_year') : date("Y");
    return "{$year}-{$month}-{$day} {$hour}:{$minute}";
}
开发者ID:techtronics,项目名称:theblackboxproject,代码行数:9,代码来源:lib-form.php

示例3: mkuser

         if (!$login[id]) {
             $login[user_name] = "Gast";
             $notifybox = " disabled";
         }
         $fail = $fail_thread;
         $actionsave = "save_thread";
         $schecked = " checked";
         $th_title = "Neues Thema";
         $user_name = mkuser("user_name", 0, $login);
         $smilies = getsmiliesbit("forum.smilies.bit");
         eval("\$incf[action] = \"" . gettemplate("forum.new.post") . "\";");
     }
 }
 ##########################
 if ($action == "editpost" || $fail_edit) {
     $post = getpost($postid);
     if ($post[aut_id] != $login[id] && !is_allowed($sec[forum][id], $boardid)) {
         eval("\$incf[action] = \"" . gettemplate("fail.access.noaccess") . "\";");
     } else {
         $notifybox = list($a) = $db->query("SELECT id FROM {$tab['forum_notify']} WHERE userid='{$post['aut_id']}' AND threadid='{$threadid}'") ? " checked" : " unchecked";
         if ($post[smilies]) {
             $schecked = " checked";
         }
         $fail = $fail_edit;
         $actionsave = "save_edit_thread";
         $th_title = "Post bearbeiten";
         $user_name = mkuser("user_name", $post[aut_id], $NULL);
         $form[title] = $post[post_title];
         $form[text] = $post[post_text];
         $smilies = getsmiliesbit("forum.smilies.bit");
         eval("\$incf[action] = \"" . gettemplate("forum.new.post") . "\";");
开发者ID:BackupTheBerlios,项目名称:swora,代码行数:31,代码来源:forum_thread.php

示例4: var_dump

<?php

include 'core/Page.php';
echo 'woot! ';
var_dump(getpost());
foreach (getpost() as $name => $value) {
    echo '<hr>' . $name . '<br>' . urldecode(base64_decode($value));
}
开发者ID:h3rb,项目名称:page,代码行数:8,代码来源:ajax_form.php

示例5: check


//.........这里部分代码省略.........
                $cfg['access_media'] = false;
                $cfg['access_popular'] = false;
                $cfg['access_favorite'] = false;
                $cfg['access_cover'] = false;
                $cfg['access_stream'] = false;
                $cfg['access_download'] = false;
                $cfg['access_playlist'] = false;
                $cfg['access_play'] = false;
                $cfg['access_add'] = false;
                $cfg['access_record'] = false;
                $cfg['access_statistics'] = false;
                $cfg['access_admin'] = false;
                return true;
            } else {
                $app->ll->str('böla');
                logoutSession();
            }
        }
        // Username & user privalages
        unset($cfg['username']);
        $query = mysql_query('SELECT
			username,
			access_media,
			access_popular,
			access_favorite,
			access_cover,
			access_stream,
			access_download,
			access_playlist,
			access_play,
			access_add,
			access_record,
			access_statistics,
			access_admin
			FROM user
			WHERE user_id = ' . (int) $user_id);
        $cfg += mysql_fetch_assoc($query);
        // Validate privilege
        $access_validated = false;
        if (is_array($access)) {
            foreach ($access as $value) {
                if (isset($cfg[$value]) && $cfg[$value]) {
                    $access_validated = true;
                }
            }
        } elseif (isset($cfg[$access]) && $cfg[$access]) {
            $access_validated = true;
        } elseif ($access == 'access_logged_in') {
            $access_validated = true;
        } elseif ($access == 'access_always') {
            $access_validated = true;
        }
        if ($access_validated == false) {
            message(__FILE__, __LINE__, 'warning', '[b]You have no privilege to access this page[/b][br][url=index.php?authenticate=logout][img]small_login.png[/img]Login as another user[/url]');
        }
        // Validate signature
        if ($cfg['sign_validated'] == false && ($validate_sign || $authenticate == 'logoutAllSessions' || $authenticate == 'logoutSession')) {
            $cfg['sign'] = randomKey();
            mysql_query('UPDATE session
				SET	sign		= "' . mysql_real_escape_string($cfg['sign']) . '"
				WHERE sid		= BINARY "' . mysql_real_escape_string($sid) . '"');
            if ($session['sign'] == getpost('sign')) {
                $cfg['sign_validated'] = true;
            } else {
                message(__FILE__, __LINE__, 'error', '[b]Signature expired[/b]');
            }
        } else {
            $cfg['sign'] = $session['sign'];
        }
        // Logout
        if ($authenticate == 'logout' && $cfg['username'] != $cfg['anonymous_user']) {
            $query = mysql_query('SELECT user_id FROM session
				WHERE logged_in
				AND user_id		= ' . (int) $user_id . '
				AND idle_time	> ' . (int) (time() - $cfg['session_lifetime']));
            if (mysql_affected_rows($db) > 1) {
                logoutMenu();
            } else {
                logoutSession();
            }
        } elseif ($authenticate == 'logoutAllSessions' && $cfg['username'] != $cfg['anonymous_user']) {
            mysql_query('UPDATE session
				SET logged_in	= 0
				WHERE user_id	= ' . (int) $user_id);
            logoutSession();
        } elseif ($authenticate == 'logoutSession' || $authenticate == 'logout') {
            logoutSession();
        }
        $cfg['user_id'] = $user_id;
        $cfg['sid'] = $sid;
        $cfg['session_seed'] = $session['seed'];
        $cfg['random_blacklist'] = $session['random_blacklist'];
        //$cfg['thumbnail']			= $session['thumbnail'];
        $cfg['thumbnail'] = 1;
        //$cfg['thumbnail_size']		= $session['thumbnail_size'];
        $cfg['thumbnail_size'] = 100;
        $cfg['stream_id'] = isset($cfg['encode_extension'][$session['stream_id']]) ? $session['stream_id'] : -1;
        $cfg['download_id'] = isset($cfg['encode_extension'][$session['download_id']]) ? $session['download_id'] : -1;
        $cfg['player_id'] = $session['player_id'];
    }
开发者ID:daskleinesys,项目名称:slimpd,代码行数:101,代码来源:Authentication.php

示例6: display_post

function display_post($userdata, $datetype, $postdate, $cmds, $posttext)
{
    global $powerlevels;
    $author = userlink_big($userdata[userid], htmlspecialchars($userdata[username]), $userdata[powerlevel]);
    $postdate = parsedate($postdate);
    $joindate = parsedate_short($userdata[joindate]);
    $sig = '';
    if ($userdata['signature'] != '') {
        $sig = '<hr>';
        $sig .= getpost($userdata['signature'], true, true, false);
    }
    $avatar = '';
    if ($userdata['hasavatar'] == 1) {
        $avatar = "<img src='avatars/{$userdata['userid']}.{$userdata['avatarext']}' alt='Avatar'><br>";
    }
    $utitle = htmlspecialchars($userdata[usertitle]);
    print "<table class='post' width='100%'>";
    print "<tr>";
    print "<td rowspan='2' valign='top' class='postsidebar'>";
    print "<b>{$author}</b>";
    if ($utitle) {
        print "<div class='smallspacing'></div>{$utitle}";
    }
    if ($avatar) {
        print "<div class='bigspacing'></div>";
        print "{$avatar}";
    }
    print "<div class='bigspacing'></div>";
    print "<span class='label'>Posts:</span> {$userdata['posts']}<br>";
    print "<span class='label'>Joined:</span> {$joindate}<br>";
    if ($userdata[powerlevel] > 5) {
        print "<span class='label'>Rank:</span> {$powerlevels[$userdata[powerlevel]]}<br>";
    }
    $replink = replink($userdata[userid], $userdata[reputation]);
    print "<span class='label'>Reputation:</span> {$replink}<br>";
    // custom postbit fields go here
    print "</td>";
    print "<td class='postdate' height='1'>{$datetype} {$postdate}{$cmds}</td>";
    print "</tr>";
    print "<tr><td valign='top' class='postcontent'>{$posttext}{$sig}</td></tr>";
    print "</table>";
}
开发者ID:Treeki,项目名称:historical-tboard,代码行数:42,代码来源:function.php

示例7: dol_syslog

            dol_syslog("gestimmo::site::card error=" . $agf->error, LOG_ERR);
            $mesg = '<div class="error">' . $agf->error . '</div>';
        }
    }
}
/*
 * Action create (fiche bien immo)
*/
if ($action == 'create_confirm') {
    if (!$_POST["cancel"]) {
        $agf = new Mandat($db);
        $agf->ref_interne = GETPOST('ref', 'alpha');
        $agf->fk_soc = "1";
        $agf->fk_biens = "0";
        $agf->descriptif = GETPOST('descriptif', 'alpha');
        $agf->entity = getpost('entity');
        $agf->datec = $now;
        $agf->date_contrat = $now;
        $agf->date_creation = $now;
        $agf->date_cloture = $now;
        $agf->status = "1";
        $agf->mise_en_service = $now;
        $agf->fin_validite = $now;
        $agf->fk_bails = '0';
        $agf->fk_commercial = '1';
        $agf->fk_user_author = $user;
        $agf->fk_user_mod = '1';
        $agf->fk_user_author = '1';
        $result = $agf->create($user);
        if ($result > 0) {
            if ($url_return) {
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:fiche.php

示例8: tohtml

function tohtml($id)
{
    $tmstart = rticktime();
    $x = getpost($id);
    $tmtime = number_format(rticktime() - $tmstart, 3);
    $starttime = rticktime();
    header("HTTP/1.0 200 Ok");
    $y = json_decode($x);
    // -- make groups list
    $ga = $y->subscribers;
    $ga_cnt = sizeof($ga);
    $ga_out = array();
    for ($i = 0; $i < $ga_cnt; $i++) {
        if ($ga[$i]->type == "group") {
            $ga_out[$ga[$i]->id] = $ga[$i]->username;
        }
    }
    $groups = array();
    foreach ($y->subscriptions as $g) {
        if (isset($ga_out[$g->user])) {
            $groups[$g->id] = $ga_out[$g->user];
        }
    }
    // end make groups list
    //body
    if (!isset($y->posts->body)) {
        print "html warn: " . htmlspecialchars($id) . "\n";
    }
    $text = $y->posts->body;
    //preg_match('/^(.*){1,10}/U',$text,$result1)
    mb_internal_encoding("UTF-8");
    $title = mb_substr($text, 0, 50);
    //time
    $time = $y->posts->createdAt;
    $time_html = htmlspecialchars(date("d.m.y H:i", ($time + 0) / 1000)) . "\n";
    // check groups
    //   $ghtml="<b>";
    $ghtml = "";
    $ps_cnt = sizeof($y->posts->postedTo);
    if ($ps_cnt > 1) {
        $ghtml .= "+";
    }
    for ($j = 0; $j < $ps_cnt; $j++) {
        $xz = $y->posts->postedTo[$j];
        if (isset($groups[$xz])) {
            $ghtml .= htmlspecialchars($groups[$xz]) . ":";
        }
    }
    //   $ghtml.="</b>";
    // users
    $usersarr = $y->users;
    $userasize = sizeof($usersarr);
    $users = array();
    $usracs = array();
    if ($userasize != 0) {
        for ($i = 0; $i < $userasize; $i++) {
            $users[$usersarr[$i]->id] = $usersarr[$i]->username;
            $usracs[$usersarr[$i]->id] = $usersarr[$i]->isPrivate;
        }
    }
    //author
    $auser = $y->posts->createdBy;
    $mmname = $users[$auser];
    $auname = "<b>" . htmlspecialchars($ghtml) . htmlspecialchars($mmname) . "</b>";
    $time_html = $auname . ' / ' . $time_html;
    //likes
    $likes_html = '';
    if (isset($y->posts->likes)) {
        $likesarr = $y->posts->likes;
    } else {
        $likesarr = array();
    }
    $likesasize = sizeof($likesarr);
    if ($likesasize != 0) {
        for ($i = 0; $i < $likesasize; $i++) {
            $likes_html .= htmlspecialchars($users[$likesarr[$i]]) . ", ";
        }
        $likes_html = "<p>Likes: " . $likes_html . "</p>\n";
    }
    //attach
    $attach_html = '';
    if (isset($y->attachments)) {
        $attacharr = $y->attachments;
    } else {
        $attacharr = array();
    }
    $attachasize = sizeof($attacharr);
    if ($attachasize != 0) {
        for ($i = 0; $i < $attachasize; $i++) {
            if ($attacharr[$i]->mediaType != "image") {
                $attach_html .= "<a href=\"" . htmlspecialchars($attacharr[$i]->url) . "\">" . htmlspecialchars($attacharr[$i]->fileName) . "</a><br>\n";
            } else {
                $attach_html .= "<img src=\"" . htmlspecialchars($attacharr[$i]->thumbnailUrl) . "\"><br>\n";
            }
        }
    }
    //comments
    if (isset($y->posts->comments)) {
        $commntarr = $y->posts->comments;
    } else {
//.........这里部分代码省略.........
开发者ID:xartreal,项目名称:frf-htmlizer,代码行数:101,代码来源:index.php

示例9: current_page_url

$auth = NULL;
global $session;
$session = NULL;
global $user;
$user = NULL;
global $domain;
$domain = NULL;
global $expired;
$expired = false;
global $pageurl;
$pageurl = current_page_url();
global $is_logged_in;
$is_logged_in = false;
if (!defined('quiet_auth')) {
    $domain = explode("/", str_replace("http://", "", $pageurl));
    $domain = $domain[0];
}
if (!defined('suppress_auth')) {
    $session_model->Active();
    plog('$auth: ' . vars($auth));
    plog('$session: ' . vars($session));
}
global $plog_level;
if ($plog_level == 1) {
    plog('##### $pageurl: ' . vars($pageurl));
    if (isset($_SERVER['HTTP_REFERRER'])) {
        plog('Referred: ' . $_SERVER['HTTP_REFERRER']);
    }
    plog('getpost():------' . vars(getpost()));
}
plog('----Executing: ' . vars($pageurl));
开发者ID:h3rb,项目名称:page,代码行数:31,代码来源:Auth.php

示例10: imageUpdate

function imageUpdate($flag)
{
    global $cfg, $db;
    authenticate('access_admin');
    $size = get('size');
    $artistSearch = post('artist');
    $albumSearch = post('album');
    $image_service_id = (int) post('image_service_id');
    if (in_array($size, array('50', '100', '200'))) {
        mysql_query('UPDATE session
			SET thumbnail_size	= ' . (int) $size . '
			WHERE sid			= BINARY "' . mysql_real_escape_string($cfg['sid']) . '"');
    } else {
        $size = $cfg['thumbnail_size'];
    }
    if (isset($cfg['image_service_name'][$image_service_id]) == false) {
        message(__FILE__, __LINE__, 'error', '[b]Unsupported input value for[/b][br]image_service_id');
    }
    // flag 0 = No image
    // flag 1 = Skipped
    // flag 2 = Skipped not updated in this run
    // flag 3 = Stored image
    // flag 9 = Update one image by album_id, Needed for redirect to saveImage() (store as flag 1 or 3 in database)
    if ($flag == 2) {
        mysql_query('UPDATE bitmap SET flag = 2 WHERE flag = 1');
        $flag = 1;
    }
    if ($flag == 1) {
        $query = mysql_query('SELECT album.artist, album.album, album.album_id
			FROM album, bitmap
			WHERE bitmap.flag = 2
			AND bitmap.album_id = album.album_id
			ORDER BY album.artist_alphabetic, album.album');
    } elseif ($flag == 0) {
        $query = mysql_query('SELECT album.artist, album.album, album.album_id
			FROM album, bitmap
			WHERE bitmap.flag = 0
			AND bitmap.album_id = album.album_id
			ORDER BY album.artist_alphabetic, album.album');
    } elseif ($flag == 9 && $cfg['album_update_image']) {
        $album_id = getpost('album_id');
        $query = mysql_query('SELECT album.artist, album.artist_alphabetic, album.album, album.image_id, album.album_id,
			bitmap.flag, bitmap.image_front_width, bitmap.image_front_height
			FROM album, bitmap
			WHERE album.album_id = "' . mysql_real_escape_string($album_id) . '"
			AND bitmap.album_id = album.album_id');
    } else {
        message(__FILE__, __LINE__, 'error', '[b]Error internet image update[/b][br]Unsupported flag set');
    }
    $album = mysql_fetch_assoc($query);
    if ($album == '') {
        header('Location: ' . NJB_HOME_URL . 'config.php');
        exit;
    }
    if ($artistSearch == '' && $albumSearch == '') {
        // Remove (...) [...] {...} from the end
        $artistSearch = preg_replace('#^(.+?)(?:\\s*\\(.+\\)|\\s*\\[.+\\]|\\s*{.+})?$#', '$1', $album['artist']);
        $albumSearch = preg_replace('#^(.+?)(?:\\s*\\(.+\\)|\\s*\\[.+\\]|\\s*{.+})?$#', '$1', $album['album']);
    }
    $responce_url = array();
    $responce_pixels = array();
    $responce_resolution = array();
    $responce_squire = array();
    $url = $cfg['image_service_url'][$image_service_id];
    $url = str_replace('%artist', rawurlencode(iconv(NJB_DEFAULT_CHARSET, $cfg['image_service_charset'][$image_service_id], $artistSearch)), $url);
    $url = str_replace('%album', rawurlencode(iconv(NJB_DEFAULT_CHARSET, $cfg['image_service_charset'][$image_service_id], $albumSearch)), $url);
    if ($cfg['image_service_process'][$image_service_id] == 'amazon') {
        // Amazon web services
        if (function_exists('hash_hmac') == false) {
            message(__FILE__, __LINE__, 'error', '[b]Missing hash_hmac function[/b][br]For the Amazone Web Service the hash_hmac function is required.');
        }
        $url = str_replace('%awsaccesskeyid', rawurlencode($cfg['image_AWSAccessKeyId']), $url);
        $url = str_replace('%associatetag', rawurlencode($cfg['image_AWSAssociateTag']), $url);
        $url = str_replace('%timestamp', rawurlencode(gmdate('Y-m-d\\TH:i:s\\Z')), $url);
        $url_array = parse_url($url);
        // Sort on query key
        $query = $url_array['query'];
        $query = explode('&', $query);
        sort($query);
        $query = implode('&', $query);
        $signature = 'GET' . "\n";
        $signature .= $url_array['host'] . "\n";
        $signature .= $url_array['path'] . "\n";
        $signature .= $query;
        $signature = rawurlencode(base64_encode(hash_hmac('sha256', $signature, $cfg['image_AWSSecretAccessKey'], true)));
        // $url = $url_array['scheme'] . '://' . $url_array['host'] . $url_array['path'] . '?' . $query;
        $url .= '&Signature=' . $signature;
        $xml = @simplexml_load_file($url) or message(__FILE__, __LINE__, 'error', '[b]Failed to open XML file:[/b][br]' . $url);
        foreach ($xml->Items->Item as $item) {
            if (@$item->LargeImage->URL && @$item->LargeImage->Width && @$item->LargeImage->Height) {
                $responce_url[] = $item->LargeImage->URL;
                $responce_pixels[] = $item->LargeImage->Width * $item->LargeImage->Height;
                $responce_resolution[] = $item->LargeImage->Width . ' x ' . $item->LargeImage->Height;
                $responce_squire[] = $item->LargeImage->Width / $item->LargeImage->Height > 0.95 && $item->LargeImage->Width / $item->LargeImage->Height < 1.05 ? true : false;
            }
        }
    } elseif ($cfg['image_service_process'][$image_service_id] == 'lastfm') {
        // Last.fm web services
        $url = str_replace('%api_key', rawurlencode($cfg['image_lastfm_api_key']), $url);
        $xml = @simplexml_load_file($url) or message(__FILE__, __LINE__, 'error', '[b]Failed to open XML file:[/b][br]' . $url);
//.........这里部分代码省略.........
开发者ID:jdeblese,项目名称:ompd-mod,代码行数:101,代码来源:update.php

示例11: saveFavorite

function saveFavorite($favorite_id)
{
    global $db;
    authenticate('access_admin', false, true, true);
    $name = getpost('name');
    $comment = getpost('comment');
    mysql_query('UPDATE favorite SET
		name	= "' . mysql_real_escape_string($name) . '",
		comment	= "' . mysql_real_escape_string($comment) . '"
		WHERE favorite_id = ' . (int) $favorite_id);
    home();
}
开发者ID:jdeblese,项目名称:ompd-mod,代码行数:12,代码来源:favorite.php

示例12: page_input

 function page_input($keys)
 {
     if (!is_array($keys)) {
         $keys = func_get_args();
     }
     global $getpost;
     if (!isset($getpost) || !is_array($getpost)) {
         $getpost = getpost();
     }
     plog('page_input:getpost(): ' . vars($getpost));
     plog('page_input:checked against required input parameters ' . vars($keys));
     foreach ($keys as $numbered => $v) {
         if (!isset($getpost[$v])) {
             return FALSE;
         }
     }
     plog('page_input:PASSED');
     return $getpost;
 }
开发者ID:h3rb,项目名称:page,代码行数:19,代码来源:utility.php

示例13: getpost

//  |                                                                        |
//  | 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, see <http://www.gnu.org/licenses/>.  |
//  +------------------------------------------------------------------------+
//  +------------------------------------------------------------------------+
//  | users.php                                                              |
//  +------------------------------------------------------------------------+
require_once 'include/initialize.inc.php';
$cfg['menu'] = 'config';
$action = getpost('action');
$user_id = getpost('user_id');
if ($action == '') {
    home();
} elseif ($action == 'editUser') {
    editUser($user_id);
} elseif ($action == 'updateUser') {
    updateUser($user_id);
    home();
} elseif ($action == 'deleteUser') {
    deleteUser($user_id);
    home();
} elseif ($action == 'online') {
    online();
} elseif ($action == 'resetSessions') {
    resetSessions();
    online();
开发者ID:jdeblese,项目名称:ompd-mod,代码行数:31,代码来源:users.php

示例14: Bails

     $gestimmo = new Bails($db);
     // Pour rensegner les valeurs du bails
     $staticmandat = new Mandat($db);
     $idmandat = GETPOST('fk_mandat');
     $staticresult = $staticmandat->fetch($idmandat);
     //  print $staticmandat->id;
     // todo champs pour la creation du bail
     $gestimmo->fk_prop = $staticmandat->fk_soc;
     $gestimmo->fk_loc = GETPOST('fk_loc', 'int');
     $gestimmo->fk_logement = $staticmandat->fk_biens;
     $gestimmo->fk_mandat = GETPOST('fk_mandat', 'int');
     $gestimmo->Type = GETPOST('Type', 'alpha');
     $gestimmo->Date_location = GETPOST('Date_location', 'alpha');
     $gestimmo->Depot_garantie = GETPOST('Depot_garantie', 'alpha');
     $gestimmo->date_fin = GETPOST('date_fin', 'alpha');
     $gestimmo->entity = getpost('entity');
     $result = $gestimmo->create($user);
     if ($result > 0) {
         if ($url_return) {
             Header("Location: " . $url_return);
         } else {
             Header("Location: " . $_SERVER['PHP_SELF'] . "?action=edit&id=" . $result);
         }
         exit;
     } else {
         dol_syslog("gestimmo::bails::card error=" . $gestimmo->error, LOG_ERR);
         $mesg = '<div class="error">' . $gestimmo->error . '</div>';
     }
 } else {
     Header("Location: list.php");
     exit;
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:fiche.php

示例15: elseif

//  | Head & Body                                                            |
//  +------------------------------------------------------------------------+
$header['title'] = 'O!MPD &bull; ';
if (NJB_SCRIPT == 'message.php') {
    $header['title'] .= 'Message';
} elseif ($cfg['username'] == '') {
    $header['title'] .= 'Live @ ' . html($_SERVER['HTTP_HOST']);
} elseif (NJB_SCRIPT == 'playlist.php') {
    $header['title'] .= 'Now playing';
} elseif (get('authenticate') == 'logout') {
    $header['title'] .= 'Logout';
} elseif (get('authenticate') == 'logoutSession' && get('sign')) {
    $header['title'] .= 'Signed (Logout session)';
} elseif (get('authenticate') == 'logoutAllSessions' && get('sign')) {
    $header['title'] .= 'Signed (Logout all sessions)';
} elseif (getpost('sign')) {
    $header['title'] .= 'Signed (' . html(implode(' - ', $nav['name'])) . ')';
} elseif (empty($nav['name'])) {
    $header['title'] .= 'Undefined';
} else {
    $header['title'] .= html(implode(' - ', $nav['name']));
}
$header['head'] = "\t" . '<meta http-equiv="Content-Type" content="text/html; charset=' . html(NJB_DEFAULT_CHARSET) . '">' . "\n";
$header['head'] .= "\t" . '<meta name="generator" content="netjukebox, Copyright (C) 2001-2012 Willem Bartels; O!MPD, Copyright (C) 2015 Artur Sierzant">' . "\n";
$header['head'] .= "\t" . '<title>' . $header['title'] . '</title>' . "\n";
if (isset($cfg['access_media']) && $cfg['access_media']) {
    $header['head'] .= "\t" . '<link rel="search" type="application/opensearchdescription+xml" title="O!MPD - Album Artist" href="' . NJB_HOME_URL . 'opensearch.php?action=installAlbumArtist">' . "\n";
    $header['head'] .= "\t" . '<link rel="search" type="application/opensearchdescription+xml" title="O!MPD - Track Artist" href="' . NJB_HOME_URL . 'opensearch.php?action=installTrackArtist">' . "\n";
    $header['head'] .= "\t" . '<link rel="search" type="application/opensearchdescription+xml" title="O!MPD - Title" href="' . NJB_HOME_URL . 'opensearch.php?action=installTrackTitle">' . "\n";
}
$header['head'] .= "\t" . '<link rel="shortcut icon" type="image/png" href="image/o_lg.png">' . "\n";
开发者ID:jdeblese,项目名称:ompd-mod,代码行数:31,代码来源:header.inc.php


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