本文整理汇总了PHP中Links函数的典型用法代码示例。如果您正苦于以下问题:PHP Links函数的具体用法?PHP Links怎么用?PHP Links使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Links函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Links
function &Link_Get($LinkID, $TypeID = NULL)
{
#-----------------------------------------------------------------------------
$Links =& Links();
#-----------------------------------------------------------------------------
if (!isset($Links[$LinkID])) {
$Links[$LinkID] = NULL;
#---------------------------------------------------------------------------
if ($TypeID) {
SetType($Links[$LinkID], $TypeID);
}
}
#-----------------------------------------------------------------------------
return $Links[$LinkID];
}
示例2: smarty_function_table
function smarty_function_table($params, $smarty)
{
$tableName = $params['name'];
if (!$tableName) {
return "";
}
$DOM = new DOM();
$Links =& Links();
# Коллекция ссылок
$Links['DOM'] =& $DOM;
$comp = Comp_Load('Tables/Super', $tableName);
if (Is_Error($comp)) {
return ERROR | @Trigger_Error(500);
}
$DOM->Object = $comp;
$Out = $DOM->Build();
if (Is_Error($Out)) {
return ERROR | @Trigger_Error(500);
}
return $Out;
}
示例3: SPrintF
<B>|</B>
<A target="blank" href="/public/%s/Statistics.pdf">PDF</A>
</P>
<SCRIPT>window.scrollTo(0,1000);</SCRIPT>
</BODY>
</HTML>
EOD;
#-----------------------------------------------------------------------------
return SPrintF($Parse, $UniqID, $UniqID);
}
#-------------------------------------------------------------------------------
# Формирование списка отчетов
#-------------------------------------------------------------------------------
$DOM = new DOM();
#-------------------------------------------------------------------------------
$Links =& Links();
#-------------------------------------------------------------------------------
$Links['DOM'] =& $DOM;
#-------------------------------------------------------------------------------
if (Is_Error($DOM->Load('Base'))) {
return ERROR | @Trigger_Error(500);
}
#-------------------------------------------------------------------------------
$DOM->AddAttribs('MenuLeft', array('args' => 'Administrator/AddIns'));
#-------------------------------------------------------------------------------
$DOM->AddText('Title', 'Дополнения → Статистика → Общая статистика');
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
$NoBody = new Tag('NOBODY');
#-------------------------------------------------------------------------------
$Comp = Comp_Load('Tab', 'Administrator/Statistic', $NoBody);
示例4: Build
/**
* Формирует объект
*
* Сформировывает объект класса DOM и подготавливает к выводу в браузер. После
* вызова этой функции переменная, куда записывался результат выполнения функции
* выводится с помощью оператора echo.
*
* @param boolean <необходимость преобразования в XML строку>
*/
public function Build($IsToXML = TRUE)
{
#-----------------------------------------------------------------------------
if ($this->TemplateID) {
#---------------------------------------------------------------------------
$Trigger = SPrintF('Triggers/DOM/After/%s', $this->TemplateID);
#---------------------------------------------------------------------------
if (!Is_Error(System_Element(SPrintF('comp/%s.comp.php', $Trigger)))) {
#-------------------------------------------------------------------------
$LinkID = UniqID('DOM-');
#-------------------------------------------------------------------------
$Links =& Links();
# Коллекция ссылок
$Links[$LinkID] =& $this;
#-------------------------------------------------------------------------
if (Is_Error(Comp_Load($Trigger, $LinkID, COMP_ALL_HOSTS))) {
return ERROR | @Trigger_Error('[DOM->Build]: ошибка загрузки предобработчика');
}
#-------------------------------------------------------------------------
unset($Links[$LinkID]);
}
}
#-----------------------------------------------------------------------------
# Номализация документа
$this->Normalize();
#-----------------------------------------------------------------------------
$this->Apply('Sources');
#-----------------------------------------------------------------------------
if ($IsToXML) {
#---------------------------------------------------------------------------
$Result = $this->Object->ToXMLString();
if (Is_Error($Result)) {
return ERROR | Trigger_Error('[DOM->Build]: не удалось преобразовать DOM в строку');
}
#---------------------------------------------------------------------------
return SPrintF("<!-- Joonte Billing System http://www.joonte.com -->\n%s", $Result);
}
#-----------------------------------------------------------------------------
return TRUE;
}
示例5: Config_Read
function Config_Read($Array, $Path = array(), $Level = 1)
{
#-------------------------------------------------------------------------------
# ASort added by lissyara for test purpose, 2014-01-16 in 15:22 MSK
ASort($Array);
#-------------------------------------------------------------------------------
$TmpArray = array();
#-------------------------------------------------------------------------------
$Names = array('Name', 'IsActive', 'IsEvent', 'Valute', 'Course', 'Measure', 'IsCourseUpdate', 'MinimumPayment', 'MaximumPayment');
#-------------------------------------------------------------------------------
foreach ($Names as $Name) {
#-------------------------------------------------------------------------------
if (isset($Array[$Name])) {
#-------------------------------------------------------------------------------
$TmpArray[$Name] = $Array[$Name];
#-------------------------------------------------------------------------------
unset($Array[$Name]);
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$Array = $TmpArray + $Array;
#-------------------------------------------------------------------------------
#-----------------------------------------------------------------------------
static $Index = 1;
#-----------------------------------------------------------------------------
$Links =& Links();
#-----------------------------------------------------------------------------
$ConfigNames =& $Links['ConfigNames'];
#-----------------------------------------------------------------------------
$Node = new Tag('DIV', array('class' => 'Node'));
#-----------------------------------------------------------------------------
foreach (Array_Keys($Array) as $ElementID) {
#---------------------------------------------------------------------------
$Element = $Array[$ElementID];
#---------------------------------------------------------------------------
$ID = SPrintF('ID%06u', $Index++);
#---------------------------------------------------------------------------
$StringPath = Implode('/', $CurrentPath = Array_Merge($Path, array($ElementID)));
#---------------------------------------------------------------------------
if (isset($ConfigNames[$ElementID])) {
#-------------------------------------------------------------------------
$Item = Explode('|', $ConfigNames[$ElementID]);
#-------------------------------------------------------------------------
if (isset($ConfigNames[SPrintF('Prompt.%s', $ElementID)])) {
$ElementPrompt = $ConfigNames[SPrintF('Prompt.%s', $ElementID)];
}
#-------------------------------------------------------------------------
} else {
#-------------------------------------------------------------------------
if (!isset($ConfigNames[$StringPath])) {
continue;
}
#-------------------------------------------------------------------------
$Item = Explode('|', $ConfigNames[$StringPath]);
#-------------------------------------------------------------------------
if (isset($ConfigNames[SPrintF('Prompt.%s', $StringPath)])) {
$ElementPrompt = $ConfigNames[SPrintF('Prompt.%s', $StringPath)];
}
#-------------------------------------------------------------------------
}
#---------------------------------------------------------------------------
$ElementName = Current($Item);
#---------------------------------------------------------------------------
if (Count($Item) > 1) {
#-------------------------------------------------------------------------
$Type = Next($Item);
#-------------------------------------------------------------------------
switch ($Type) {
case 'select':
#---------------------------------------------------------------------
$Select = array();
#---------------------------------------------------------------------
$Options = Explode(',', Next($Item));
#---------------------------------------------------------------------
foreach ($Options as $Option) {
#-------------------------------------------------------------------
$Option = Explode('=', $Option);
#-------------------------------------------------------------------
$Select[Next($Option)] = Prev($Option);
}
#---------------------------------------------------------------------
$Comp = Comp_Load('Form/Select', array('onchange' => SPrintF("ConfigChange('%s',this.value);", $StringPath)), $Select, $Element);
if (Is_Error($Comp)) {
return ERROR | @Trigger_Error(500);
}
break;
default:
return ERROR | @Trigger_Error(101);
}
} else {
$Comp = new Tag('SPAN', array('class' => 'NodeParam', 'onclick' => SPrintF("Value = prompt('Значение1:',this.innerHTML.XMLUnEscape());if(Value != null){ ConfigChange('%s',Value); this.innerHTML = Value; }", $StringPath)), Is_Array($Element) ? '[EMPTY]' : ($Element == '' ? '[EMPTY]' : $Element));
}
#---------------------------------------------------------------------------
if (Is_Array($Element) && Count($Element)) {
#-------------------------------------------------------------------------
$Result = Config_Read($Element, $CurrentPath, $Level + 1);
#-------------------------------------------------------------------------
if ($Result) {
//.........这里部分代码省略.........
示例6: array
<?php
#-------------------------------------------------------------------------------
/** @author Великодный В.В. (Joonte Ltd.) */
/******************************************************************************/
/******************************************************************************/
$__args_list = array('Field', 'Time');
/******************************************************************************/
eval(COMP_INIT);
/******************************************************************************/
/******************************************************************************/
if (Is_Null($Time)) {
$Time = Time();
}
#-------------------------------------------------------------------------------
$Links = Links();
# Коллекция ссылок
$DOM =& $Links['DOM'];
#-------------------------------------------------------------------------------
if (!Comp_IsLoaded('jQuery/DatePicker')) {
#-----------------------------------------------------------------------------
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{others/jQuery/ui.core.js}')));
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript', 'src' => 'SRC:{others/jQuery/ui.datepicker.js}')));
#$DOM->AddChild('Head',new Tag('SCRIPT',Array('type'=>'text/javascript','src'=>'SRC:{others/jQuery/datepicker-ru.js}')));
#-------------------------------------------------------------------------------
#Debug(TemplateReplace('jQuery.DatePicker',Array(),FALSE));
$DOM->AddChild('Head', new Tag('SCRIPT', array('type' => 'text/javascript'), TemplateReplace('jQuery.DatePicker', array(), FALSE)));
#-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
$UniqID = UniqID();
示例7: intval
<?php
include_once "check.php";
$client = intval(Char_Cv('client', 'get'));
Links();
$from = Char_Cv('from', 'get');
$uid = Char_Cv('uid', 'get');
if (substr($userid, 0, 1) == '_') {
$user = array('username' => $guestname, 'face' => 'images/guest.gif');
} else {
$user = API_Info($userid);
}
if (substr($uid, 0, 1) == '_') {
$touser = array('uid' => $uid, 'username' => $guestname, 'face' => 'images/guest.gif');
} else {
$touser = API_Info($uid);
}
//print_r($touser);
if (!$touser) {
exit('<script>alert("此用户不存在");window.parent.FrameClose("' . $_GET["onezid"] . '")</script>');
}
@(include_once 'plugins/toolbar.php');
if (is_array($ONLOAD)) {
$ONLOAD = implode("\n", $ONLOAD);
}
if (is_array($SWFLOAD)) {
$SWFLOAD = implode(";", $SWFLOAD);
}
if (is_array($closeobj)) {
$closeobj = implode(";", $closeobj);
}