コード例 #1
0
 function __construct($orientation, $unit, $format)
 {
     parent::__construct($orientation, $unit, $format);
     $this->temp_filename = dirname(__FILE__) . '/temppdf/' . TT();
     $this->html = html_colors();
     $this->timestamp = date('Y-m-d H:i:s');
 }
コード例 #2
0
 function __construct($parameters, $ACTIVITY)
 {
     $this->resize = 0.0679;
     $this->reportID = $ACTIVITY->zzsys_activity_id;
     $this->reportTitle = $ACTIVITY->sat_all_description;
     $this->report = new Reporting();
     $this->hasReportHeader = $this->validSection($this->reportHeader);
     $this->hasReportFooter = $this->validSection($this->reportFooter);
     $this->hasPageHeader = $this->validSection($this->pageHeader);
     $this->hasPageFooter = $this->validSection($this->pageFooter);
     $this->fixControlNames();
     $this->buildBreakOnArray();
     $this->headerNumbers = array(5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31);
     $this->footerNumbers = array(6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32);
     $this->alignment = array('left', 'left', 'center', 'right');
     $this->selectionFormVariables = getSelectionFormVariables($parameters);
     $this->tablesUsed = getSelectionFormTempTableNames($parameters, $this->selectionFormVariables);
     $this->TT = TT();
     $this->sumTT = TT();
     $this->tablesUsed[] = $this->TT;
     $dataTable = $this->TT;
     $formValue = $this->selectionFormVariables;
     eval($ACTIVITY->sat_report_data_code);
     $this->TT = $dataTable;
     //		BuildTable($this->selectionFormVariables, $this->TT);
     $this->addSelectionFormVariablesToTable($this->selectionFormVariables);
     $t = nuRunQuery("SELECT * FROM {$this->TT} LIMIT 0 , 1");
     $this->fields = tableFieldNamesToArray($t);
     if ($_GET['tt'] != '') {
         //--- create a temp table to debug
         nuRunQuery("CREATE TABLE " . $_GET['tt'] . " SELECT * FROM {$this->TT}");
     }
     $this->sumTotals();
     $this->orderBy = $this->orderByClause();
     $this->styleSheet = $this->buildStyleSheet();
 }
コード例 #3
0
 function __construct(Form $form, $pRecordID)
 {
     $this->parentForm = $form;
     $this->recordID = $pRecordID;
     $this->TT = TT();
     //---temp table name
     $this->setup = $form->setup;
 }
コード例 #4
0
**   Wiki:     http://wiki.nubuilder.com
**   Forums:   http://forums.nubuilder.com
*/
session_start();
$dir = $_GET['dir'];
$form_ses = $_GET['form_ses'];
$ses = $_GET['ses'];
$prefix = $_GET['p'];
$o = $_GET['o'];
$r = $_GET['r'];
$n = $_GET['n'];
include "../{$dir}/database.php";
include 'common.php';
$object = objectFields($r);
$lookupForm = formFields($object->sob_lookup_zzsysform_id);
$TT = TT();
$browseTable = $TT;
$updateField = array();
//----------create an array of hash variables that can be used in any "hashString"
$sesVariables = recordToHashArray('zzsys_session', 'zzsys_session_id', $ses);
//--session values (access level and user etc. )
$sesVariables['#TT#'] = $TT;
$sesVariables['#browseTable#'] = $TT;
$sesVariables['#formSessionID#'] = $form_ses;
$sesVariables['#rowPrefix#'] = $prefix;
$sysVariables = sysVariablesToHashArray($form_ses);
//--values in sysVariables from the calling lookup page
$arrayOfHashVariables = joinHashArrays($sysVariables, $sesVariables);
//--join the arrays together
$nuHashVariables = $arrayOfHashVariables;
//--added by sc 23-07-2009
コード例 #5
0
 function __construct($parameters, $ACTIVITY)
 {
     $this->resize = 0.0679;
     //$this->resize                  = 1.0;
     $this->reportID = $ACTIVITY->zzsys_activity_id;
     $this->reportTitle = $ACTIVITY->sat_all_description;
     $this->report = new Reporting();
     $this->hasReportHeader = $this->validSection($this->reportHeader);
     $this->hasReportFooter = $this->validSection($this->reportFooter);
     $this->hasPageHeader = $this->validSection($this->pageHeader);
     $this->hasPageFooter = $this->validSection($this->pageFooter);
     $this->fixControlNames();
     $this->buildBreakOnArray();
     $this->headerNumbers = array(5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31);
     $this->footerNumbers = array(6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32);
     $this->alignment = array('left', 'left', 'center', 'right');
     $this->selectionFormVariables = getSelectionFormVariables($parameters);
     $hashSelectionFormVariables = arrayToHashArray($this->selectionFormVariables);
     $this->tablesUsed = getSelectionFormTempTableNames($parameters, $this->selectionFormVariables);
     $this->TT = TT();
     $this->sumTT = TT();
     $this->tablesUsed[] = $this->TT;
     $dataTable = $this->TT;
     $formValue = $this->selectionFormVariables;
     $globalValue = getglobalValue($_GET['ses']);
     //----------create an array of hash variables that can be used in any "hashString"
     $sesVariables = recordToHashArray('zzsys_session', 'zzsys_session_id', $_GET['ses']);
     //--session values (access level and user etc. )
     $sesVariables['#dataTable#'] = $this->TT;
     $sysVariables = sysVariablesToHashArray($_GET['form_ses']);
     //--values in sysVariables from the calling lookup page
     $arrayOfHashVariables = joinHashArrays($sysVariables, $sesVariables);
     //--join the arrays together
     $arrayOfHashVariables = joinHashArrays($arrayOfHashVariables, $hashSelectionFormVariables);
     //--put temp table names for listboxes
     //----------allow for custom code----------------------------------------------
     eval(replaceHashVariablesWithValues($arrayOfHashVariables, $ACTIVITY->sat_report_data_code));
     //		eval($ACTIVITY->sat_report_data_code);
     $this->TT = $dataTable;
     //		BuildTable($this->selectionFormVariables, $this->TT);
     $this->addSelectionFormVariablesToTable($this->selectionFormVariables);
     $t = nuRunQuery("SELECT * FROM {$this->TT} LIMIT 0 , 1");
     $this->fields = tableFieldNamesToArray($t);
     if ($_GET['tt'] != '') {
         //--- create a temp table to debug
         nuRunQuery("CREATE TABLE " . $_GET['tt'] . " SELECT * FROM {$this->TT}");
     }
     $this->sumTotals();
     $this->orderBy = $this->orderByClause();
     $this->styleSheet = $this->buildStyleSheet();
     $this->justDidPageBreak = false;
 }
コード例 #6
0
    $session = nuSession($ses, false);
    if ($session->foundOK == '') {
        print 'you have been logged out..';
        return;
    }
}
//$session = nuSession($ses, false);
//if($session->foundOK == ''){
//	print 'you have been logged out..';
//	return;
//}
$setup = nuSetup();
//eval($setup->set_php_code);
$T = nuRunQuery("SELECT * FROM zzsys_activity WHERE sat_all_code = '{$report}'");
$A = db_fetch_object($T);
$dataTable = TT();
$formValue = getSelectionFormVariables($form_ses);
//----------allow for custom code----------------------------------------------
$globalValue = getglobalValue($_GET['ses']);
//----------create an array of hash variables that can be used in any "hashString"
$sesVariables = recordToHashArray('zzsys_session', 'zzsys_session_id', $ses);
//--session values (access level and user etc. )
$sysVariables = sysVariablesToHashArray($form_ses);
//--values in sysVariables from the calling lookup page
$sesVariables['#dataTable#'] = $dataTable;
$arrayOfHashVariables = joinHashArrays($sysVariables, $sesVariables);
//--join the arrays together
$newFormArray = arrayToHashArray($formValue);
$arrayOfHashVariables = joinHashArrays($arrayOfHashVariables, $newFormArray);
//--join the arrays together
eval(replaceHashVariablesWithValues($arrayOfHashVariables, $A->sat_export_data_code));
コード例 #7
0
** This file is part of the nuBuilder source package and is licensed under the
** GPLv3. For support on developing in nuBuilder, please visit the nuBuilder
** wiki and forums. For details on contributing a patch for nuBuilder, please
** visit the `Project Contributions' forum.
**
**   Website:  http://www.nubuilder.com
**   Wiki:     http://wiki.nubuilder.com
**   Forums:   http://forums.nubuilder.com
*/
//-- $activityID is passed by the URL
//-- $graph_name is also
//-- $dir is also
$dir = $_GET['dir'];
include "../{$dir}/database.php";
include 'common.php';
$graphTable = TT();
$s = "SELECT * FROM zzsys_activity_graph WHERE sag_zzsys_activity_id = '{$activityID}' AND sag_graph_name = '{$graph_name}'";
$tA = nuRunQuery($s);
$graphObject = db_fetch_object($tA);
$s = "SELECT * FROM zzsys_graph WHERE zzsys_graph_id = '{$graphObject->sag_graph_zzsys_graph_id}'";
$tB = nuRunQuery($s);
$graphType = db_fetch_object($tB);
//----------create an array of hash variables that can be used in any "hashString"
$arrayOfHashVariables = recordToHashArray('zzsys_session', 'zzsys_session_id', $ses);
//--session values (access level and user etc. )
$arrayOfHashVariables['#id#'] = $theRecordID;
//--this record's id
$arrayOfHashVariables['#clone#'] = $clone;
//--if it is a clone
$arrayOfHashVariables['#graphTable#'] = $graphTable;
//--temp table name
コード例 #8
0
 function __construct($pReport, $pCustomDirectory, $pSession)
 {
     $this->header_numbers = array(5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31);
     $this->footer_numbers = array(6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32);
     $this->display_class = $pReport;
     $this->detail_section = new REPORT_section($pReport, 0);
     $this->report_header = new REPORT_section($pReport, 1);
     $this->report_footer = new REPORT_section($pReport, 2);
     $this->page_header = new REPORT_section($pReport, 3, false);
     //--section cannot grow
     $this->page_footer = new REPORT_section($pReport, 4, false);
     //--section cannot grow
     $this->customDirectory = $pCustomDirectory;
     $this->session = $pSession;
     $this->orientation = $pReport->Orientation;
     $this->paper_type = $pReport->PaperType;
     $this->page_width = pixels($pReport->Width);
     if (pixels($pReport->Height) == '0') {
         $pReport->Height = 1000;
     }
     $the_page_height = pixels($pReport->Height);
     if ($the_page_height == '') {
         //-- get height from activity record (backwards compatability)
         $heightTable = nuRunQuery("SELECT sat_report_page_length FROM zzsys_activity WHERE sat_all_code = '" . $_GET['r'] . "'");
         $heightRecord = db_fetch_object($heightTable);
         $the_page_height = pixels($heightRecord->sat_report_page_length);
     }
     $this->page_height = $the_page_height;
     $this->normal_page_height = $the_page_height;
     $this->printable_height = 10000000;
     $this->reset_remaining_height();
     for ($i = 0; $i < count($this->header_numbers); $i++) {
         $this->header_sections[] = new REPORT_section($pReport, $this->header_numbers[$i]);
     }
     for ($i = 0; $i < count($this->footer_numbers); $i++) {
         $this->footer_sections[] = new REPORT_section($pReport, $this->footer_numbers[$i]);
     }
     for ($i = 0; $i < count($pReport->Groups); $i++) {
         $this->groups[] = $pReport->Groups[$i];
     }
     $this->group_count = count($this->groups);
     $this->sumTT = TT();
 }
コード例 #9
0
 function __construct($theFormID, $thePageNumber, $theOrderBy, $isDescending, $theSearchString, $subformPrefix, $objectID, $recordID)
 {
     $this->TT = TT();
     //---temp table name
     $this->theFormID = $theFormID;
     $this->objectID = $objectID;
     $this->recordID = $recordID;
     $this->rowPrefix = $subformPrefix;
     $this->PageNo = $thePageNumber;
     $this->orderBy = $theOrderBy;
     $this->isDescending = $isDescending;
     $this->form = formFields($theFormID);
     if ($objectID == '') {
         $this->callingForm = formFields($theFormID);
     } else {
         $this->isLookup = true;
         $t = nuRunQuery("SELECT sob_lookup_zzsysform_id FROM zzsys_object WHERE zzsys_object_id = '{$objectID}'");
         $r = db_fetch_row($t);
         $this->callingForm = formFields($r[0]);
         while (list($key, $va) = each($_POST)) {
             $uniq = uniqid('1');
             $key = str_replace("'", "\\'", $key);
             nuRunQuery("INSERT INTO zzsys_small_form_value (zzsys_small_form_value_id, sfv_form_record, sfv_name, sfv_value) VALUES ('{$uniq}', '{$theFormID}{$this->recordID}{$ses}" . $_GET['ses'] . "', '{$key}', '{$va}')");
         }
     }
     $this->searchString = $theSearchString;
     $this->pageLength = 10;
     $this->rowHeight = 20;
     $this->startTime = time();
     $this->setup = nuSetup();
     $this->getColumnInfo($this->callingForm->zzsys_form_id);
     $this->defaultJSfunctions();
     if ($this->callingForm->sfo_sql_run_before_display != '') {
         $beforeDisplaySQL = replaceVariablesInString($this->TT, $this->callingForm->sfo_sql_run_before_display, '');
         $sqlStatements = array();
         $sqlStatements = explode(';', $beforeDisplaySQL);
         //---create a tempfile to be used later as object is being built.
         for ($i = 0; $i < count($sqlStatements); $i++) {
             if (trim($sqlStatements[$i]) != '') {
                 nuRunQuery($sqlStatements[$i]);
             }
         }
     }
     $this->SQL = new sqlString(replaceVariablesInString($this->TT, $this->callingForm->sfo_sql, ''));
     $this->buildWhereClause($theSearchString);
     $this->SQL->setWhere($this->pageWhereClause);
     $this->SQL->setOrderBy($this->buildOrderBy());
     $this->pageBody = $this->buildBody();
     $this->pageHeader = $this->buildHeader();
 }
コード例 #10
0
 function loadAfterConstruct($theFormID, $thePageNumber, $theOrderBy, $isDescending, $theSearchString, $subformPrefix, $dir, $ses, $form_ses, $zzsys_user_id)
 {
     $this->TT = TT();
     //---temp table name
     $this->rowPrefix = $subformPrefix;
     $this->customDirectory = $dir;
     $this->session = $ses;
     $this->form_session = $form_ses;
     $this->PageNo = $thePageNumber;
     $this->orderBy = $theOrderBy;
     $this->isDescending = $isDescending;
     $this->oldFormID = $theFormID;
     $this->theFormID = $this->getFormID($theFormID);
     $this->searchString = $theSearchString;
     $this->pageLength = 27;
     $this->rowHeight = 20;
     $this->startTime = time();
     $this->setup = nuSetup();
     $this->getColumnInfo($this->theFormID);
     $this->form = formFields($this->theFormID);
     $this->defaultJSfunctions();
     $this->zzsys_user_id = $zzsys_user_id;
     //----------create an array of hash variables that can be used in any "hashString"
     $sesVariables = recordToHashArray('zzsys_session', 'zzsys_session_id', $ses);
     //--session values (access level and user etc. )
     $sesVariables['#TT#'] = $this->TT;
     $sesVariables['#browseTable#'] = $this->TT;
     $sesVariables['#formSessionID#'] = $form_ses;
     $sysVariables = sysVariablesToHashArray($form_ses);
     //--values in sysVariables from the calling lookup page
     $this->arrayOfHashVariables = joinHashArrays($sysVariables, $sesVariables);
     //--join the arrays together
     $nuHashVariables = $this->arrayOfHashVariables;
     //--added by sc 23-07-2009
     //----------allow for custom code----------------------------------------------
     $globalValue = getglobalValue($this->session);
     $browseTable = $this->TT;
     eval(replaceHashVariablesWithValues($this->arrayOfHashVariables, $this->form->sfo_custom_code_run_before_browse));
     $this->old_sql_string = $this->form->sfo_sql;
     $this->new_sql_string = replaceHashVariablesWithValues($this->arrayOfHashVariables, $this->form->sfo_sql);
     $s = "\n/*\n old : {$this->old_sql_string} \n*/\n";
     $s = $s . "\n/*\n new : {$this->new_sql_string} \n*/\n";
     $this->appendJSfuntion($s);
     $this->SQL = new sqlString($this->new_sql_string);
     $this->buildWhereClause($theSearchString);
     $this->SQL->setWhere($this->pageWhereClause);
     $this->SQL->setOrderBy($this->buildOrderBy());
     $this->pageBody = $this->buildBody();
     $this->pageHeader = $this->buildHeader();
 }
コード例 #11
0
function getSelectionFormVariables($pID)
{
    $v = array();
    $t = nuRunQuery("SELECT count(*) AS thecount, sva_name, sva_value, sva_table FROM zzsys_variable WHERE sva_id = '{$pID}' GROUP BY sva_name, sva_table");
    while ($r = db_fetch_object($t)) {
        if ($r->sva_table != '1') {
            $v[$r->sva_name] = $r->sva_value;
        } else {
            $T = nuRunQuery("SELECT * FROM zzsys_variable WHERE sva_id = '{$pID}' AND sva_name = '{$r->sva_name}'");
            $tableName = TT();
            $v[$r->sva_name] = $tableName;
            nuRunQuery("CREATE TABLE {$tableName} (id VARCHAR(15) NOT NULL, {$tableName} VARCHAR(15) NULL ,PRIMARY KEY (id), INDEX ({$tableName}))");
            while ($R = db_fetch_object($T)) {
                $id = uniqid('1');
                nuRunQuery("INSERT INTO {$tableName} (id, {$tableName}) VALUES ('{$id}', '{$R->sva_value}')");
            }
        }
    }
    return $v;
}