本文整理汇总了PHP中G::getUIDName方法的典型用法代码示例。如果您正苦于以下问题:PHP G::getUIDName方法的具体用法?PHP G::getUIDName怎么用?PHP G::getUIDName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G
的用法示例。
在下文中一共展示了G::getUIDName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_session_xmlforms
function get_session_xmlforms()
{
$cur = array_keys($_SESSION);
$res = '';
$colors = array('white', '#EEFFFF');
$colori = 0;
$count = 0;
//Get xmlforms in session
foreach ($cur as $key) {
$res .= '<div style="background-color:' . $colors[$colori] . ';">';
$xml = G::getUIDName($key, '');
if (strpos($xml, '.xml') !== false) {
$res .= '<i>FORM:</i> ' . $xml;
$colori = $colori ^ 1;
$count++;
}
$res .= '</div>';
}
//Get pagedTable in session
foreach ($cur as $key) {
$res .= '<div style="background-color:' . $colors[$colori] . ';">';
if (substr($key, 0, 11) === "pagedTable[") {
$xml = G::getUIDName(substr($key, 11, -1), '');
$res .= '<i>TABLE:</i> ' . $xml;
$colori = $colori ^ 1;
$count++;
}
$res .= '</div>';
}
return array("count" => $count, "html" => $res);
}
示例2: array
$aux1->value = '__error_session__';
$result = array();
$result[] = array('name' => 'PME_VALIDATE_NAME', 'content' => array('type' => 'hidden', 'options' => array(array('key' => '__error_session__', 'value' => '__error_session__'))), 'value' => '__error_session__');
die(Bootstrap::json_encode($result));
}
if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
return $RBAC_Response;
}
/*NEXT LINE: Runs any configuration defined to be executed before dependent fields recalc*/
if (isset($_SESSION['CURRENT_PAGE_INITILIZATION'])) {
eval($_SESSION['CURRENT_PAGE_INITILIZATION']);
}
//G::LoadSystem('json');
//require_once (PATH_THIRDPARTY . 'pear/json/class.json.php');
//$json = new Services_JSON();
$G_FORM = new form(G::getUIDName(urlDecode($_POST['form'])));
$G_FORM->id = urlDecode($_POST['form']);
$G_FORM->values = $_SESSION[$G_FORM->id];
G::LoadClass('xmlDb');
$file = G::decrypt($G_FORM->values['PME_A'], URL_KEY);
define('DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml');
define('DB_XMLDB_USER', '');
define('DB_XMLDB_PASS', '');
define('DB_XMLDB_NAME', '');
define('DB_XMLDB_TYPE', 'myxml');
$newValues = Bootstrap::json_decode(urlDecode(stripslashes($_POST['fields'])));
//Resolve dependencies
//Returns an array ($dependentFields) with the names of the fields
//that depends of fields passed through AJAX ($_GET/$_POST)
$dependentFields = array();
$aux = array();
示例3: getConditionCasesList
//.........这里部分代码省略.........
$c->add(
$c->getNewCriterion(
AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED'
)->addOr(
$c->getNewCriterion(
ApplicationPeer::APP_STATUS, 'COMPLETED'
)->addAnd(
$c->getNewCriterion(AppDelegationPeer::DEL_PREVIOUS, 0)
)
)
);
$c->add($c->getNewCriterion(ApplicationPeer::APP_UID, $aProcesses, Criteria::NOT_IN));
$c->addDescendingOrderByColumn(ApplicationPeer::APP_NUMBER);
break;
}
//select the xmlList to show
if ($sTypeList == 'gral') {
if ($RBAC->userCanAccess('PM_DELETECASE') == 1) {
$xmlfile = $filesList['Alldelete'];
} else {
$xmlfile = $filesList['all'];
}
} else {
$xmlfile = $filesList[$sTypeList];
}
if ($ClearSession) {
//OPCION_1: claening the $_SESSION and updating the List.... only case List
foreach ($filesList as $file) {
$id = G::createUID('', $file . '.xml');
unset($_SESSION['pagedTable[' . $id . ']']);
unset($_SESSION[$id]);
}
//OPTION_2: cleaning the $_SESSION and whole List and xmls
$cur = array_keys($_SESSION);
foreach ($cur as $key) {
if (substr($key, 0, 11) === "pagedTable[") {
unset($_SESSION[$key]);
} else {
$xml = G::getUIDName($key, '');
if (strpos($xml, '.xml') !== false) {
unset($_SESSION[$key]);
}
}
}
}
return array($c, $xmlfile);
}
示例4: array
return array();
}
if (!isset($G_FORM->fields[$grid]->fields[$k]->dependentFields)) {
return array();
}
$myDependentFields = $G_FORM->fields[$grid]->fields[$k]->dependentFields;
$myDependentFields = explode(',', $G_FORM->fields[$grid]->fields[$k]->dependentFields);
}
return $myDependentFields;
}
if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
return $RBAC_Response;
}
// the script responds an ajax request in order to check the dependent fields,
// and generate a json output of the values that the dependent field must have.
$sDynUid = G::getUIDName(urlDecode($_POST['DYN_UID']));
//$json = new Services_JSON();
$formValues = Bootstrap::json_decode($_POST['fields']);
$sFieldName = $_POST['fieldName'];
$sMasterField = '';
$sPath = PATH_DYNAFORM;
$G_FORM = new form($sDynUid, $sPath);
$aux = array();
$newValues = Bootstrap::json_decode(urlDecode(stripslashes($_POST['form'])));
if (isset($_POST['grid'])) {
$_POST['row'] = (int) $_POST['row'];
$aAux = array();
foreach ($newValues as $sKey => $newValue) {
$newValue = (array) $newValue;
$aKeys = array_keys($newValue);
$aValues = array();
示例5: testGetUIDName
/**
* @covers G::getUIDName
* @todo Implement testGetUIDName().
*/
public function testGetUIDName()
{
$uidTest001 = 'cDhpajRHQ2paUQ______';
$responseUID = G::getUIDName($uidTest001);
$this->assertEquals($responseUID, 'test' . '001');
}
示例6: define
define('DB_XMLDB_USER', '');
define('DB_XMLDB_PASS', '');
define('DB_XMLDB_NAME', '');
define('DB_XMLDB_TYPE', 'myxml');
/* End Block*/
}
require_once PATH_GULLIVER_HOME . 'methods/pagedTableAjax.php';
die;
G::LoadSystem('pagedTable');
G::LoadInclude('ajax');
$id = get_ajax_value('ptID');
$ntable = unserialize($_SESSION['pagedTable[' . $id . ']']);
$page = get_ajax_value('page');
$function = get_ajax_value('function');
if (isset($ntable->filterForm_Id) && $ntable->filterForm_Id !== '') {
$filterForm = new filterForm(G::getUIDName($ntable->filterForm_Id));
$filterForm->values = $_SESSION[$filterForm->id];
parse_str(urldecode(get_ajax_value('filter')), $newValues);
if (isset($newValues['form'])) {
$filterForm->setValues($newValues['form']);
$filter = array();
foreach ($filterForm->fields as $fieldName => $field) {
if ($field->dataCompareField !== '' && isset($newValues['form'][$fieldName])) {
$filter[$field->dataCompareField] = $filterForm->values[$fieldName];
}
$ntable->filterType[$field->dataCompareField] = $field->dataCompareType;
}
$ntable->filter = $filter;
//G::http_build_query($filter);
}
}
示例7: eval
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*NEXT LINE: Runs any configuration defined to be executed before dependent fields recalc*/
if (isset($_SESSION['CURRENT_PAGE_INITILIZATION'])) {
eval($_SESSION['CURRENT_PAGE_INITILIZATION']);
}
// G::LoadThirdParty('pear/json','class.json');
// $json=new Services_JSON();
if (!defined('XMLFORM_AJAX_PATH')) {
define('XMLFORM_AJAX_PATH', PATH_XMLFORM);
}
$_DBArray = array();
if (isset($_SESSION['_DBArray'])) {
$_DBArray = $_SESSION['_DBArray'];
}
$xmlFile = G::getUIDName(urlDecode($_POST['form']));
$sPath = XMLFORM_AJAX_PATH;
//if the xmlform file doesn't exist, then try with the plugins folders
if (!is_file(XMLFORM_AJAX_PATH . $xmlFile)) {
$aux = explode(PATH_SEP, $xmlFile);
//check if G_PLUGIN_CLASS is defined, because publisher can be called without an environment
if (count($aux) == 2 && defined('G_PLUGIN_CLASS')) {
$oPluginRegistry =& PMPluginRegistry::getSingleton();
if ($oPluginRegistry->isRegisteredFolder($aux[0])) {
$sPath = PATH_PLUGINS;
}
}
}
$G_FORM = new form($xmlFile, $sPath);
$G_FORM->id = urlDecode($_POST['form']);
$G_FORM->values = isset($_SESSION[$G_FORM->id]) ? $_SESSION[$G_FORM->id] : array();
示例8: prepareQuery
/**
* Function prepareQuery
*
* @author David S. Callizaya S. <davidsantos@colosa.com>
* @access public
* @param string $limitPage
* @return string
*/
public function prepareQuery($limitPage = false)
{
// process the QuickSearch string and add the fields and expression needed to run the search
if ($this->searchBy !== '') {
$aSB = explode('|', $this->searchBy);
//fields are separated by pipes
//subfilter
$subFilter = '';
foreach ($aSB as $sBy) {
$subFilter .= $subFilter !== '' ? ' OR ' : '';
//TODO: Get DATABASE type from Criteria, I think sql delimeter is needed too
$subFilter .= $sBy . ' LIKE "%' . G::sqlEscape($this->fastSearch) . '%"';
}
if ($subFilter !== '') {
//Get the first defined table in Criteria.
$aCurrentTables = $this->criteria->getTables();
if (isset($aCurrentTables[0])) {
$this->criteria->add($aCurrentTables[0] . ".*", '(' . $subFilter . ')', Criteria::CUSTOM);
}
}
}
//Merge sort array defined by USER with the array defined by SQL
parse_str($this->order, $orderFields);
parse_str($this->orderBy, $orderFields2);
//User sort is more important (first in merge).
$orderFields3 = array_merge($orderFields2, $orderFields);
//User sort is overwrites XMLs definition.
$orderFields = array_merge($orderFields3, $orderFields2);
//Order (BY SQL DEFINITION AND USER'S DEFINITION)
$this->aOrder = array();
$order = '';
foreach ($orderFields as $field => $fieldOrder) {
$field = G::getUIDName($field, '');
$fieldOrder = strtoupper($fieldOrder);
if ($fieldOrder === 'A') {
$fieldOrder = 'ASC';
}
if ($fieldOrder === 'D') {
$fieldOrder = 'DESC';
}
switch ($fieldOrder) {
case 'ASC':
case 'DESC':
if ($order !== '') {
$order .= ', ';
}
$order .= $field . ' ' . $fieldOrder;
$this->aOrder[$field] = $fieldOrder;
}
}
//master detail :O
if (count($this->masterdetail) > 0) {
$this->criteria->clearOrderByColumns();
foreach ($this->masterdetail as $idMasterDetail => $fieldMasterDetail) {
$this->criteria->addAscendingOrderByColumn($fieldMasterDetail);
}
}
if (!empty($this->aOrder)) {
if (count($this->masterdetail) <= 0) {
$this->criteria->clearOrderByColumns();
}
foreach ($this->aOrder as $field => $ascending) {
if ($ascending == 'ASC') {
$this->criteria->addAscendingOrderByColumn($field);
} else {
$this->criteria->addDescendingOrderByColumn($field);
}
}
}
/**
* Add limits
*/
$this->criteria->setLimit(0);
$this->criteria->setOffset(0);
if ($this->criteria->getDbName() == 'dbarray') {
$this->totRows = ArrayBasePeer::doCount($this->criteria);
} else {
$this->totRows = GulliverBasePeer::doCount($this->criteria);
}
$this->totPages = ceil($this->totRows / $this->rowsPerPage);
if ($limitPage) {
$this->criteria->setLimit($this->rowsPerPage);
$this->criteria->setOffset(($this->currentPage - 1) * $this->rowsPerPage);
}
return;
}
示例9: prepareQuery
//.........这里部分代码省略.........
$res['DBC_DATABASE'] = DB_NAME;
}
if (defined('DB_' . $this->sqlConnection . '_TYPE')) {
eval('$res[\'DBC_TYPE\'] = DB_' . $this->sqlConnection . '_TYPE;');
} else {
$res['DBC_TYPE'] = defined('DB_TYPE') ? DB_TYPE : 'mysql';
}
$this->dbc = new DBConnection($res['DBC_SERVER'], $res['DBC_USERNAME'], $res['DBC_PASSWORD'], $res['DBC_DATABASE'], $res['DBC_TYPE']);
} else {
$dbc = new DBConnection();
$dbs = new DBSession($dbc);
$res = $dbs->execute("select * from DB_CONNECTION WHERE DBC_UID=" . $this->sqlConnection);
$res = $res->read();
$this->dbc = new DBConnection($res['DBC_SERVER'], $res['DBC_USERNAME'], $res['DBC_PASSWORD'], $res['DBC_DATABASE']);
}
}
$this->ses = new DBSession($this->dbc);
//Query
//Filter
if (is_array($this->filter)) {
$filterFields = $this->filter;
} else {
parse_str($this->filter, $filterFields);
}
$this->aFilter = $filterFields;
$filter = '';
foreach ($filterFields as $field => $like) {
if ($like != '') {
if ($filter !== '') {
$filter .= ' AND ';
}
if (isset($this->filterType[$field])) {
switch ($this->filterType[$field]) {
case '=':
$filter .= $field . ' = "' . mysql_real_escape_string($like) . '"';
break;
case '<>':
$filter .= $field . ' <> "' . mysql_real_escape_string($like) . '"';
break;
case 'contains':
$filter .= $field . ' LIKE "%' . mysql_real_escape_string($like) . '%"';
break;
case 'like':
$filter .= $field . ' LIKE "' . mysql_real_escape_string($like) . '"';
break;
}
} else {
$filter .= $field . ' = "' . mysql_real_escape_string($like) . '"';
}
}
}
/*
* QuickSearch
*/
if ($this->searchBy !== '') {
$aSB = explode('|', $this->searchBy);
$subFilter = '';
foreach ($aSB as $sBy) {
$subFilter .= $subFilter !== '' ? ' OR ' : '';
$subFilter .= $sBy . ' LIKE "%' . G::sqlEscape($this->fastSearch, $this->dbc->type) . '%"';
}
if ($subFilter !== '') {
$filter .= $filter !== '' ? ' AND ' : '';
$filter .= '(' . $subFilter . ')';
}
}
//Merge sort array defined by USER with the array defined by SQL
parse_str($this->order, $orderFields);
parse_str($this->orderBy, $orderFields2);
//User sort is more important (first in merge).
$orderFields3 = array_merge($orderFields2, $orderFields);
//User sort is overwrites XMLs definition.
$orderFields = array_merge($orderFields3, $orderFields2);
//Order (BY SQL DEFINITION AND USER'S DEFINITION)
$this->aOrder = array();
$order = '';
foreach ($orderFields as $field => $fieldOrder) {
$field = G::getUIDName($field, '');
$fieldOrder = strtoupper($fieldOrder);
if ($fieldOrder === 'A') {
$fieldOrder = 'ASC';
}
if ($fieldOrder === 'D') {
$fieldOrder = 'DESC';
}
switch ($fieldOrder) {
case 'ASC':
case 'DESC':
if ($order !== '') {
$order .= ', ';
}
$order .= $field . ' ' . $fieldOrder;
$this->aOrder[$field] = $fieldOrder;
}
}
$this->sql = $this->sqlSelect . ($this->sqlWhere != '' || $filter != '' ? ' WHERE ' : '') . ($this->sqlWhere != '' ? '(' . $this->sqlWhere . ')' : '') . ($this->sqlWhere != '' && $filter != '' ? ' AND ' : '') . ($filter != '' ? '(' . $filter . ')' : '') . ($this->sqlGroupBy != '' ? ' GROUP BY ' . $this->sqlGroupBy : '') . ($order != '' ? ' ORDER BY ' . $order : '');
//$this->query=$this->ses->execute($this->sql);
//$this->totpages=ceil($this->query->count()/$this->rowsPerPage);
return;
}
示例10: count
$t->can_ok($obj, 'LoadClass', 'LoadClass()');
$t->can_ok($obj, 'LoadThirdParty', 'LoadThirdParty()');
$t->can_ok($obj, 'encryptlink', 'encryptlink()');
$t->is(G::encryptlink("normal url"), "normal url", 'encryptlink() normal url');
$t->todo('more tests with encryplink and remove ENABLE_ENCRYPT dependency');
$t->can_ok($obj, 'parseURI', 'parseURI()');
G::parseURI("http:/192.168.0.9/sysos/en/wf5/login/login/abc?ab=123&bc=zy");
$t->todo('more tests with parseURI');
$t->can_ok($obj, 'streamFile', 'streamFile()');
$t->can_ok($obj, 'sendHeaders', 'sendHeaders()');
$t->todo('more tests with sendHeaders');
$t->can_ok($obj, 'virtualURI', 'virtualURI()');
$t->can_ok($obj, 'createUID', 'createUID()');
$t->is(G::createUID('directory', 'filename'), 'bDh5aTBaUG5vNkxwMnByWjJxT2EzNVk___', 'createUID() normal');
$t->can_ok($obj, 'getUIDName', 'getUIDName()');
$t->is(G::getUIDName('bDh5aTBaUG5vNkxwMnByWjJxT2EzNVk___', '12345678901234567890'), false, 'getUIDName() normal?');
$t->can_ok($obj, 'formatNumber', 'formatNumber()');
$t->is(G::formatNumber('100000'), '100000', 'formatNumber() normal');
$t->todo('is useful the function formatNumber??');
$t->can_ok($obj, 'formatDate', 'formatDate()');
$t->is(G::formatDate('2001-02-29'), '2001-02-29', 'formatDate() ');
$t->is(G::formatDate('2001-02-29', 'F d, Y'), 'Februar01 29, 2001', 'formatDate() ');
//is not working
$t->is(G::formatDate('2001-02-29', 'd.m.Y'), '29.02.2001', 'formatDate() ');
$t->todo(" the month literal text is defined here!! ");
$t->todo('review all methods in class G');
$i = 1;
$t->diag('class G');
$t->is(count($methods), 95, "class database " . count($methods) . " methods.");
$t->is($methods[0], 'is_https', $i++ . ' is_https');
$t->is($methods[1], 'array_fill_value', $i++ . ' array_fill_value');