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


PHP getLink函数代码示例

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


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

示例1: DeleteUpfile

function DeleteUpfile($R, $d)
{
    global $g, $table;
    $UPFILES = getArrayString($R['upload']);
    foreach ($UPFILES['data'] as $_val) {
        $U = getUidData($table['s_upload'], $_val);
        if ($U['uid']) {
            if ($U['url'] == $d['comment']['ftp_urlpath']) {
                $FTP_CONNECT = ftp_connect($d['comment']['ftp_host'], $d['comment']['ftp_port']);
                $FTP_CRESULT = ftp_login($FTP_CONNECT, $d['comment']['ftp_user'], $d['comment']['ftp_pass']);
                if ($d['comment']['ftp_pasv']) {
                    ftp_pasv($FTP_CONNECT, true);
                }
                if (!$FTP_CONNECT) {
                    getLink('', '', 'FTP서버 연결에 문제가 발생했습니다.', '');
                }
                if (!$FTP_CRESULT) {
                    getLink('', '', 'FTP서버 아이디나 패스워드가 일치하지 않습니다.', '');
                }
                ftp_delete($FTP_CONNECT, $d['comment']['ftp_folder'] . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    ftp_delete($FTP_CONNECT, $d['comment']['ftp_folder'] . $U['folder'] . '/' . $U['thumbname']);
                }
                ftp_close($FTP_CONNECT);
            } else {
                unlink($U['url'] . $U['folder'] . '/' . $U['tmpname']);
                if ($U['type'] == 2) {
                    unlink($U['url'] . $U['folder'] . '/' . $U['thumbname']);
                }
            }
            getDbDelete($table['s_upload'], 'uid=' . $U['uid']);
        }
    }
}
开发者ID:kieregh,项目名称:test_comment,代码行数:34,代码来源:action.func.php

示例2: authenticate

function authenticate($force = 0)
{
    global $template;
    global $controller;
    global $action;
    $loggedin = 0;
    if (!empty($_SESSION['email']) && !empty($_SESSION['password'])) {
        $sql = "select id,name,points from users where email = '" . escape($_SESSION['email']) . "' and password = '" . escape($_SESSION['password']) . "'";
        $query = mysql_query($sql);
        $user = mysql_fetch_array($query);
        if ($user['id'] > 0) {
            $_SESSION['points'] = $user['points'];
            $_SESSION['name'] = $user['name'];
            $loggedin = 1;
        }
    }
    if (($force == 1 || ALLOW_VISITORS == 0) && $loggedin == 0 && ($controller != 'users' && ($action != 'validate' || $action != 'create' || $action != 'register'))) {
        $template->overrideController('users');
        $template->overrideAction('login');
        $template->set('link', getLink());
        $controller = "users";
        $action = "login";
    }
    if ($loggedin == 0) {
        $_SESSION['userid'] = '';
    }
}
开发者ID:jerome42,项目名称:Qwench,代码行数:27,代码来源:shared.php

示例3: f_includes

	function f_includes(&$text){

        $phrase = 'ФАЙЛ';

		if (mb_strpos($text, $phrase) === false){
			return true;
		}

 		$regex = '/{('.$phrase.'=)\s*(.*?)}/i';
		$matches = array();
		preg_match_all( $regex, $text, $matches, PREG_SET_ORDER );
		foreach ($matches as $elm) {
			$elm[0] = str_replace('{', '', $elm[0]);
			$elm[0] = str_replace('}', '', $elm[0]);
			mb_parse_str( $elm[0], $args );
			$file=@$args[$phrase];
			if ($file){
				$output = getLink($file);
			} else { $output = ''; }
			$text = str_replace('{'.$phrase.'='.$file.'}', $output, $text );
		}

		return true;

	}
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:25,代码来源:filter.php

示例4: getBasicFileInfoForm

 function getBasicFileInfoForm(&$aInfo, $sUrlPref = '')
 {
     $aForm = parent::getBasicFileInfoForm($aInfo, $sUrlPref);
     if (!empty($aInfo['albumCaption']) && !empty($aInfo['albumUri'])) {
         $aForm['album'] = array('type' => 'value', 'value' => getLink($aInfo['albumCaption'], $sUrlPref . 'browse/album/' . $aInfo['albumUri'] . '/owner/' . getUsername($aInfo['medProfId'])), 'caption' => _t('_bx_files_album'));
     }
     return $aForm;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:8,代码来源:BxFilesTemplate.php

示例5: showLinks

function showLinks($count = 5)
{
    $ids = array();
    $id = -1;
    for ($i = 0; $i < $count; $i++) {
        echo "<tr bgcolor='#ffffff'><td height=40 align=center>" . getLink($count, $ids, $id) . "</td></tr>\n";
        $ids[] = $id;
    }
}
开发者ID:nldfr219,项目名称:zhi,代码行数:9,代码来源:link.php

示例6: sendTokenChange

function sendTokenChange($email, $username, $old_email)
{
    require_once MODELES . 'membres/token.php';
    if ($token = generateToken($email, $username, $old_email)) {
        $tokenlink = 'http://' . $_SERVER['HTTP_HOST'] . getLink(['membres', 'confirm', $token]);
    } else {
        return False;
    }
    if (mail($email, 'Confirmer votre nouvelle adresse e-mail', "Bonjour !\n" . "Merci de cliquer sur le lien ci-dessous pour confirmer votre nouvelle adresse e-mail :\n" . $tokenlink . "\n" . "Si le lien ne fonctionne pas, copiez-collez l'adresse dans votre navigateur.\n\n" . "Merci et à bientôt !\n" . "-- L'équipe EventEase", 'From: no-reply@eventease.com')) {
        return True;
    } else {
        return False;
    }
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:14,代码来源:sendToken.php

示例7: convertListOfPostInfoIntoBreadcrumbs

function convertListOfPostInfoIntoBreadcrumbs($listOfPostInfo)
{
    $breadcrumbHtml = '';
    $listOfPostInfo = array_reverse($listOfPostInfo);
    $postTreeDepth = count($listOfPostInfo);
    for ($i = 0; $i < $postTreeDepth; $i++) {
        if ($postTreeDepth - 1 == $i) {
            $breadcrumbHtml .= $listOfPostInfo[$i]->getPostTitle();
        } else {
            $breadcrumbHtml .= getLink($listOfPostInfo[$i]->getPostId(), $listOfPostInfo[$i]->getPostTitle());
        }
        unset($listOfPostInfo[$i]);
    }
    return $breadcrumbHtml;
}
开发者ID:jacko5,项目名称:bjj,代码行数:15,代码来源:SBController.php

示例8: output_full

 /**
  * The default response method, outputs a full page. 
  */
 private function output_full()
 {
     if ($this->doRedirect()) {
         header("Location: http://{$_SERVER['SERVER_NAME']}" . getLink($this->controller->redirect));
     }
     try {
         $out = TemplateEngine::renderPage("{$this->model}/{$this->command}", array('result' => $this->result, 'errors' => $this->controller->errors));
     } catch (Exception $e) {
         $this->exception = $e;
     }
     if ($this->exception) {
         $out = TemplateEngine::renderPage("error", array('result' => $this->exception));
     }
     return $out;
 }
开发者ID:acquiescence,项目名称:rabidcore,代码行数:18,代码来源:Router.php

示例9: get_app_path

function get_app_path()
{
    global $runtime;
    $path = array();
    array_push($path, getLink($runtime['controller'], $runtime['controller']));
    if ($runtime['action'] != 'index') {
        if ($runtime['action'] == 'all') {
            $runtime['action'] = 'list';
        }
        // grr
        array_push($path, $runtime['action']);
    }
    if (!is_null($runtime['ident'])) {
        array_push($path, $runtime['ident']);
    }
    return $path;
}
开发者ID:stas,项目名称:eduroam-db,代码行数:17,代码来源:app-path-helpers.php

示例10: output_full

 /**
  * The default response method, outputs a full page. 
  */
 private function output_full()
 {
     if ($this->doRedirect()) {
         header("Location: http://{$_SERVER['SERVER_NAME']}" . getLink($this->controller->redirect));
         //Just in case something goes horribly wrong, we'll add this fallback:
         echo "You should have been redirected <a href=\"" . getLink($this->controller->redirect) . "\">here</a>.";
         return;
     }
     try {
         $out = PageEngine::renderPage("{$this->model}/{$this->command}", array('result' => $this->result, 'errors' => $this->controller->errors));
     } catch (Exception $e) {
         $this->exception = $e;
     }
     if ($this->exception) {
         $out = PageEngine::renderPage("error", array('result' => $this->exception));
     }
     return $out;
 }
开发者ID:asteig,项目名称:rabidcore,代码行数:21,代码来源:Router.php

示例11: checkAdmin

function checkAdmin()
{
    if (connected() && $_SESSION['niveau'] == 3) {
        return True;
    } else {
        if (connected()) {
            alert('error', 'Vous n\'avez pas l\'accréditation suffisante pour accéder à cette page !');
            header('Location: ' . getLink(['accueil', 'index']));
            return False;
            exit;
        } else {
            alert('error', 'Connectez-vous avec un statut d\'administrateur');
            header('Location: ' . getLink(['membres', 'connexion']));
            return False;
            exit;
        }
    }
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:18,代码来源:checkAdmin.php

示例12: showMessage

function showMessage($message, $url = "?", $status = "success", $id = 0)
{
    //If it is an ajax request, just print the data
    if (isset($_REQUEST['ajax'])) {
        $success = '';
        $error = '';
        $insert_id = '';
        if ($status == 'success') {
            $success = addslashes($message);
        }
        if ($status == 'error') {
            $error = $message;
        }
        if ($id) {
            $insert_id = ',"id":' . $id;
        }
        print '{"success":"' . $success . '","error":"' . $error . '"' . $insert_id . '}';
    } else {
        $url = str_replace('&amp;', '&', getLink($url, array($status => $message), true));
        header("Location:{$url}");
    }
    exit;
}
开发者ID:Gninety,项目名称:Microweber,代码行数:23,代码来源:custom.php

示例13: getLink

<?php

if (!defined('__KIMS__')) {
    exit;
}
include_once $g['path_module'] . $m . '/var/var.php';
if ($cync) {
    $_SESSION[$m . 'cync'] = $cync;
}
if (!$_SESSION[$m . 'cync']) {
    getLink(RW(0), '', '동기화코드가 지정되지 않았습니다.', '');
}
$cyncArr = getArrayString($_SESSION[$m . 'cync']);
$mod = 'main';
$sort = $sort ? $sort : 'uid';
$orderby = $orderby ? $orderby : 'asc';
$recnum = $recnum && $recnum < 200 ? $recnum : $d['trackback']['recnum'];
$cmentque = "parent='" . $cyncArr['data'][0] . $cyncArr['data'][1] . "' and type=1";
$RCD = array();
$TCD = getDbArray($table['s_trackback'], $cmentque, '*', $sort, $orderby, $recnum, $p);
$NUM = getDbRows($table['s_trackback'], $cmentque);
$TPG = getTotalPage($NUM, $recnum);
while ($_R = db_fetch_array($TCD)) {
    $RCD[] = $_R;
}
if ($g['mobile'] && $_SESSION['pcmode'] != 'Y') {
    $B['skin'] = $d['trackback']['skin_mobile'];
} else {
    $B['skin'] = $skin ? $skin : $d['trackback']['skin_main'];
}
$g['track_reset'] = $c ? $g['s'] . '/?r=' . $r . '&amp;c=' . $c : getLinkFilter($g['s'] . '/?r=' . $r . '&amp;m=' . $m, array('skin', 'iframe'));
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:31,代码来源:main.php

示例14: load_partial

<?php

load_partial("admin_menu");
?>
<div class="help">
	<ul>
		<li><?php 
echo getLink("Show countries", "countries/all");
?>
</li>
	</ul>
</div>
<form id="newcountry" action="" method="post">
	<input name="action" value="newcountry" type="hidden"/>
	<label for="name">New country name:</label>
	<input type="text" name="name" />
	<p style="clearall">
		<input type="submit" name="create" value="Add" />
	</p>
</form>
开发者ID:stas,项目名称:bebuntu,代码行数:20,代码来源:add.php

示例15: link_to

function link_to($link, $txt = null)
{
    return '<a href="' . getLink($link) . '">' . pick($txt, $link) . "</a>";
}
开发者ID:asteig,项目名称:rabidcore,代码行数:4,代码来源:bootstrapper.php


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