コード例 #1
0
ファイル: Plugin.php プロジェクト: Dolfanuk55/Kingdoms
 /**
  * 
  * Constructor.
  * 
  * @access public
  * 
  */
 function Savant2_Plugin($conf = array())
 {
     settype($conf, 'array');
     foreach ($conf as $key => $val) {
         $this->{$key} = $val;
     }
 }
コード例 #2
0
 /**
  * 编辑用户组
  */
 public function editAction()
 {
     list($gid, $category, $isManage) = $this->getInput(array('gid', 'category', 'manage'), 'get');
     settype($isManage, 'boolean');
     //权限分类
     $topLevelCategories = $this->_getPermissionService()->getTopLevelCategories($isManage);
     $category or $category = key($topLevelCategories);
     $permissionConfigs = $topLevelCategoryClasses = array();
     foreach ($topLevelCategories as $k => $v) {
         $topLevelCategoryClasses[$k] = $category == $k ? ' class="current"' : '';
         //TODO
         $permissionConfigs[$k] = $this->_getPermissionService()->getPermissionConfigByCategory($gid, $k);
     }
     //group info
     $group = $this->_getGroupDs()->getGroupByGid($gid);
     $groupTypes = $isManage ? array('system', 'special') : array('member', 'default', 'system', 'special');
     $groups = array();
     foreach ($groupTypes as $v) {
         $groups += $this->_getGroupDs()->getGroupsByTypeInUpgradeOrder($v);
     }
     $this->setOutput($groups, 'groups');
     $this->setOutput($gid, 'gid');
     $this->setOutput($isManage, 'isManage');
     $this->setOutput($category, 'category');
     $this->setOutput($group, 'group');
     $this->setOutput($topLevelCategoryClasses, 'topLevelCategoryClasses');
     $this->setOutput($topLevelCategories, 'topLevelCategories');
     $this->setOutput($permissionConfigs, 'permissionConfigs');
 }
コード例 #3
0
 /**
  * Iterator function. Returns a rowset if called without parameter,
  * the fields contents if a field is specified or FALSE to indicate
  * no more rows are available.
  *
  * @param   string field default NULL
  * @return  var
  */
 public function next($field = NULL)
 {
     if (!is_resource($this->handle) || FALSE === ($row = mssql_fetch_assoc($this->handle))) {
         return FALSE;
     }
     foreach ($row as $key => $value) {
         if (NULL === $value || !isset($this->fields[$key])) {
             continue;
         }
         switch ($this->fields[$key]) {
             case 'datetime':
                 $row[$key] = Date::fromString($value, $this->tz);
                 break;
             case 'numeric':
                 if (FALSE !== strpos($value, '.')) {
                     settype($row[$key], 'double');
                     break;
                 }
                 // Fallthrough intentional
             case 'int':
                 if ($value <= LONG_MAX && $value >= LONG_MIN) {
                     settype($row[$key], 'integer');
                 } else {
                     settype($row[$key], 'double');
                 }
                 break;
         }
     }
     if ($field) {
         return $row[$field];
     } else {
         return $row;
     }
 }
    function content_5507f549f120e0_03576615($_smarty_tpl)
    {
        ?>
<section>
	<?php 
        if ($_smarty_tpl->tpl_vars['role']->value == 'admin') {
            ?>
	<h1>Moje zamówienia</h1>
	<table cellspacing="10px">
		<th>nr zamówienia</th>
		<th>data zamówienia</th>
		<th>ilość produktów</th>
		<th>cena</th>
	<?php 
            $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['p']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['order_tab']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value) {
                $_smarty_tpl->tpl_vars['p']->_loop = true;
                ?>
	
		
				<tr>
				<td><?php 
                echo $_smarty_tpl->tpl_vars['p']->value['id_order'];
                ?>
 </td>
				<td><?php 
                echo $_smarty_tpl->tpl_vars['p']->value['date'];
                ?>
 </td>
				<td><?php 
                echo $_smarty_tpl->tpl_vars['p']->value['amount_of_products'];
                ?>
 </td>
				<td><?php 
                echo $_smarty_tpl->tpl_vars['p']->value['value'];
                ?>
 </td>
				<td><a href="admin/order_detail/<?php 
                echo $_smarty_tpl->tpl_vars['p']->value['id_order'];
                ?>
">Pokaż szczegóły</a></td> 
				</tr>
	<?php 
            }
            ?>
	</table>
	<?php 
        } else {
            ?>
	<meta http-equiv="refresh" content="0; URL=index.php">
	<?php 
        }
        ?>
</section><?php 
    }
    function content_561f47a1b51574_17477137($_smarty_tpl)
    {
        ?>


	<?php 
        $_smarty_tpl->tpl_vars['one_day'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['one_day']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['days_datas']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['one_day']->key => $_smarty_tpl->tpl_vars['one_day']->value) {
            $_smarty_tpl->tpl_vars['one_day']->_loop = true;
            ?>
	<p>
		<strong class="dark"><?php 
            echo smartyTranslate(array('s' => $_smarty_tpl->tpl_vars['one_day']->value['day']), $_smarty_tpl);
            ?>
: </strong> &nbsp;<span><?php 
            echo $_smarty_tpl->tpl_vars['one_day']->value['hours'];
            ?>
</span>
	</p>
	<?php 
        }
        ?>

<?php 
    }
    function content_55d7ea60b9e494_00271329($_smarty_tpl)
    {
        if (!is_callable('smarty_function_link')) {
            include 'F:\\chengshuang\\php\\ejw\\system\\plugins/smarty\\function.link.php';
        }
        ?>
 
<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['data']->value['article'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            ?>
<li><a target='_blank' href="<?php 
            echo smarty_function_link(array('ctl' => 'content:detail', 'arg0' => $_smarty_tpl->tpl_vars['item']->value['article_id']), $_smarty_tpl);
            ?>
" title="<?php 
            echo $_smarty_tpl->tpl_vars['item']->value['title'];
            ?>
" target="_blank"><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['title'];
            ?>
</a></li>
<?php 
        }
    }
    function content_5613b5e1523ee0_49514392($_smarty_tpl)
    {
        if (count($_smarty_tpl->tpl_vars['infos']->value) > 0) {
            ?>
<!-- MODULE Block cmsinfo -->
<div id="cmsinfo_block">
		<?php 
            $_smarty_tpl->tpl_vars['info'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['info']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['infos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['info']->key => $_smarty_tpl->tpl_vars['info']->value) {
                $_smarty_tpl->tpl_vars['info']->_loop = true;
                ?>
			<div class="col-xs-6"><?php 
                echo $_smarty_tpl->tpl_vars['info']->value['text'];
                ?>
</div>
		<?php 
            }
            ?>
</div>
<!-- /MODULE Block cmsinfo -->
<?php 
        }
    }
    function content_56755e7c23f3c($_smarty_tpl)
    {
        ?>
<div class="detailViewInfo"><table class="table table-bordered equalSplit detailview-table" style="table-layout:fixed"><?php 
        $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = false;
        $_smarty_tpl->tpl_vars['FIELD_NAME'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['RECORD_STRUCTURE']->value['TOOLTIP_FIELDS'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['smarty']->value['foreach']['fieldsCount']['index'] = -1;
        foreach ($_from as $_smarty_tpl->tpl_vars['FIELD_MODEL']->key => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value) {
            $_smarty_tpl->tpl_vars['FIELD_MODEL']->_loop = true;
            $_smarty_tpl->tpl_vars['FIELD_NAME']->value = $_smarty_tpl->tpl_vars['FIELD_MODEL']->key;
            $_smarty_tpl->tpl_vars['smarty']->value['foreach']['fieldsCount']['index']++;
            if ($_smarty_tpl->getVariable('smarty')->value['foreach']['fieldsCount']['index'] < 7) {
                ?>
<tr><td class="fieldLabel narrowWidthType" nowrap><label class="muted"><?php 
                echo vtranslate($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->get('label'), $_smarty_tpl->tpl_vars['MODULE']->value);
                ?>
</label></td><td class="fieldValue narrowWidthType"><span class="value"><?php 
                echo $_smarty_tpl->getSubTemplate(vtemplate_path($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getUITypeModel()->getDetailViewTemplateName(), $_smarty_tpl->tpl_vars['MODULE_NAME']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('FIELD_MODEL' => $_smarty_tpl->tpl_vars['FIELD_MODEL']->value, 'USER_MODEL' => $_smarty_tpl->tpl_vars['USER_MODEL']->value, 'MODULE' => $_smarty_tpl->tpl_vars['MODULE_NAME']->value, 'RECORD' => $_smarty_tpl->tpl_vars['RECORD']->value), 0);
                ?>
</span></td></tr><?php 
            }
        }
        ?>
</table></div>
<?php 
    }
    function content_5598e703ef0372_76137591($_smarty_tpl)
    {
        ?>
<div class="panel kpi-container">
	<div class="row">
		<?php 
        $_smarty_tpl->tpl_vars['kpi'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['kpi']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['kpis']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['kpi']->key => $_smarty_tpl->tpl_vars['kpi']->value) {
            $_smarty_tpl->tpl_vars['kpi']->_loop = true;
            ?>
		<div class="col-sm-6 col-lg-3">
			<?php 
            echo $_smarty_tpl->tpl_vars['kpi']->value;
            ?>

		</div>			
		<?php 
        }
        ?>
	</div>
</div><?php 
    }
コード例 #10
0
ファイル: paginacion.php プロジェクト: heladiofog/tienda0mx
 public function generaPaginacion($totalRows, $back, $next, $url, $class = "")
 {
     settype($totalRows, "integer");
     $this->totalRows = $totalRows;
     $this->lassLink = $class;
     $this->url = $url;
     $this->numPages = ceil($totalRows / $this->quantity);
     if ($this->page > 0) {
         $this->puri = $this->page - 1;
         //echo "<a href='".$this->url."page=".$this->puri."'>".$back."</a>";
         echo "<a href='" . $this->url . $this->puri . "' class='avance'>\n\t\t\t\t\t  <div class='triangulo-azul-izq'></div>Anterior\n\t\t\t      </a>";
     }
     echo "<div class='pleca-vertical'></div>\n\t\t\t      <div class='texto-pagina'>Página:</div>";
     if ($this->numPages > 1) {
         for ($i = 0; $i < $this->numPages; $i++) {
             if ($i == $this->page) {
                 echo "<span class='actual'>" . ($i + 1) . "</span>";
             } elseif ($i == $this->page + 1 || $i == $this->page + 2 || $i == $this->page - 1 || $i == $this->page - 2) {
                 //$page + 1, $page +2 son los numeros que se desea ver por delante del actual
                 //$page -1, $page -2 son los numeros (Links) a ver por detras del actual
                 //Esto se puede modificar como se desee
                 echo " <a class='avance padding-texto' href='" . $this->url . $i . "'>" . ($i + 1) . "</a>";
             } elseif ($i == $this->page - 3) {
                 //echo "<div style='float: left'>..</div>";
             } elseif ($i == $this->page + 3) {
                 //echo "<div style='float: left'>..</div>";
             }
         }
     }
     echo "<div class='pleca-vertical'></div>";
     if ($this->page < $this->numPages - 1) {
         $this->puri = $this->page + 1;
         echo "<a href='" . $this->url . $this->puri . "'><div class='avance'>Siguiente</div><div class='triangulo-azul-der'></div></a>";
     }
 }
コード例 #11
0
ファイル: TypeValueConverter.php プロジェクト: idr0id/papper
 public function convert($value)
 {
     if (!settype($value, $this->type)) {
         throw new ValueConverterException('Converting %s to type ');
     }
     return $value;
 }
    function content_548e78e437efc6_19597833($_smarty_tpl)
    {
        ?>
<ul class="ow_console_lang">
    <?php 
        $_smarty_tpl->tpl_vars["language"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["language"]->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['languages']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["language"]->key => $_smarty_tpl->tpl_vars["language"]->value) {
            $_smarty_tpl->tpl_vars["language"]->_loop = true;
            ?>
        <li class="ow_console_lang_item" onclick="location.href='<?php 
            echo $_smarty_tpl->tpl_vars['language']->value['url'];
            ?>
';"><span class="<?php 
            echo $_smarty_tpl->tpl_vars['language']->value['class'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['language']->value['label'];
            ?>
</span></li>
    <?php 
        }
        ?>
</ul><?php 
    }
    function content_5608824d277c26_21258064($_smarty_tpl)
    {
        ?>
<div class="box">
	<div class="box-header">
		<h3 class="box-title">Lista de servicios</h3>
	</div><!-- /.box-header -->
	<div class="box-body">
		<table id="btlServicios" class="table table-bordered table-hover">
			<thead>
				<tr>
					<th>#</th>
					<th>Nombre</th>
					<th>Tipo</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
				<?php 
        $_smarty_tpl->tpl_vars["row"] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars["row"]->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['lista']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars["row"]->key => $_smarty_tpl->tpl_vars["row"]->value) {
            $_smarty_tpl->tpl_vars["row"]->_loop = true;
            ?>
					<tr>
						<td><?php 
            echo $_smarty_tpl->tpl_vars['row']->value['idServicio'];
            ?>
</td>
						<td><?php 
            echo $_smarty_tpl->tpl_vars['row']->value['nombre'];
            ?>
</td>
						<td><?php 
            echo $_smarty_tpl->tpl_vars['row']->value['descripcion'];
            ?>
</td>
						<td style="text-align: right">
							<button type="button" class="btn btn-success btn-circle" action="modificar" title="Modificar" datos='<?php 
            echo $_smarty_tpl->tpl_vars['row']->value['json'];
            ?>
'><i class="fa fa-pencil"></i></button>
							<button type="button" class="btn btn-danger btn-circle" action="eliminar" title="Eliminar" identificador="<?php 
            echo $_smarty_tpl->tpl_vars['row']->value['idServicio'];
            ?>
"><i class="fa fa-times"></i></button>
						</td>
					</tr>
				<?php 
        }
        ?>
			</tbody>
		</table>
	</div>
</div><?php 
    }
コード例 #14
0
 public function SaveConfig($sMode)
 {
     $this->Security_ValidateSendForm();
     $aConfigSet = array();
     foreach ($this->aFields[$sMode] as $sName => $aField) {
         if ($aField['type'] != 'section') {
             $aConfigField['key'] = 'config.all.' . $aField['config'];
             if (!isset($_POST[$sName]) || !$_POST[$sName]) {
                 if (isset($aField['empty'])) {
                     $aConfigField['val'] = $aField['empty'];
                 } else {
                     if ($aField['valtype'] == 'boolean') {
                         $val = false;
                     } else {
                         $val = '';
                     }
                 }
             } else {
                 $val = $_POST[$sName];
                 settype($val, $aField['valtype']);
             }
             $aConfigField['val'] = serialize($val);
             $aConfigSet[] = $aConfigField;
         }
     }
     $sDataFile = $this->PluginAceadminpanel_Admin_GetCustomConfigFile();
     if ($this->PluginAceAdminPanel_Admin_SetValueArray($aConfigSet)) {
         $aConfigSet = $this->PluginAceAdminPanel_Admin_GetValueArrayByPrefix('config.all.');
         file_put_contents($sDataFile, serialize($aConfigSet));
         $this->oAdminAction->Message('notice', $this->Lang_Get('adm_saved_ok'), null, true);
     } else {
         $this->oAdminAction->Message('error', $this->Lang_Get('adm_saved_err'), null, true);
     }
     admHeaderLocation(Router::GetPath('admin') . 'site/settings/' . $this->sMenuNavItemSelect);
 }
コード例 #15
0
 /**
  * Basic sanitisation of request input data.
  * Ensures that all expected arguments are present and of the correct data type.
  * Removes any arguments from the array that were not expected.
  * @param $args array Would normally be $_REQUEST, $_POST or similar.
  */
 public function populateArgs($args)
 {
     unset($args['module']);
     //once we're here we know what module & lib we're in, so can drop those args.
     unset($args['lib']);
     $expected = $this->expectedArgs();
     $expected['paGame'] = array('default' => paConfig::getGame());
     $this->args = $args;
     //compare args we've been given with the ones we expect.
     //drop any args we weren't expecting.
     foreach (array_keys($this->args) as $key) {
         if (!isset($expected[$key])) {
             unset($this->args[$key]);
         }
     }
     //and for the ones we are expecting, make sure they meet expectations.
     foreach ($expected as $key => $props) {
         $defvalue = $this->defaultValue($props);
         $deftype = $this->defaultType($props);
         if (!isset($this->args[$key])) {
             $this->args[$key] = $defvalue;
         }
         if ($deftype && isset($this->args[$key])) {
             settype($this->args[$key], $deftype);
         }
         $this->validateArg($key, $props);
     }
     if (count($this->errorData)) {
         throw new paException('Invalid arguments', $this->errorData);
     }
 }
コード例 #16
0
 function run()
 {
     if (!reason_user_has_privs($this->admin_page->user_id, 'view_sensitive_data')) {
         echo '<p>Sorry; use of this module is restricted.</p>' . "\n";
         return;
     }
     if (!empty($this->admin_page->request['entity_id_test'])) {
         $id = $this->admin_page->request['entity_id_test'];
         settype($id, 'integer');
     }
     if (empty($id)) {
         $id = '';
     }
     echo '<form method="get" action="?"><label for="entity_id_test">Entity ID:</label> <input type="text" name="entity_id_test" id="entity_id_test" value="' . $id . '"/><input type="submit" value="submit" /><input type="hidden" name="cur_module" value="EntityInfo" /></form>';
     if (!empty($id)) {
         $entity = new entity($id);
         if ($entity->get_values()) {
             echo '<div class="EntityInfo">' . "\n";
             $this->show_entity_header($entity);
             $this->show_entity_data($entity);
             $this->show_pages($entity);
             $this->show_borrowing_sites($entity);
             $this->show_entity_relationships($entity);
             echo '</div>' . "\n";
         } else {
             echo '<p>The Reason ID ' . $id . ' does not belong to a real entity. It may have been deleted.</p>';
         }
     }
 }
    function content_5693fa20d5f683_88999472($_smarty_tpl)
    {
        $_smarty_tpl->properties['nocache_hash'] = '13263650635693fa20d4afd9_80237546';
        ?>
<section class="jumbotron newItem" id="gynimas"> <h2><?php 
        echo smarty_function_translation(array('langId' => "82"), $_smarty_tpl);
        ?>
<h2> <hr> <?php 
        $_from = $_smarty_tpl->tpl_vars['gynimas']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
        foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            $foreach_item_Sav = $_smarty_tpl->tpl_vars['item'];
            ?>
 <?php 
            echo $_smarty_tpl->tpl_vars['item']->value[$_smarty_tpl->tpl_vars['lang']->value];
            ?>
 <?php 
            $_smarty_tpl->tpl_vars['item'] = $foreach_item_Sav;
        }
        ?>
  </section><?php 
    }
    function content_5625eac6372188_59251944($_smarty_tpl)
    {
        ?>
<select name="pageselect" onchange="self.location.href=options[selectedIndex].value" >
 
 <option>友情链接</option>	

	<?php 
        $_smarty_tpl->tpl_vars['link'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['link']->_loop = false;
        $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['_links']->value['links'];
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['link']->key => $_smarty_tpl->tpl_vars['link']->value) {
            $_smarty_tpl->tpl_vars['link']->_loop = true;
            $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['link']->key;
            ?>
	 <option value="<?php 
            echo $_smarty_tpl->tpl_vars['link']->value['link'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['link']->value['title'];
            ?>
</option>	
	<?php 
        }
        ?>

 </select>

<?php 
    }
コード例 #19
0
 public function __call($method, $arguments)
 {
     $dom = new DOMDocument('1.0', 'UTF-8');
     $element = $dom->createElement('method');
     $element->setAttribute('name', $method);
     foreach ($arguments as $argument) {
         $child = $dom->createElement('argument');
         $textNode = $dom->createTextNode($argument);
         $child->appendChild($textNode);
         $element->appendChild($child);
     }
     $dom->appendChild($element);
     $data = 'service=' . $dom->saveXML();
     $params = array('http' => array('method' => 'POST', 'content' => $data));
     $ctx = stream_context_create($params);
     $fp = @fopen($this->server, 'rb', false, $ctx);
     if (!$fp) {
         throw new Exception('Problem with URL');
     }
     $response = @stream_get_contents($fp);
     if ($response === false) {
         throw new Exception("Problem reading data from {$this->server}");
     }
     $dom = new DOMDocument(null, 'UTF-8');
     $dom->loadXML($response);
     $result = $dom->childNodes->item(0)->childNodes->item(0)->nodeValue;
     $type = $dom->childNodes->item(0)->childNodes->item(1)->nodeValue;
     settype($result, $type);
     return $result;
 }
    function content_56a2061eefba2($_smarty_tpl)
    {
        ?>
<span class="span2"><img src="<?php 
        echo vimage_path('summary_organizations.png');
        ?>
" class="summaryImg" /></span><span class="span8 margin0px"><span class="row-fluid"><span class="recordLabel font-x-x-large textOverflowEllipsis span8 pushDown" title="<?php 
        echo $_smarty_tpl->tpl_vars['RECORD']->value->getName();
        ?>
"><?php 
        $_smarty_tpl->tpl_vars['NAME_FIELD'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['NAME_FIELD']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getNameFields();
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['NAME_FIELD']->key => $_smarty_tpl->tpl_vars['NAME_FIELD']->value) {
            $_smarty_tpl->tpl_vars['NAME_FIELD']->_loop = true;
            $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getField($_smarty_tpl->tpl_vars['NAME_FIELD']->value), null, 0);
            if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getPermissions()) {
                ?>
<span class="<?php 
                echo $_smarty_tpl->tpl_vars['NAME_FIELD']->value;
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['RECORD']->value->get($_smarty_tpl->tpl_vars['NAME_FIELD']->value);
                ?>
</span>&nbsp;<?php 
            }
        }
        ?>
</span></span></span><?php 
    }
    function content_5355649cdbb1a6_08530923($_smarty_tpl)
    {
        ?>
<div id="container" class="row">
	<div class="sidebar navigation col-md-3">
		<nav class="list-group categorieList">
		<?php 
        if (count($_smarty_tpl->tpl_vars['modules']->value)) {
            ?>
			<?php 
            $_smarty_tpl->tpl_vars['module'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['module']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['modules']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['module']->key => $_smarty_tpl->tpl_vars['module']->value) {
                $_smarty_tpl->tpl_vars['module']->_loop = true;
                ?>
				<?php 
                if ($_smarty_tpl->tpl_vars['module_instance']->value[$_smarty_tpl->tpl_vars['module']->value['name']]) {
                    ?>
					<a class="list-group-item<?php 
                    if ($_smarty_tpl->tpl_vars['current_module_name']->value && $_smarty_tpl->tpl_vars['current_module_name']->value == $_smarty_tpl->tpl_vars['module']->value['name']) {
                        ?>
 active<?php 
                    }
                    ?>
" href="<?php 
                    echo $_smarty_tpl->tpl_vars['current']->value;
                    ?>
&amp;token=<?php 
                    echo $_smarty_tpl->tpl_vars['token']->value;
                    ?>
&amp;module=<?php 
                    echo $_smarty_tpl->tpl_vars['module']->value['name'];
                    ?>
"><?php 
                    echo $_smarty_tpl->tpl_vars['module_instance']->value[$_smarty_tpl->tpl_vars['module']->value['name']]->displayName;
                    ?>
</a>
				<?php 
                }
                ?>
			<?php 
            }
            ?>
		<?php 
        } else {
            ?>
			<?php 
            echo smartyTranslate(array('s' => 'No module has been installed.'), $_smarty_tpl);
            ?>

		<?php 
        }
        ?>
		</nav>
	</div><?php 
    }
    function content_56e17f0a60d839_92488196($_smarty_tpl)
    {
        if (count($_smarty_tpl->tpl_vars['infos']->value) > 0) {
            ?>

<!-- MODULE Block cmsinfo -->
<div id="cmsinfo_block" class="col-xs-8" >
<div class="clearfix row">
		<?php 
            $_smarty_tpl->tpl_vars['info'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['info']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['infos']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['info']->key => $_smarty_tpl->tpl_vars['info']->value) {
                $_smarty_tpl->tpl_vars['info']->_loop = true;
                ?>
			<div class="col-xs-6"><div class="cmsinfo_block_inset"><?php 
                echo $_smarty_tpl->tpl_vars['info']->value['text'];
                ?>
</div></div>
		<?php 
            }
            ?>
</div>
</div>
<!-- /MODULE Block cmsinfo -->
<?php 
        }
    }
コード例 #23
0
 /**
  * Initialise the special page list
  * This must be called before accessing SpecialPage::$mList
  *
  * @return array
  */
 static function getList()
 {
     global $wgSpecialPages;
     global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
     global $wgEnableEmail;
     if (!is_object(self::$mList)) {
         wfProfileIn(__METHOD__);
         if (!$wgDisableCounters) {
             self::$mList['Popularpages'] = 'PopularpagesPage';
         }
         if (!$wgDisableInternalSearch) {
             self::$mList['Search'] = 'SpecialSearch';
         }
         if ($wgEmailAuthentication) {
             self::$mList['Confirmemail'] = 'EmailConfirmation';
             self::$mList['Invalidateemail'] = 'EmailInvalidation';
         }
         if ($wgEnableEmail) {
             self::$mList['ChangeEmail'] = 'SpecialChangeEmail';
         }
         // Add extension special pages
         self::$mList = array_merge(self::$mList, $wgSpecialPages);
         // Run hooks
         // This hook can be used to remove undesired built-in special pages
         wfRunHooks('SpecialPage_initList', array(&self::$mList));
         // Cast to object: func()[$key] doesn't work, but func()->$key does
         settype(self::$mList, 'object');
         wfProfileOut(__METHOD__);
     }
     return self::$mList;
 }
    function content_51f3d35eb14c94_39049449($_smarty_tpl)
    {
        ?>
<h3><?php 
        echo $_smarty_tpl->tpl_vars['searchresultsfor']->value;
        ?>
 &quot;<?php 
        echo $_smarty_tpl->tpl_vars['phrase']->value;
        ?>
&quot;</h3>
<?php 
        if ($_smarty_tpl->tpl_vars['itemcount']->value > 0) {
            ?>
<ul>
  <?php 
            $_smarty_tpl->tpl_vars['entry'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['entry']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['results']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['entry']->key => $_smarty_tpl->tpl_vars['entry']->value) {
                $_smarty_tpl->tpl_vars['entry']->_loop = true;
                ?>
  <li><?php 
                echo $_smarty_tpl->tpl_vars['entry']->value->title;
                ?>
 - <a href="<?php 
                echo $_smarty_tpl->tpl_vars['entry']->value->url;
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['entry']->value->urltxt;
                ?>
</a> (<?php 
                echo $_smarty_tpl->tpl_vars['entry']->value->weight;
                ?>
%)</li>
  
  <?php 
            }
            ?>
</ul>

<p><?php 
            echo $_smarty_tpl->tpl_vars['timetaken']->value;
            ?>
: <?php 
            echo $_smarty_tpl->tpl_vars['timetook']->value;
            ?>
</p>
<?php 
        } else {
            ?>
  <p><strong><?php 
            echo $_smarty_tpl->tpl_vars['noresultsfound']->value;
            ?>
</strong></p>
<?php 
        }
    }
    function content_536dd2ec23a7a1_81066429($_smarty_tpl)
    {
        ?>
<td valign="top">
<a href="registerForm.php"><img src="<?php 
        echo $_smarty_tpl->tpl_vars['sitefolder']->value;
        ?>
/images/new.gif" alt="Добавить пользователя"></a><br>
<?php 
        $_smarty_tpl->tpl_vars['elem'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['elem']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['data']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['elem']->key => $_smarty_tpl->tpl_vars['elem']->value) {
            $_smarty_tpl->tpl_vars['elem']->_loop = true;
            echo $_smarty_tpl->tpl_vars['elem']->value['login'];
            ?>
 <a href="registerForm.php?id=<?php 
            echo $_smarty_tpl->tpl_vars['elem']->value['id'];
            ?>
">[Редактировать]</a> <a href="deleteUser.php?id=<?php 
            echo $_smarty_tpl->tpl_vars['elem']->value['id'];
            ?>
">[Удалить]</a><br>
<?php 
        }
        ?>
</td>

<?php 
    }
コード例 #26
0
function DataRows($FileName, &$Tests, &$Langs, &$Incl, &$Excl, $HasHeading = TRUE)
{
    $data = array();
    $previous = 'not set';
    $test_rows = array();
    $lines = @file($FileName) or die('Cannot open $FileName');
    if ($HasHeading) {
        unset($lines[0]);
    }
    // remove header line
    foreach ($lines as $line) {
        $row = explode(',', $line);
        $test = $row[DATA_TEST];
        $lang = $row[DATA_LANG];
        $key = $test . $lang . $row[DATA_ID];
        // accumulate all acceptable datarows, exclude duplicates
        if (isset($Incl[$test]) && isset($Incl[$lang]) && isset($Langs[$lang]) && !isset($Excl[$key])) {
            if ($previous != $test) {
                // assume ndata.csv is sorted by test
                $data = FastestRows($test_rows, $data);
                $test_rows = array();
            }
            $previous = $test;
            settype($row[DATA_STATUS], 'integer');
            settype($row[DATA_TESTVALUE], 'integer');
            $testvalue = $row[DATA_TESTVALUE];
            settype($row[DATA_TIME], 'double');
            if ($row[DATA_STATUS] == 0) {
                $test_rows[$lang][] = $row;
            }
        }
    }
    $data = FastestRows($test_rows, $data);
    return $data;
}
コード例 #27
0
ファイル: DevValue.php プロジェクト: bluefission/DevElation
 public function __construct($value = null)
 {
     $this->_data = $value;
     if ($this->_type) {
         settype($this->_data, $this->_type);
     }
 }
コード例 #28
0
ファイル: Text.php プロジェクト: vspvt/kohana-helpers
 /**
  * @param      $value
  * @param      $type
  * @param bool $nullable
  *
  * @return mixed
  */
 public static function setType($value, $type, $nullable = TRUE)
 {
     if (!$nullable || NULL !== $value) {
         settype($value, $type);
     }
     return $value;
 }
    function content_56655ccb038d51_05727181($_smarty_tpl)
    {
        ?>
<div class="tree-actions pull-right">
	<?php 
        if (isset($_smarty_tpl->tpl_vars['actions']->value)) {
            ?>
	<?php 
            $_smarty_tpl->tpl_vars['action'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['action']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['actions']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['action']->key => $_smarty_tpl->tpl_vars['action']->value) {
                $_smarty_tpl->tpl_vars['action']->_loop = true;
                ?>
		<?php 
                echo $_smarty_tpl->tpl_vars['action']->value->render();
                ?>

	<?php 
            }
            ?>
	<?php 
        }
        ?>
</div><?php 
    }
コード例 #30
0
ファイル: functions.php プロジェクト: pombredanne/ArcherSys
/**
* set_var
*
* Set variable, used by {@link request_var the request_var function}
*
* @access private
*/
function set_var(&$result, $var, $type, $multibyte = false)
{
	settype($var, $type);
	$result = $var;

	if ($type == 'string')
	{
		$result = trim(htmlspecialchars(str_replace(array("\r\n", "\r"), array("\n", "\n"), $result), ENT_COMPAT, 'UTF-8'));

		if (!empty($result))
		{
			// Make sure multibyte characters are wellformed
			if ($multibyte)
			{
				if (!preg_match('/^./u', $result))
				{
					$result = '';
				}
			}
			else
			{
				// no multibyte, allow only ASCII (0-127)
				$result = preg_replace('/[\x80-\xFF]/', '?', $result);
			}
		}

		$result = (STRIP) ? stripslashes($result) : $result;
	}
}