Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
function update_zzsys_variables($pField, $pValue, $field_array)
{
    $form_ses = $_GET['form_ses'];
    setnuVariable($form_ses, nuDateAddDays(Today(), 2), $pField, $pValue);
}
Ejemplo n.º 3
0
 public function buildObjectHTML($CRLF, $TAB, $PREFIX)
 {
     $dq = '"';
     $fieldName = $PREFIX . $this->objectProperty['sob_all_name'];
     $fieldTitle = htmlentities($this->objectProperty['sob_all_title']);
     $fieldValue = htmlentities($this->objectValue);
     $type = $this->objectProperty['sob_all_type'];
     setnuVariable($this->formsessionID, nuDateAddDays(Today(), 2), $fieldName, $this->objectValue);
     if ($type == 'button') {
         $htmlString = $this->buildHTMLForButton($CRLF, $TAB, $fieldName, $fieldTitle, $fieldValue);
     }
     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 == 'image') {
         $htmlString = $this->buildHTMLForImage($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);
     }
     return $htmlString;
 }
Ejemplo n.º 4
0
**   Website:  http://www.nubuilder.com
**   Wiki:     http://wiki.nubuilder.com
**   Forums:   http://forums.nubuilder.com
*/
setcookie("security_check", security_check());
$dir = $_GET['d'];
//--a parameter passed that can be accessed by #session_parameter#
$parameter = $_GET['p'];
require_once "../{$dir}/database.php";
require_once "config.php";
include 'common.php';
$small = iif($_GET['small'] == '', '0', $_GET['small']);
$user = mysql_real_escape_string($_POST["u"]);
$pass = mysql_real_escape_string($_POST["p"]);
$sessionid = uniqid(1);
$twodaysago = nuDateAddDays(Today(), -2);
nuRunQuery("DELETE FROM zzsys_variable WHERE sva_expiry_date < '{$twodaysago}'");
nuRunQuery("DELETE FROM zzsys_trap WHERE sys_added is null OR sys_added < '{$twodaysago}'");
nuRunQuery("DELETE FROM zzsys_duplicate WHERE sdu_date < '{$twodaysago}'");
nuRunQuery("DELETE FROM zzsys_session  WHERE sss_session_date < '{$twodaysago}'");
$RQ = nuRunQuery('');
$_SESSION['security_check'] = $GLOBALS['security_check'];
$id = $_SESSION['security_check'];
$now = date('Y-n-d H:i:s');
$stoplogin = false;
$globeadminPasswords = array();
#	if ($RQ[3])
$globeadminPasswords[] = $RQ[3];
if ($DBGlobeadminPassword) {
    $globeadminPasswords[] = $DBGlobeadminPassword;
}
$runphp = $_GET['runphp'];
$name = $_GET['name'];
$id = $_GET['id'];
$ses = $_GET['ses'];
print $type . ' second time through:' . $runphp . ' ' . $name;
if ($runphp == 'ok') {
    // run second time through
    if ($type == 'list') {
        setnuList($id, nuDateAddDays(Today(), 2), $name, $_POST['TheList']);
    } elseif ($type == 'lookup') {
        $name = substr($name, 4);
        setnuVariable($id, nuDateAddDays(Today(), 2), $name, $_POST['TheID']);
        setnuVariable($id, nuDateAddDays(Today(), 2), 'code' . $name, $_POST['TheCode']);
        setnuVariable($id, nuDateAddDays(Today(), 2), 'description' . $name, $_POST['TheName']);
    } else {
        setnuVariable($id, nuDateAddDays(Today(), 2), $name, $_POST['TheField']);
    }
} else {
    $s = "<html>\n<head>\n";
    $s = $s . "<meta http-equiv='Content-Type' content='text/html;'/>\n";
    $s = $s . "<script type='text/javascript'>\n";
    $s = $s . "/* <![CDATA[ */\n";
    if ($type == 'list') {
        $s = $s . "function getData(){\n";
        $s = $s . "   var myEle         = new Object();\n";
        $s = $s . "   var lb            = new Object(window.parent.frames[0].document.getElementById('theform').{$name});\n";
        $s = $s . "   for (i=0 ; i < lb.length ; i++){\n";
        $s = $s . "      if(lb[i].selected){\n";
        $s = $s . "         myEle             = document.createElement('option');\n";
        $s = $s . "         myEle.value       = lb[i].value;\n";
        $s = $s . "         myEle.selected    = true;\n";
Ejemplo n.º 6
0
    print "        <td id='id_{$i}' style='width:20;color:{$co};background-color:lightgrey' onclick='pick({$dq}" . $dateButton[$i]->tag . "{$dq})' onmouseover='MIN(this)' onmouseout='MOUT(this)'>";
    print $dateButton[$i]->title;
    print " </td>\n";
    $weekNumber = $weekNumber + 1;
    if ($weekNumber == 7 and $i < 40) {
        print "    </tr>\n";
        print "    <tr>\n";
        $weekNumber = 0;
    }
}
$theYear = nuDateFormat($theDay, 'Y');
$theMonth = nuDateFormat($theDay, 'm');
$lastYear = nuDateAddDays("{$theYear}-{$theMonth}-01", -360);
$lastMonth = nuDateAddDays("{$theYear}-{$theMonth}-01", -2);
$nextYear = nuDateAddDays("{$theYear}-{$theMonth}-01", 370);
$nextMonth = nuDateAddDays("{$theYear}-{$theMonth}-01", 32);
print "   </tr>\n";
print "   <tr>\n";
print "        <td colspan='2' id='m1' onclick='reload({$dq}" . nuDateFormat($lastMonth, $returnDateFormat6) . "{$dq})' onmouseover='MIN(this)' onmouseout='MOUT(this)' align='center' style='background-color:lightgrey' >" . nuDateFormat($lastMonth, 'M') . "</td>\n";
print "        <td colspan='3' align='center'><b>" . nuDateFormat($theDay, 'M') . "</b></td>\n";
print "        <td colspan='2' id='m2' onclick='reload({$dq}" . nuDateFormat($nextMonth, $returnDateFormat6) . "{$dq})' onmouseover='MIN(this)' onmouseout='MOUT(this)' align='center' style='background-color:lightgrey' >" . nuDateFormat($nextMonth, 'M') . "</td>\n";
print "   </tr>\n";
print "   <tr>\n";
print "        <td colspan='2' id='y1' onclick='reload({$dq}" . nuDateFormat($lastYear, $returnDateFormat6) . "{$dq})' onmouseover='MIN(this)' onmouseout='MOUT(this)' align='center' style='background-color:lightgrey' >" . nuDateFormat($lastYear, 'Y') . "</td>\n";
print "        <td colspan='3' align='center'><b>" . nuDateFormat($theDay, 'Y') . "</b></td>\n";
print "        <td colspan='2' id='y2' onclick='reload({$dq}" . nuDateFormat($nextYear, $returnDateFormat6) . "{$dq})' onmouseover='MIN(this)' onmouseout='MOUT(this)' align='center' style='background-color:lightgrey' >" . nuDateFormat($nextYear, 'Y') . "</td>\n";
print "   </tr>\n";
print "<table>\n";
$s = "function MIN(pthis){//---mouse over menu\n";
$s = $s . "      document.getElementById(pthis.id).style.backgroundColor='gray';\n";
$s = $s . "}\n\n";