Пример #1
0
 public function buildObjectHTML($CRLF, $TAB, $PREFIX)
 {
     $dq = '"';
     $fieldName = $PREFIX . $this->objectProperty['sob_all_name'];
     //   		$fieldTitle      = $this->objectProperty['sob_all_title'];
     $fieldTitle = "<div id='{$fieldName}" . "_title'>" . $this->objectProperty['sob_all_title'] . '</div>';
     if (!$this->displayThisObject) {
         //--set it blank so no title will be displayed
         $fieldTitle = '';
     }
     $fieldValue = htmlentities($this->objectValue);
     $type = $this->objectProperty['sob_all_type'];
     $id = uniqid('', true);
     $pValue = addEscapes($this->objectValue);
     $ses = $_GET['ses'];
     $s = "INSERT INTO zzsys_variable (zzsys_variable_id, sva_id, sva_expiry_date, sva_session_id, sva_name, sva_value, sys_added)  ";
     $s = $s . "VALUES ('{$id}', '{$this->formsessionID}', '" . nuDateAddDays(Today(), 2) . "', '{$ses}', '{$fieldName}', '{$pValue}', '" . date('Y-m-d H:i:s') . "')";
     if ($type != 'words') {
         nuRunQuery($s);
     }
     if ($type == 'button') {
         $htmlString = $this->buildHTMLForButton($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue, $PREFIX);
     }
     if ($type == 'display') {
         $htmlString = $this->buildHTMLForDisplay($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue);
     }
     if ($type == 'dropdown') {
         $htmlString = $this->buildHTMLForDropdown($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue, $PREFIX);
     }
     if ($type == 'graph') {
         $htmlString = $this->buildHTMLForGraph($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue);
     }
     if ($type == 'html') {
         $htmlString = $this->buildHTMLForHtml($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue);
     }
     if ($type == 'inarray') {
         $htmlString = $this->buildHTMLForInarray($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue, $PREFIX);
     }
     if ($type == 'listbox') {
         $htmlString = $this->buildHTMLForListbox($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue);
     }
     if ($type == 'lookup') {
         $htmlString = $this->buildHTMLForLookup($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue, $PREFIX);
     }
     if ($type == 'text') {
         $htmlString = $this->buildHTMLForText($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue, $PREFIX);
     }
     if ($type == 'textarea') {
         $htmlString = $this->buildHTMLForTextarea($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue, $PREFIX);
     }
     if ($type == 'words') {
         $htmlString = $this->buildHTMLForWords($CRLF, $TAB);
     }
     if ($type == 'subform') {
         $htmlString = $this->buildHTMLForSubform($CRLF, $TAB, $fieldName, $fieldTitle, $this->objectProperty['sob_subform_blank_rows'], $this->objectProperty['zzsys_object_id']);
     }
     nuRunQuery("DROP TABLE IF EXISTS `{$this->TT}`");
     return $htmlString;
 }
Пример #2
0
function setnuVariable($pID, $pExpire, $pName, $pValue)
{
    $id = uniqid('1');
    $now = date('Y-m-d H:i:s');
    $dq = '"';
    $pValue = addEscapes($pValue);
    $ses = $_GET['ses'];
    nudebug("ses:{$ses}");
    $s = "DELETE FROM zzsys_variable WHERE sva_id = '{$pID}' AND sva_name = '{$pName}'";
    nuRunQuery($s);
    $s = "INSERT INTO zzsys_variable (zzsys_variable_id, sva_id, sva_session_id, sva_expiry_date, sva_name, sva_value, sys_added)  ";
    $s = $s . "VALUES ('{$id}', '{$pID}', '{$ses}', '{$pExpire}', '{$pName}', '{$pValue}', '{$now}')";
    nuRunQuery($s);
}