diff --git a/gulliver/system/class.dynaformhandler.php b/gulliver/system/class.dynaformhandler.php
index 8bed6efc0..287adc7bb 100755
--- a/gulliver/system/class.dynaformhandler.php
+++ b/gulliver/system/class.dynaformhandler.php
@@ -84,13 +84,10 @@ class dynaFormHandler
* @return void
*/
function __cloneEmpty()
- {
- //$cloneObj = clone $this;
- //$cloneObj->xmlfile = '__Clone__' . $cloneObj->xmlfile;
+ {
$xPath = new DOMXPath($this->dom);
$nodeList = $xPath->query('/dynaForm/*');
foreach ($nodeList as $domElement){
- //echo $domElement->nodeName.'
';
$elements[] = $domElement->nodeName;
}
$this->remove($elements);
@@ -134,14 +131,6 @@ class dynaFormHandler
return $newnode;
}
- /*
- $child_childs = Array(
- Array(name=>'option', value=>'uno', 'attributes'=>Array('name'=>1)),
- Array(name=>'option', value=>'dos', 'attributes'=>Array('name'=>2)),
- Array(name=>'option', value=>'tres', 'attributes'=>Array('name'=>3)),
- )
- */
-
/**
* Add Function
* @param string $name
@@ -233,7 +222,6 @@ class dynaFormHandler
$this->xmlfile = $fname;
$this->dom->save($this->xmlfile);
}
- //$this->fixXmlFile();
}
/**
@@ -501,14 +489,6 @@ class dynaFormHandler
$xnode = $this->dom->createElement($childNode->nodeName);
$xnode->appendChild($this->dom->createCDATASection($child_text));
- /*if( $childNode->hasChildNodes() ) {
- foreach ($childNode->childNodes as $domElement){
- $domNode = $domElement->cloneNode(true);
- if( $domNode->nodeType != 4 ) {
- $xnode->appendChild($domNode);
- }
- }
- }*/
$element->replaceChild($xnode, $childNode);
$childNode = $element->getElementsByTagName($child_name)->item(0);
}
@@ -521,7 +501,6 @@ class dynaFormHandler
foreach($cc['attributes'] as $cc_att_name => $cc_att_value) {
$ccnode->setAttribute($cc_att_name, $cc_att_value);
}
- //$this->addOrUpdateChild($childNode, $cc['name'], $cc['value'], $cc['attributes']);
}
}
}
@@ -533,10 +512,7 @@ class dynaFormHandler
}
- function addOrUpdateChild($xnode, $childName, $childValue, $childAttributes){
- //$element = $this->root->getElementsByTagName($nodeName)->item(0);
- //$childNode = $element->getElementsByTagName($childName)->item(0);
-
+ function addOrUpdateChild($xnode, $childName, $childValue, $childAttributes){
$newNode = $this->dom->createElement($childName);
$newNode->appendChild($this->dom->createCDATASection($childValue));
@@ -588,28 +564,3 @@ class dynaFormHandler
return $array;
}
}
-
-//examples...........
-//$o = new dynaFormHandler('xxx.xml');
-//attributes (String node-name, Array attributes(atribute-name =>attribute-value, ..., ...), Array childs(child-name=>child-content), Array Child-childs())
-/*$child_childs = Array(
- Array('name'=>'option', 'value'=>'uno2', 'attributes'=>Array('name'=>1112)),
- Array('name'=>'option', 'value'=>'dos', 'attributes'=>Array('name'=>222)),
- Array('name'=>'option', 'value'=>'tres', 'attributes'=>Array('name'=>333)),
-);*/
-//$o->add('erik', Array('att1'=>1, 'att2'=>'dos'), Array('en'=>'hello'), $child_childs);
-//$o->addChilds('neyek', Array('en'=>'deutch'), $child_childs);
-//print_r($o->getFieldNames());
-
-/* for($i=1; $i<=5; $i++){
- $o->add('lastnamex'.$i, Array('type'=>'text', 'defaultvalue'=>'Ortiz'), Array('es'=>'Apellido'));
-}*/
-/*
-$child_childs = Array(
- Array('name'=>'option', 'value'=>'uno', 'attributes'=>Array('name'=>111)),
- Array('name'=>'option', 'value'=>'tres', 'attributes'=>Array('name'=>333)),
-);
-$o->replace('antiguedad', 'antiguedad_replaced', Array('type'=>'dropdown', 'required'=>'0'), Array('es'=>'Antiguedad !!'), $child_childs);
-*/
-//$o->remove('usr_email');
-//$o->replace('usr_uid', 'usr_uid222', Array('type'=>'text', 'defaultvalue'=>'111'), Array('es'=>'fucking id'));
\ No newline at end of file
diff --git a/gulliver/system/class.pagedTable.php b/gulliver/system/class.pagedTable.php
index 53ab90301..a2377d0c4 100644
--- a/gulliver/system/class.pagedTable.php
+++ b/gulliver/system/class.pagedTable.php
@@ -372,130 +372,130 @@ class pagedTable
* @parameter string table
* @return string
*/
- function setupFromTable($table)
- {
-// var_dump2($table);
- //Config
- $this->rowsPerPage=25;
- if (isset($_GET['page']))
- $this->currentPage = $_GET['page'];
- else
- $this->currentPage = 1;
- if (isset($_GET['order']))
- $this->orderBy = urldecode($_GET['order']);
- else
- $this->orderBy = "";
- if (isset($_GET['filter']))
- $this->filter = urldecode($_GET['filter']);
- else
- $this->filter = "";
- $xmlPopup='';
- $this->xmlFormFile="";
-/* if ($table->Action)
- $this->ajaxServer=G::encryptLink($table->Action);
- else*/
- $this->ajaxServer=G::encryptLink('../gulliver/pagedTableAjax');
- $this->popupPage = $this->ajaxServer . '?function=printForm&filename=' . urlencode($xmlPopup);
- $this->ownerPage=G::encryptLink(SYS_CURRENT_URI);
- $this->sqlConnection='';
- if (isset($table->_source))
- $this->sqlSelect=$table->_source;
- if (isset($table->WhereClause)){
- if (strpos(strtoupper($table->WhereClause),'GROUP BY')!==FALSE)
- preg_match("/(.+)(GROUP BY)(.*)/",$table->WhereClause,$matches);
- else{
- $matches[1]=$table->WhereClause;$matches[2]='';
- }
- $this->sqlWhere=$matches[1];
- if (strcasecmp($matches[2],'GROUP BY')==0)
- $this->sqlGroupBy=' GROUP BY '.$matches[3];
- }
- if (strpos(strtoupper($this->sqlSelect),'WHERE')!==FALSE){
- preg_match("/SELECT(.+)FROM(.+)WHERE(.+)/",$this->sqlSelect,$matches);
- $this->sqlSelect='SELECT '.$matches[1].' FROM '.$matches[2];
- $this->sqlWhere=$matches[3];
- }
- // DBConnection
- // $this->prepareQuery();
- //Prepare the fields
- if ($table->show_nummbers=='YES'){
- $r=-1;
- $this->fields[$r]['Name']='numberlabel';
- $this->fields[$r]['Type']='numberlabel';
- $this->fields[$r]['Label']='#';
- }
- foreach ($table->Columns as $r => $value){
- $this->fields[$r]['Name']=$value['Name'];
- $this->fields[$r]['Type']=$value['Type'];
- $this->fields[$r]['Label']=((isset($table->Labels[$r]))?$table->Labels[$r]:'');
- //Default values for Label if it was empty
- if ($this->fields[$r]['Label']=='')
- switch($table->Columns[$r]['Type']){
- case 'image':
- case 'image-text':
- case 'jslink':
- //var_dump2($table->Columns[$r]);
- $this->fields[$r]['Label']=$value['Name'];
- }
- //Print the type of the field
- //$this->fields[$r]['Label'].='('.$this->fields[$r]['Type'].')';
- $r++;
- }
- //Add a delete column if sqlDelete is established
- /* if ($this->sqlDelete!='')
- {
- $this->fields[$r]['Name']='';
- $this->fields[$r]['Type']='linknew';
- $this->fields[$r]['Label']=G::LoadXml('labels','ID_DELETE');
- }*/
- //Set the default settings
- $this->defaultStyle();
- /* if ($this->sqlDelete!='')
- {
- $this->style[$r]['href']="#";
- $this->style[$r]['onclick']="document.getElementById('pagedTable').outerHTML=ajax_function('{$this->ajaxServer}','delete','".$this->fieldDataList."');";
- }*/
- //Prepare the columns's properties
- if ($table->show_nummbers=='YES'){
- $r=-1;
- $this->style[$r]['data']='@@_row__';
- $this->style[$r]['colWidth']=30;
- }
- $this->gridWidth='';
- $this->gridFields='';
- foreach ($table->Columns as $r => $value){
- //var_dump($value['Width']);
- $this->style[$r]['colWidth']=$value['Width'];
- $this->style[$r]['titleAlign']=$value['Align'];
- $this->style[$r]['href']=$value['Target'];
- // Add the row reference
- switch ($this->fields[$r]['Type']){
- case 'image-text':
- case 'textimage':
- case 'image':
- case 'link':
- //$this->style[$r]['href'].='/@@_row__.html'; // No
- if (substr($value['Content'],0,1)=='&')
- $this->style[$r]['href'].='/@@_'.substr($value['Content'],1).'.html';
- }
- // Extra events for each field
- $this->style[$r]['event']=$value['Extra'];
- if ($this->fields[$r]['Label']==''){
- $this->style[$r]['titleVisibility']='0';
- $this->fields[$r]['Label']=$this->fields[$r]['Name'];
- }
- //if ($value['orderByThis']===true) $this->orderBy=$value['Name'];
- //Needed for javascript
- //only the visible columns's width and name are stored
- if ($this->style[$r]['showInTable']!='0'){
- $this->gridWidth.=','.$this->style[$r]['colWidth'];
- $this->gridFields.=',"form['.$this->fields[$r]['Name'].']"';
- }
- $r++;
- }
- echo('
');
-// var_dump2($this);
- }
+// function setupFromTable($table)
+// {
+//// var_dump2($table);
+// //Config
+// $this->rowsPerPage=25;
+// if (isset($_GET['page']))
+// $this->currentPage = $_GET['page'];
+// else
+// $this->currentPage = 1;
+// if (isset($_GET['order']))
+// $this->orderBy = urldecode($_GET['order']);
+// else
+// $this->orderBy = "";
+// if (isset($_GET['filter']))
+// $this->filter = urldecode($_GET['filter']);
+// else
+// $this->filter = "";
+// $xmlPopup='';
+// $this->xmlFormFile="";
+///* if ($table->Action)
+// $this->ajaxServer=G::encryptLink($table->Action);
+// else*/
+// $this->ajaxServer=G::encryptLink('../gulliver/pagedTableAjax');
+// $this->popupPage = $this->ajaxServer . '?function=printForm&filename=' . urlencode($xmlPopup);
+// $this->ownerPage=G::encryptLink(SYS_CURRENT_URI);
+// $this->sqlConnection='';
+// if (isset($table->_source))
+// $this->sqlSelect=$table->_source;
+// if (isset($table->WhereClause)){
+// if (strpos(strtoupper($table->WhereClause),'GROUP BY')!==FALSE)
+// preg_match("/(.+)(GROUP BY)(.*)/",$table->WhereClause,$matches);
+// else{
+// $matches[1]=$table->WhereClause;$matches[2]='';
+// }
+// $this->sqlWhere=$matches[1];
+// if (strcasecmp($matches[2],'GROUP BY')==0)
+// $this->sqlGroupBy=' GROUP BY '.$matches[3];
+// }
+// if (strpos(strtoupper($this->sqlSelect),'WHERE')!==FALSE){
+// preg_match("/SELECT(.+)FROM(.+)WHERE(.+)/",$this->sqlSelect,$matches);
+// $this->sqlSelect='SELECT '.$matches[1].' FROM '.$matches[2];
+// $this->sqlWhere=$matches[3];
+// }
+// // DBConnection
+// // $this->prepareQuery();
+// //Prepare the fields
+// if ($table->show_nummbers=='YES'){
+// $r=-1;
+// $this->fields[$r]['Name']='numberlabel';
+// $this->fields[$r]['Type']='numberlabel';
+// $this->fields[$r]['Label']='#';
+// }
+// foreach ($table->Columns as $r => $value){
+// $this->fields[$r]['Name']=$value['Name'];
+// $this->fields[$r]['Type']=$value['Type'];
+// $this->fields[$r]['Label']=((isset($table->Labels[$r]))?$table->Labels[$r]:'');
+// //Default values for Label if it was empty
+// if ($this->fields[$r]['Label']=='')
+// switch($table->Columns[$r]['Type']){
+// case 'image':
+// case 'image-text':
+// case 'jslink':
+// //var_dump2($table->Columns[$r]);
+// $this->fields[$r]['Label']=$value['Name'];
+// }
+// //Print the type of the field
+// //$this->fields[$r]['Label'].='('.$this->fields[$r]['Type'].')';
+// $r++;
+// }
+// //Add a delete column if sqlDelete is established
+// /* if ($this->sqlDelete!='')
+// {
+// $this->fields[$r]['Name']='';
+// $this->fields[$r]['Type']='linknew';
+// $this->fields[$r]['Label']=G::LoadXml('labels','ID_DELETE');
+// }*/
+// //Set the default settings
+// $this->defaultStyle();
+// /* if ($this->sqlDelete!='')
+// {
+// $this->style[$r]['href']="#";
+// $this->style[$r]['onclick']="document.getElementById('pagedTable').outerHTML=ajax_function('{$this->ajaxServer}','delete','".$this->fieldDataList."');";
+// }*/
+// //Prepare the columns's properties
+// if ($table->show_nummbers=='YES'){
+// $r=-1;
+// $this->style[$r]['data']='@@_row__';
+// $this->style[$r]['colWidth']=30;
+// }
+// $this->gridWidth='';
+// $this->gridFields='';
+// foreach ($table->Columns as $r => $value){
+// //var_dump($value['Width']);
+// $this->style[$r]['colWidth']=$value['Width'];
+// $this->style[$r]['titleAlign']=$value['Align'];
+// $this->style[$r]['href']=$value['Target'];
+// // Add the row reference
+// switch ($this->fields[$r]['Type']){
+// case 'image-text':
+// case 'textimage':
+// case 'image':
+// case 'link':
+// //$this->style[$r]['href'].='/@@_row__.html'; // No
+// if (substr($value['Content'],0,1)=='&')
+// $this->style[$r]['href'].='/@@_'.substr($value['Content'],1).'.html';
+// }
+// // Extra events for each field
+// $this->style[$r]['event']=$value['Extra'];
+// if ($this->fields[$r]['Label']==''){
+// $this->style[$r]['titleVisibility']='0';
+// $this->fields[$r]['Label']=$this->fields[$r]['Name'];
+// }
+// //if ($value['orderByThis']===true) $this->orderBy=$value['Name'];
+// //Needed for javascript
+// //only the visible columns's width and name are stored
+// if ($this->style[$r]['showInTable']!='0'){
+// $this->gridWidth.=','.$this->style[$r]['colWidth'];
+// $this->gridFields.=',"form['.$this->fields[$r]['Name'].']"';
+// }
+// $r++;
+// }
+// echo('
');
+//// var_dump2($this);
+// }
/**
* Function count
diff --git a/gulliver/system/class.rbac.php b/gulliver/system/class.rbac.php
index 5a1effec2..6623ff558 100644
--- a/gulliver/system/class.rbac.php
+++ b/gulliver/system/class.rbac.php
@@ -498,9 +498,9 @@ class RBAC
* @param string $sCode
* @return void
*/
- function loadPermissionByCode($sCode) {
- return $this->permissionsObj->loadByCode($sCode);
- }
+// function loadPermissionByCode($sCode) {
+// return $this->permissionsObj->loadByCode($sCode);
+// }
/**
* create permission
@@ -524,9 +524,9 @@ class RBAC
* @param string $sCode
* @return void
*/
- function loadRoleByCode($sCode) {
- return $this->rolesObj->loadByCode($sCode);
- }
+// function loadRoleByCode($sCode) {
+// return $this->rolesObj->loadByCode($sCode);
+// }
/**
* list all roles
diff --git a/gulliver/system/class.table.php b/gulliver/system/class.table.php
index 61449fd5c..a0a9d6df6 100644
--- a/gulliver/system/class.table.php
+++ b/gulliver/system/class.table.php
@@ -541,27 +541,13 @@ class Table
$res = "

";
- }*/
- /*
- if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){
- $img_dir = 'asc';
- if($HTTP_SESSION_VARS['OrderDir'] == 'DESC')
- $img_dir = 'desc';
- $res .= "
";
- }
- */
+
$res .= "
";
}
- /*if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){
- if($HTTP_SESSION_VARS['OrderDir'] == 'ASC')
- $res .= "
";
- }*/
-/*
- if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){
- $img_dir = 'asc';
- if($HTTP_SESSION_VARS['OrderDir'] == 'DESC')
- $img_dir = 'desc';
- $res .= "
";
- }
-*/
+
$res .= "
";
- }*/
- /*
- if($HTTP_SESSION_VARS['OrderBy'] == $this->Columns[$intPos]['Name'] ){
- $img_dir = 'asc';
- if($HTTP_SESSION_VARS['OrderDir'] == 'DESC')
- $img_dir = 'desc';
- $res .= "
";
- }
- */
+
$res .= "