• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP encodeURIComponent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setTimeout

    });
    $("#rcpassword").blur(function(){
    	registerPassCheck2();
    });
	
	<?php 
    if (isset($_POST["rcountry"])) {
        ?>
	    setTimeout(function () {
			$("#rcountry option").filter(function(index) { return encodeURIComponent($(this).val()) === '<?php 
        echo encodeURIComponent($country);
        ?>
'; }).prop('selected', true);
			setTimeout(function () {
				checkRCountry();
				$("#rcountry").trigger('click');
				setTimeout(function () {
					$("#riran_state option").filter(function(index) { return encodeURIComponent($(this).val()) === '<?php 
        echo encodeURIComponent($iran_state);
        ?>
'; }).prop('selected', true);
					$("#riran_state").trigger('click');
				},10);
			},100);
		},10);
	<?php 
    }
    ?>
	</script>
<?php 
}
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:register.php


示例2: encodeURIComponent

				<span class="right" style="cursor: pointer;" onclick="gotoPage('full',500,'index/product.php?category=<?php 
        echo encodeURIComponent($row[1]);
        ?>
&sub_category=<?php 
        echo encodeURIComponent($row[2]);
        ?>
');"><?php 
        echo getCategory($row[2]);
        ?>
</span>
				<span class="right">&gt;</span>
				<span class="right" style="cursor: pointer;" onclick="gotoPage('full',500,'index/product.php?category=<?php 
        echo encodeURIComponent($row[1]);
        ?>
&sub_category=<?php 
        echo encodeURIComponent($row[2]);
        ?>
&ptoshow=<?php 
        echo $row[0];
        ?>
');"><?php 
        echo $row[3];
        ?>
</span>
				<?php 
    }
    ?>
		</div>
		<div class="controlpanel-item" style="cursor: default;" >
			<span class="right" style="font-weight: bold;">پر بازدید ترین خبر/مقاله:</span>
			<?php 
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:controlpanel.php


示例3: encodeURIComponent

                ?>
					<div class="mitem <?php 
                if ($mrows[0] == $selected_id) {
                    echo "selected";
                }
                ?>
" onclick="showMsg(<?php 
                echo $mrows[0];
                ?>
);" >
						<span class="datetime" ><?php 
                echo $mrows[3] . " " . $mrows[4];
                ?>
</span>
						<div class="text" ><a href="?command=<?php 
                echo encodeURIComponent('page=message|&|mode=show_msg|&|section_id=' . $mrows[0]);
                ?>
" ><span style='font-weight: bold;' >Name: </span><?php 
                echo $mrows[1];
                ?>
<br><span style='font-weight: bold;' >Emial: </span><?php 
                echo $mrows[2];
                ?>
</a></div>
					</div>
					<?php 
            }
            ?>
				</div>
			</div>
			<div id="about-shadow">
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:message.php


示例4: sendEmail

function sendEmail($to, $message)
{
    global $PREFERRED_HOSTNAME, $UPDATE_EMAIL_ADDRESS, $UPDATE_EMAIL_NAME, $UPDATE_MAIL_SERVER, $UPDATE_MAIL_SERVER_PORT, $UPDATE_MAIL_SERVER_SSL, $UPDATE_MAIL_SERVER_USERNAME, $UPDATE_MAIL_SERVER_PASSWORD, $emailer_transport, $emailer_mailer;
    try {
        if (!isset($emailer_transport)) {
            if (!isset($emailer_transport)) {
                if (!isset($UPDATE_MAIL_SERVER)) {
                    $emailer_transport = Swift_SmtpTransport::newInstance();
                } else {
                    if ($UPDATE_MAIL_SERVER_SSL) {
                        $emailer_transport = Swift_SmtpTransport::newInstance($UPDATE_MAIL_SERVER, $UPDATE_MAIL_SERVER_PORT, 'ssl');
                    } else {
                        $emailer_transport = Swift_SmtpTransport::newInstance($UPDATE_MAIL_SERVER, $UPDATE_MAIL_SERVER_PORT);
                    }
                    $emailer_transport->setUsername($UPDATE_MAIL_SERVER_USERNAME)->setPassword($UPDATE_MAIL_SERVER_PASSWORD);
                }
            }
        }
        $emailMessage = Swift_Message::newInstance()->setSubject("New Updates to Googulator")->setFrom(array($UPDATE_EMAIL_ADDRESS => $UPDATE_EMAIL_NAME))->setTo($to)->setBody($message . "\r\n\r\n" . "Tired of these messages? Use the following url to unsubscribe:\r\n" . "http://{$PREFERRED_HOSTNAME}/?unsubscribe=" . encodeURIComponent($to));
        if (!isset($emailer_mailer)) {
            $emailer_mailer = Swift_Mailer::newInstance($emailer_transport);
        }
        return $emailer_mailer->send($emailMessage);
    } catch (Exception $e) {
        return false;
    }
    /*$headers = 'From: ' . $UPDATE_EMAIL_ADDRESS   . "\r\n" .
          'Reply-To: ' . $UPDATE_EMAIL_ADDRESS  . "\r\n" .
          'X-Mailer: PHP/' . phpversion();;
      $message = $message . "\r\n\r\n" . "Tired of these messages? Use the following url to unsubscribe:\r\n"
          . "http://$PREFERRED_HOSTNAME/?unsubscribe=" . encodeURIComponent($to);
      return mail($to,"New Updates to Googulator",$message,$headers); */
}
开发者ID:Belthazor2008,项目名称:googulator,代码行数:33,代码来源:include.php


示例5: mysql_real_escape_string

                        $album = $album_title;
                    }
                }
                if (isset($_GET['album'])) {
                    $album = $_GET['album'];
                }
                $album = mysql_real_escape_string($album);
                $query = mysql_query("SELECT * FROM gallerybykk_" . $sitelang . " WHERE state = 1 AND album = '{$album}' ;", $db);
                if (!$query) {
                    die("Error reading query: " . mysql_error());
                }
                if ($grow = mysql_fetch_row($query)) {
                    ?>
		<script type="text/javascript">
		$("#page-nav").css({'opacity':'0'}).empty().load('index/pagenavigator.php?page=addgallery&album=<?php 
                    echo encodeURIComponent($album);
                    ?>
', function() {
			$("#page-nav").animate({'opacity':'1'}, 300);
			});
		</script>
		<div style="width: 100%;height: 100%;overflow: hidden;" id="addgallery-container">
			<div class="div-title">EDIT ALBUM</div>
			<form action="index/addgallery.php?mode=applyedit_album" method="POST" enctype="multipart/form-data" id="addgallery_form" >
				<input type="hidden" name="album" value="<?php 
                    echo $grow[1];
                    ?>
">
				<div class="div-row" >
					<div class="input-div" >
						<div class="lable" ><span class="red" >*</span>Album</div>
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:addgallery.php


示例6: getServiceUrl

 public function getServiceUrl($uri)
 {
     return $this->config->getBaseUrl() . ResourceClient::$URL_RESOURCE_SERVICE . encodeURIComponent($uri);
 }
开发者ID:Bono974,项目名称:marmotta,代码行数:4,代码来源:ResourceClient.php


示例7: encodeURIComponent

/* INDEPENDENT CSS/JS/THEME FOR PAGE  Author: -ptr.nov-*/
$this->sideCorp = 'Modul HRM';
/* Title Select Company pada header pasa sidemenu/menu samping kiri */
$this->sideMenu = 'hrd_modul';
/* kd_menu untuk list menu pada sidemenu, get from table of database */
$this->title = Yii::t('app', 'HRM - Organization');
/* title pada header page */
//$this->params['breadcrumbs'][] = $this->title;                          /* belum di gunakan karena sudah ada list sidemenu, on plan next*/
function encodeURIComponent($str)
{
    $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')');
    return strtr(rawurlencode($str), $revert);
}
//print_r($dataProvider->getModels());
//echo  \yii\helpers\Json::encode($dataProvider->getModels());
$itemJsonStr = encodeURIComponent(Json::encode($dataProvider->getModels()));
$itemJsonStr2 = Json::encode($dataProvider->getModels());
//$this->registerJs('Print("var data=\"" . $itemJsonStr . "\";");');
//echo $itemJsonStr2;
//echo $itemJsonStr;
$this->registerJs('
		jQuery.noConflict();
		(function($) {
			var m_timer = null;
			var datax=\'' . $itemJsonStr . '\';	
			$(document).ready(function () {
				$.ajaxSetup({
					cache: false
				});
				ResizePlaceholder();
				orgDiagram = $("#orgdiagram").orgDiagram({
开发者ID:komponen,项目名称:orgChar1,代码行数:31,代码来源:index.php


示例8: encodeURIComponent

                            ?>
);"></div>
						<div class="btn edit" onclick="editProduct(<?php 
                            echo $allrows[$start_counter + $i][0];
                            ?>
);"></div>
						<div class="visit-counter" >Visit: <?php 
                            echo $allrows[$start_counter + $i][7];
                            ?>
</div>
					</div>
					<?php 
                        }
                        ?>
					<a href="?cmode=full&command=<?php 
                        echo encodeURIComponent("index/product.php?category=" . $category . "&sub_category=" . $sub_category . "&ptoshow=" . $allrows[$start_counter + $i][0]);
                        ?>
" >
					<div  class="p-inner none-pattern" onclick="showProduct(<?php 
                        echo $allrows[$start_counter + $i][0];
                        ?>
);">
						<span class="first">
							<?php 
                        echo $allrows[$start_counter + $i][1];
                        echo $allrows[$start_counter + $i][5];
                        ?>
						</span>
						<span class="second">
							<?php 
                        echo $allrows[$start_counter + $i][2];
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:product.php


示例9: encodeURIComponent

use yii\bootstrap\Modal;
use yii\widgets\Pjax;
use yii\helpers\Json;
use kartik\tabs\TabsX;
use lukisongroup\assets\AppAssetOrg1;
AppAssetOrg1::register($this);
/*ORG JSON INCRIPTION -ptr.nov-*/
function encodeURIComponent($str)
{
    $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')');
    return strtr(rawurlencode($str), $revert);
}
/*ORG JSON DATA INCRIPTION -ptr.nov-*/
//print_r($dataProviderOrg->getModels());
//echo  \yii\helpers\Json::encode($dataProvider->getModels());
$orgJsonStr = encodeURIComponent(Json::encode($dataProviderOrg->getModels()));
//$itemJsonStr2 = Json::encode($dataProviderOrg->getModels());
$diagramOrg = '<div class="body-content" id="orgdiagram-administation" style="overflow: hidden;"></div>';
//$diagramOrg = '<div class="content-wrapper" id="orgdiagram-administation" style="position: absolute; overflow: hidden; left: 0px; padding: 0px; margin: 0px; border-style: solid; border-color: navy; border-width: 1px;"></div>';
$items = [['label' => '<i class="fa fa-sitemap fa-1x"></i> Struktur Organisasi', 'content' => $diagramOrg, 'active' => true], ['label' => '<i class="fa fa-soccer-ball-o fa-1x"></i> Visi Misi', 'content' => 'asdas'], ['label' => '<i class="fa fa-tags fa-1x"></i>Regulations', 'content' => 'asdasdsadasd']];
echo TabsX::widget(['id' => 'tab-org-administrator', 'items' => $items, 'position' => TabsX::POS_ABOVE, 'bordered' => true, 'encodeLabels' => false]);
?>

<?php 
/*
 * Primitive JS Structure Organization 
 * @author ptrnov [[email protected]]
 * @since 1.1
 */
$this->registerJs('	
		$.noConflict();
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:index.php


示例10: encodeURIComponent

    echo '"><a href="javascript:void(0);" modulename="';
    echo $tabs[$i];
    echo '">';
    echo $tabNames[$i];
    echo '</a></li>';
}
?>
                            <li class="dropdown">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);"">
                                    Social <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu" style="width:100%; margin-top:12px;">
                                    <li><a href="https://www.twitter.com/googulator" target="_blank">Twitter</a></li>
                                    <li><a href="https://plus.google.com/communities/108343287295374695153" target="_blank">Google+ Community</a></li>
                                    <li><a href="https://www.pushbullet.com/channel?tag=<?php 
echo encodeURIComponent($PUSHBULLET_CHANNEL_ID);
?>
" target="_blank">Pushbullet Channel</a></li>
                                </ul>
                            </li>
                        </ul>

                        <div id="googleUserInfo" style="padding-right:1em; position:absolute; right: 0px; top: 0px;bottom: 0px;">
                            <div id="loadText" style='margin-top:0.25em'>Loading Google Credentials...</div>
                            <button id="loadButton" class="gPlusLoginButton hidden" style="margin-right: -1em;">
                                <span class="gPlusIcon"></span>
                                <span class="verticalDivider"></span>
                                <span class="text"> Sign In</span></button>
                        </div>
                    </div>
                </div>
开发者ID:Belthazor2008,项目名称:googulator,代码行数:31,代码来源:index.php


示例11: encodeURIComponent

$misconceptiontitle = encodeURIComponent($misconceptiontitle);
$fm = fopen($_SERVER['DOCUMENT_ROOT'] . "/misconception/questions/" . $misconceptiontitle . ".txt", "wb");
fwrite($fm, '0' . "\n" . "\n" . "\n" . '0!n!~undefined~' . "\n" . date("M") . " " . date("j") . ',' . date("Y") . "\n" . date("M") . " " . date("j") . ',' . date("Y") . "!n!" . "\n" . '0' . "!n!" . "~undefined~" . "\n" . ',undefined,' . "\n" . $username . "\n" . $whatyouthinkyouknow . "!n!");
fclose($fm);
$ratingval = 0;
include '../config.php';
$con = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . '', DB_USER, DB_PASSWORD);
$tagsinstring = implode(',', $tagarray);
$misconceptiontitle = decodeURIComponent($misconceptiontitle);
$query = $con->prepare("INSERT INTO srating (title, rating, tags) VALUES (:title,:rating,:tags) ");
//bind parameters
$query->bindParam(':title', $misconceptiontitle);
$query->bindParam(':rating', $ratingval);
// for everytag that a thing has, give it an increased rating by one
$query->bindParam(':tags', $tagsinstring);
$query->execute();
//update user rep cause htey'd asked a question
$uquery = $con->prepare("SELECT * FROM accounts where username = :questionowner");
$uquery->bindParam(':questionowner', $username);
$uquery->execute();
$data = $uquery->fetch(PDO::FETCH_ASSOC);
$newrep = $data['reputation'];
$newrep = $newrep + 5;
$stmt = $con->prepare("UPDATE accounts SET reputation=:newrep WHERE username=:questionowner");
$stmt->bindParam(':questionowner', $username);
$stmt->bindParam(':newrep', $newrep);
$stmt->execute();
$misconceptiontitle = encodeURIComponent($misconceptiontitle);
echo "/misconception/questions/" . $misconceptiontitle . ".php";
//there's a bug where if php echos you must chose a dif title js thinks that it's a link nad send you to that place
//header("Location: ../ask_misconception_page/ask-index.php");
开发者ID:splacorn,项目名称:misconception,代码行数:31,代码来源:ask-create.php


示例12: encodeURIComponent

            $upperMark = $row["upperMark"];
            if ($upperMark === '') {
                $search_output .= "<a href='checkTypeComments.php?assignment_ID={$assignment_ID}&student_ID={$student_ID}&id={$id}'>{$title}</a><br/>{$body}<br/>({$lowerMark})<br/><br/>";
            } else {
                $search_output .= "<a href='checkTypeComments.php?assignment_ID={$assignment_ID}&student_ID={$student_ID}&id={$id}'>{$title}</a><br/>{$body}<br/>({$lowerMark} - {$upperMark})<br/><br/>";
            }
        }
        echo $search_output;
    }
    /**
     * Matches JavaScript's encodeURIComponent behaviour
     * Courtesy: http://stackoverflow.com/questions/1734250/what-is-the-equivalent-of-javascripts-encodeuricomponent-in-php
     *
     * @param string $str input string
     * @return string
     */
    function encodeURIComponent($str)
    {
        $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')');
        return strtr(rawurlencode($str), $revert);
    }
    // echo "<a href='checkTypeComments.php?search_output=$search_output>Add This Comment'</a>";
    echo "<a href='addIndividualComment.php?searchquery=" . encodeURIComponent($searchquery) . "'>ADD COMMENT</a><br/><br/>";
    echo $searchquery;
}
// ------------------------------------end full text search--------------------------------------------------------------------.
?>


</body>
</html>
开发者ID:Kiwi-ETConsulting,项目名称:PLFeedbackCode,代码行数:31,代码来源:retrieveComments.php


示例13: array

//print_r($orderedarray);
$searchquerydata = array();
for ($querynumber = 0; $querynumber < count($orderedarray); $querynumber++) {
    $currentquery = $orderedarray[$querynumber];
    for ($unorderedquery = 0; $unorderedquery < count($orderedarray); $unorderedquery++) {
        $individualparts = explode("~!~", $firstsearcharray[$unorderedquery]);
        if ($individualparts[0] == $currentquery) {
            $individualparts[1] = decodeURIComponent($individualparts[1]);
            $query = $con->prepare("SELECT * FROM srating WHERE title = :misconceptionname");
            $query->bindParam(':misconceptionname', $individualparts[1]);
            $query->execute();
            $data = $query->fetch(PDO::FETCH_ASSOC);
            $repofanswers = $data['repofanswers'];
            $views = $data['views'];
            $tags = $data['tags'];
            $individualparts[1] = encodeURIComponent($individualparts[1]);
            $lines = file("../questions/" . $individualparts[1] . ".txt");
            // turn it back to spaces for client side
            $individualparts[1] = decodeURIComponent($individualparts[1]);
            $questionrep = $lines[0];
            $whatithinkiknow = preg_split("/(!n!)/", $lines[9], -1, PREG_SPLIT_DELIM_CAPTURE);
            //$questionrep = data['questionrep'];
            $compiledinfo = $repofanswers . "~!~" . $views . "~!~" . $tags . "~!~" . $questionrep . "~!~" . $individualparts[1] . "~!~" . $whatithinkiknow[0];
            $compiledinfo = str_replace("\n", "", $compiledinfo);
            array_push($searchquerydata, $compiledinfo);
        }
    }
}
echo json_encode(array_values($searchquerydata));
//push $current query into firstsearcharray
//once we do that we look into the relavent titles (first search array) and see the number of accurances does our token show up
开发者ID:splacorn,项目名称:misconception,代码行数:31,代码来源:search.php


示例14: while

            while ($arows = mysql_fetch_row($query)) {
                if ($section_id == '') {
                    $section_id = $arows[0];
                }
                ?>
		<div class="about-category <?php 
                if ($arows[0] == $section_id) {
                    echo "selected";
                }
                ?>
" onclick="gotoPage('full',500,'index/about.php?section_id=<?php 
                echo $arows[0];
                ?>
')">
			<div class="text" ><a href="?cmode=full&command=<?php 
                echo encodeURIComponent("index/about.php?section_id=" . $arows[0]);
                ?>
" ><?php 
                echo $arows[1];
                ?>
</a></div>
		</div>
	<?php 
            }
            ?>
	</div>
	<div id="about-shadow">
	</div>
	<div id="about-container">
		<?php 
            if ($isAdmin) {
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:about.php


示例15: pnlink

function pnlink($clang, $lang, $mode, $id, $text, $db, $goback = '')
{
    $blankLink = false;
    if ($clang != $lang) {
        $blankLink = true;
    }
    if ($mode == '1') {
        $subquery = mysql_query("SELECT category, sub_category FROM productbykk_" . $lang . " WHERE state = 1 AND id='{$id}' ;", $db);
        if ($subrow = mysql_fetch_row($subquery)) {
            if (!$blankLink) {
                echo "<a href='?cmode=full&command=" . encodeURIComponent("index/product.php?category=" . $subrow[0] . "&sub_category=" . $subrow[1] . "&ptoshow=" . $id) . "' ";
                echo " onclick=" . chr(34) . "gotoPage('full',500,'index/product.php?category=" . encodeURIComponent($subrow[0]) . "&sub_category=" . encodeURIComponent($subrow[1]) . "&ptoshow=" . $id . "');" . chr(34) . " >";
            } else {
                echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/product.php?category=" . $subrow[0] . "&sub_category=" . $subrow[1] . "&ptoshow=" . $id) . "' ";
                echo " class='download' target='_blank' >";
            }
            if ($text == '') {
                echo "Product link";
            } else {
                echo $text;
            }
            echo "</a>";
        }
    } else {
        if ($mode == '2') {
            if (!$blankLink) {
                echo "<a href='?cmode=full&command=" . encodeURIComponent("index/news.php?ntoshow=" . $id) . "' ";
                echo " onclick=" . chr(34) . "gotoPage('full',500,'index/news.php?ntoshow=" . $id . "');" . chr(34) . " >";
            } else {
                echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/news.php?ntoshow=" . $id) . "' ";
                echo " class='download' target='_blank' >";
            }
            if ($text == '') {
                echo "News link";
            } else {
                echo $text;
            }
            echo "</a>";
        } else {
            if ($mode == '3') {
                if (!$blankLink) {
                    echo "<a href='?cmode=full&command=" . encodeURIComponent("index/gallery.php?gtoshow=" . $id) . "' ";
                    echo " onclick=" . chr(34) . "gotoPage('full',500,'index/gallery.php?gtoshow=" . $id . "');" . chr(34) . " >";
                } else {
                    echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/gallery.php?gtoshow=" . $id) . "' ";
                    echo " class='download' target='_blank' >";
                }
                if ($text == '') {
                    echo "Gallery link";
                } else {
                    echo $text;
                }
                echo "</a>";
            } else {
                if ($mode == '4') {
                    echo "<a href='" . $id . "' class='download' target='_blank'  >";
                    if ($text == '') {
                        echo "Website link";
                    } else {
                        echo $text;
                    }
                    echo "</a>";
                } else {
                    if ($mode == '5') {
                        if (!$blankLink) {
                            echo "<a href='?cmode=full&command=" . encodeURIComponent("index/fillform.php?goback=" . $goback . "&id=" . $id) . "' ";
                            echo " onclick=" . chr(34) . "gotoPage('full',500,'index/fillform.php?goback=" . $goback . "&id=" . $id . "');" . chr(34) . " >";
                        } else {
                            echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/fillform.php?goback=" . $goback . "&id=" . $id) . "' ";
                            echo " class='download' target='_blank' >";
                        }
                        if ($text == '') {
                            echo "Form link";
                        } else {
                            echo $text;
                        }
                        echo "</a>";
                    }
                }
            }
        }
    }
}
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:83,代码来源:database.php


示例16: encodeURIComponent

					<?php 
            if ($rows[5] != '') {
                ?>
					<div class="img" ><img src="<?php 
                echo $rows[5];
                ?>
" onclick="showNews(<?php 
                echo $rows[0];
                ?>
)" style="width: 100%;"></div>
					<?php 
            }
            ?>
					<div class="n-text" >
					<h2 ><a href="?cmode=full&command=<?php 
            echo encodeURIComponent("index/news.php?ntoshow=" . $rows[0]);
            ?>
" onclick="showNews(<?php 
            echo $rows[0];
            ?>
)"><?php 
            echo $rows[2];
            ?>
</a></h2>
					<?php 
            echo $rows[3];
            ?>
					</div>
				</div>
			</div>
		<?php 
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:news.php


示例17: visiting

                                                                        echo $row[0];
                                                                        ?>
</a></span>
		<script>
		window.document.title= "<?php 
                                                                        echo $sitetitle . " | " . $row[0];
                                                                        ?>
";
		</script>
		<?php 
                                                                    } else {
                                                                        visiting('form', $db);
                                                                        ?>
			<span class="pn-spacer" >&gt;</span>
			<span class="pn-item" ><a href="?cmode=full&command=<?php 
                                                                        echo encodeURIComponent("index/fillform.php?id=" . $id);
                                                                        ?>
" onclick="gotoPage('full',500,'index/fillform.php?id=<?php 
                                                                        echo $id;
                                                                        ?>
');" ><?php 
                                                                        echo $row[0];
                                                                        ?>
</a></span>
		<script>
		window.document.title= "<?php 
                                                                        echo $sitetitle . " | " . $row[0];
                                                                        ?>
";
		</script>
		<?php 
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:pagenavigator.php


示例18: encodeURIComponent

					</div>
					<div class="footer-link">
						<a href="?cmode=full&command=<?php 
echo encodeURIComponent("index/gallery.php");
?>
" onclick="gotoPage('full',500,'index/gallery.php');" >Galerie</a>
					</div>
					<div class="footer-link">
						<a href="?cmode=full&command=<?php 
echo encodeURIComponent("index/about.php");
?>
" onclick="gotoPage('full',500,'index/about.php');" >Über</a>
					</div>
					<div class="footer-link">
						<a href="?cmode=full&command=<?php 
echo encodeURIComponent("index/contact.php");
?>
" onclick="gotoPage('full',500,'index/contact.php');" >Kontakt</a>
					</div>
				</div>
				<div style="height: 100px;width: 450px;float: right;margin-right: 20px;">
				<?php 
$contact_address = "aboutandcontact/footer.dtx";
$check = false;
$f = fopen($contact_address, "r");
if ($f === false) {
    echo $contact_address . " doesn't exist.";
} else {
    while (!feof($f)) {
        $buf = fgets($f, 4096);
        $buf = htmlspecialchars_decode($buf, ENT_QUOTES);
开发者ID:kanbang,项目名称:kk-biomedical-website-template,代码行数:31,代码来源:index.php


示例19: apiInitData

    /**
     * SCORM Data for Javascript-API
     */
    function apiInitData()
    {
        global $ilias, $ilLog, $ilUser, $lng, $ilDB;
        function encodeURIComponent($str)
        {
            $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')', '%7E' => '~');
            return strtr(rawurlencode($str), $revert);
        }
        if ($_GET["ref_id"] == "") {
            print 'alert("no start without ref_id");';
            die;
        }
        $slm_obj =& new ilObjSCORMLearningModule($_GET["ref_id"]);
        header('Content-Type: text/javascript; charset=UTF-8');
        print "function iliasApi() {\r\n";
        $js_data = file_get_contents("./Modules/ScormAicc/scripts/basisAPI.js");
        echo $js_data;
        $js_data = file_get_contents("./Modules/ScormAicc/scripts/SCORM1_2standard.js");
        //want to give opportunities to different files (Uwe Kohnle)
        echo $js_data;
        print "}\r\n";
        //variables to set in administration interface
        $b_storeObjectives = 'true';
        $b_storeInteractions = 'true';
        $b_readInteractions = 'false';
        $c_storeSessionTime = 's';
        //n=no, s=sco, i=ilias
        $i_lessonScoreMax = '-1';
        $i_lessonMasteryScore = '-1';
        //other variables
        $b_messageLog = 'false';
        if ($ilLog->current_log_level == 30) {
            $b_messageLog = 'true';
        }
        $launchId = '0';
        if ($_GET["autolaunch"] != "") {
            $launchId = $_GET["autolaunch"];
        }
        $session_timeout = 0;
        //unlimited sessions
        if ($slm_obj->getSession()) {
            $session_timeout = (int) $ilias->ini->readVariable("session", "expire") / 2;
        }
        $b_autoReview = 'false';
        if ($this->slm->getAutoReview()) {
            $b_autoReview = 'true';
        }
        $b_debug = 'false';
        if ($this->slm->getDebug()) {
            $b_debug = 'true';
        }
        $b_autoContinue = 'false';
        if ($this->slm->getAutoContinue()) {
            $b_autoContinue = 'true';
        }
        $b_checkSetValues = 'false';
        if ($this->slm->getCheck_values()) {
            $b_checkSetValues = 'true';
        }
        $b_autoLastVisited = 'false';
        if ($this->slm->getAuto_last_visited()) {
            $b_autoLastVisited = 'true';
            if ($launchId == '0') {
                $launchId = $slm_obj->getLastVisited($ilUser->getID());
            }
        }
        $s_out = 'IliasScormVars={' . 'refId:' . $_GET["ref_id"] . ',' . 'objId:' . $this->slm->getId() . ',' . 'launchId:' . $launchId . ',' . 'launchNr:0,' . 'pingSession:' . $session_timeout . ',' . 'studentId:' . $ilias->account->getId() . ',' . 'studentName:"' . encodeURIComponent($ilias->account->getLastname() . ', ' . $ilias->account->getFirstname()) . '",' . 'studentLogin:"' . encodeURIComponent($ilias->account->getLogin()) . '",' . 'studentOu:"' . encodeURIComponent($ilias->account->getDepartment()) . '",' . 'credit:"' . str_replace("_", "-", $this->slm->getCreditMode()) . '",' . 'lesson_mode:"' . $this->slm->getDefaultLessonMode() . '",' . 'b_autoReview:' . $b_autoReview . ',' . 'b_messageLog:' . $b_messageLog . ',' . 'b_checkSetValues:' . $b_checkSetValues . ',' . 'b_storeObjectives:' . $b_storeObjectives . ',' . 'b_storeInteractions:' . $b_storeInteractions . ',' . 'b_readInteractions:' . $b_readInteractions . ',' . 'c_storeSessionTime:"' . $c_storeSessionTime . '",' . 'b_autoContinue:' . $b_autoContinue . ',' . 'b_autoLastVisited:' . $b_autoLastVisited . ',' . 'i_lessonScoreMax:' . $i_lessonScoreMax . ',' . 'i_lessonMasteryScore:' . $i_lessonMasteryScore . ',' . 'b_debug:' . $b_debug . ',' . 'dataDirectory:"' . encodeURIComponent($this->slm->getDataDirectory("output") . '/') . '",' . 'img:{' . 'asset:"' . encodeURIComponent(ilUtil::getImagePath('scorm/asset.png')) . '",' . 'browsed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/browsed.png')) . '",' . 'completed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/completed.png')) . '",' . 'failed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/failed.png')) . '",' . 'incomplete:"' . encodeURIComponent(ilUtil::getImagePath('scorm/incomplete.png')) . '",' . 'not_attempted:"' . encodeURIComponent(ilUtil::getImagePath('scorm/not_attempted.png')) . '",' . 'passed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/passed.png')) . '",' . 'running:"' . encodeURIComponent(ilUtil::getImagePath('scorm/running.png')) . '"' . '},' . 'statusTxt:{' . 'wait:"' . encodeURIComponent($lng->txt("please_wait")) . '",' . 'status:"' . encodeURIComponent($lng->txt("cont_status")) . '",' . 'browsed:"' . encodeURIComponent($lng->txt("cont_sc_stat_browsed")) . '",' . 'completed:"' . encodeURIComponent($lng->txt("cont_sc_stat_completed")) . '",' . 'failed:"' . encodeURIComponent($lng->txt("cont_sc_stat_failed")) . '",' . 'incomplete:"' . encodeURIComponent($lng->txt("cont_sc_stat_incomplete")) . '",' . 'not_attempted:"' . encodeURIComponent($lng->txt("cont_sc_stat_not_attempted")) . '",' . 'passed:"' . encodeURIComponent($lng->txt("cont_sc_stat_passed")) . '",' . 'running:"' . encodeURIComponent($lng->txt("cont_sc_stat_running")) . '"' . '}' . '};';
        //		header('Content-Type: text/javascript; charset=UTF-8');
        print $s_out . "\r\n";
        //prevdata
        $s_out = 'IliasScormData=[';
        $tquery = 'SELECT sco_id,lvalue,rvalue FROM scorm_tracking ' . 'WHERE user_id = %s AND obj_id = %s ' . "AND sco_id > 0 AND lvalue != 'cmi.core.entry' AND lvalue != 'cmi.core.session_time'";
        if ($b_readInteractions == 'false') {
            $tquery .= " AND SUBSTR(lvalue, 1, 16) != 'cmi.interactions'";
        }
        $val_set = $ilDB->queryF($tquery, array('integer', 'integer'), array($ilUser->getId(), $this->slm->getId()));
        while ($val_rec = $ilDB->fetchAssoc($val_set)) {
            if (!strpos($val_rec["lvalue"], "._count")) {
                $s_out .= '[' . $val_rec["sco_id"] . ',"' . $val_rec["lvalue"] . '","' . encodeURIComponent($val_rec["rvalue"]) . '"],';
            }
        }
        //manifestData
        $val_set = $ilDB->queryF('
			SELECT sc_item.obj_id,maxtimeallowed,timelimitaction,datafromlms,masteryscore 
			FROM sc_item, scorm_object 
			WHERE scorm_object.obj_id=sc_item.obj_id
			AND scorm_object.c_type = %s
			AND scorm_object.slm_id = %s', array('text', 'integer'), array('sit', $this->slm->getId()));
        while ($val_rec = $ilDB->fetchAssoc($val_set)) {
            if ($val_rec["maxtimeallowed"] != null) {
                $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.student_data.max_time_allowed","' . encodeURIComponent($val_rec["maxtimeallowed"]) . '"],';
            }
            if ($val_rec["timelimitaction"] != null) {
                $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.student_data.time_limit_action","' . encodeURIComponent($val_rec["timelimitaction"]) . '"],';
            }
            if ($val_rec["datafromlms"] != null) {
                $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.launch_data","' . encodeURIComponent($val_rec["datafromlms"]) . '"],';
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:c

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP encode_data_query_index函数代码示例发布时间:2022-05-15
下一篇:
PHP encodeMultienumValue函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap