Ejemplo n.º 1
0
 function searchAssign()
 {
     parent::searchAssign();
     $searchGlobalParams = $this->searchClauseObj->getSearchGlobalParams();
     $searchPanelAttrs = $this->searchClauseObj->getSrchPanelAttrs();
     // show hide window
     $this->xt->assign("showHideSearchWin_attrs", ' title="Floating window"');
     $searchOpt_mess = $searchPanelAttrs['srchOptShowStatus'] ? "Hide search options" : "Show search options";
     $this->xt->assign("showHideSearchPanel_attrs", 'align="absmiddle" title="' . $searchOpt_mess . '" alt="' . $searchOpt_mess . '"');
     $searchforAttrs = "name=\"ctlSearchFor" . $this->id . "\" id=\"ctlSearchFor" . $this->id . "\"";
     if ($this->isUseAjaxSuggest) {
         $searchforAttrs .= "autocomplete=off ";
     }
     $searchforAttrs .= ' placeholder="' . "search" . '"';
     if ($this->searchClauseObj->isUsedSrch()) {
         $valSrchFor = $searchGlobalParams["simpleSrch"];
         $searchforAttrs .= " value=\"" . runner_htmlspecialchars($valSrchFor) . "\"";
     }
     $this->xt->assignbyref("searchfor_attrs", $searchforAttrs);
     $this->xt->assign('searchPanelTopButtons', $this->isDisplaySearchPanel);
     if ($this->pSet->showSimpleSearchOptions()) {
         $simpleSearchTypeCombo = '<select id="simpleSrchTypeCombo' . $this->id . '" name="simpleSrchTypeCombo' . $this->id . '" size="1">';
         $simpleSearchTypeCombo .= $this->searchControlBuilder->getSimpleSearchTypeCombo($searchGlobalParams["simpleSrchTypeComboOpt"], $searchGlobalParams["simpleSrchTypeComboNot"]);
         $simpleSearchTypeCombo .= "</select>";
         $this->xt->assign('simpleSearchTypeCombo', $simpleSearchTypeCombo);
         $simpleSearchFieldCombo = '<select id="simpleSrchFieldsCombo' . $this->id . '" name="simpleSrchFieldsCombo' . $this->id . '" size="1">';
         $simpleSearchFieldCombo .= $this->searchControlBuilder->simpleSearchFieldCombo($this->allSearchFields, $searchGlobalParams["simpleSrchFieldsComboOpt"]);
         $simpleSearchFieldCombo .= "</select>";
         $this->xt->assign('simpleSearchFieldCombo', $simpleSearchFieldCombo);
     }
 }
Ejemplo n.º 2
0
    function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data) {
	parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);

	$inputType = $this->pageObject->pSetEdit->getHTML5InputType($this->field);
	$altAttr = ( $mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD ) && $this->is508 == true ? ' alt="' . $this->strLabel . '" ' : '';

	//Alterado por Helbert em 04/06/2015
	//Se o campo for de data, cria a class do input como datepiker

	if ($this->cfield == "value_DATA_VENCIMENTO_1"
		OR $this->cfield == "value_DATA_RECEBIMENTO_1"
		OR $this->cfield == "value_DATA_PAGAMENTO_1"
		OR $this->cfield == "value1_DATA_VENCIMENTO_1"
		OR $this->cfield == "value1_DATA_PAGAMENTO_1"
		OR $this->cfield == "value1_DATA_RECEBIMENTO_1"
	) {
	    $class = 'class="datepicker" readonly = "true"';
	}


	echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . $class . ' type="' . $inputType . '" '
	. ($mode == MODE_SEARCH ? '  ' : '') . $altAttr
	. 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) .
	' value="' . runner_htmlspecialchars($value) . '">';

	$this->buildControlEnd($validate);
    }
Ejemplo n.º 3
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     if ($this->container->pageType == PAGE_LIST || $this->container->pageType == PAGE_SEARCH) {
         $value = prepare_for_db($this->field, $value, "time");
     }
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     echo '<input id="' . $this->ctype . '" ' . $this->inputStyle . ' type="hidden" name="' . $this->ctype . '" value="time">';
     $arr_number = parsenumbers((string) $value);
     if (count($arr_number) == 6) {
         $value = mysprintf("%d:%02d:%02d", array($arr_number[3], $arr_number[4], $arr_number[5]));
     }
     $timeAttrs = $this->pageObject->pSetEdit->getFormatTimeAttrs($this->field);
     if (count($timeAttrs)) {
         $input = '<input type="text" ' . $this->inputStyle . ' name="' . $this->cfield . '" ' . (($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? 'alt="' . $this->strLabel . '" ' : '') . 'id="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field);
         if ($timeAttrs["useTimePicker"]) {
             $convention = $timeAttrs["hours"];
             $loc = getLacaleAmPmForTimePicker($convention, true);
             $tpVal = getValForTimePicker($this->type, $value, $loc['locale']);
             echo $input . ' value="' . runner_htmlspecialchars($tpVal['val']) . '">';
             echo '&nbsp;';
             echo '<a class="rnr-imgclock" data-icon="timepicker" title="Time" style="display:inline-block; margin:4px 0 0 6px; visibility: hidden;" id="trigger-test-' . $this->cfield . '" /></a>';
         } else {
             echo $input . ' value="' . runner_htmlspecialchars($value) . '">';
         }
     }
     $this->buildControlEnd($validate);
 }
Ejemplo n.º 4
0
 public function getValueHighlighted($value, $highlightData)
 {
     $searchWordArr = array();
     foreach ($highlightData['searchWords'] as $searchWord) {
         $word = preg_replace('/[\\.,]/', '', $searchWord);
         $wordArr = str_split($word);
         $word = implode("[^\\d]{0,2}", $wordArr);
         //add thousands and decimals separators to the pattern
         $word = runner_htmlspecialchars($word);
         if ($searchOpt == 'Starts with') {
             $word = "^" . $word;
         }
         $searchWordArr[] = $word;
     }
     $pattern = '/(' . implode('|', $searchWordArr) . ')/';
     $searchOpt = $highlightData['searchOpt'];
     switch ($searchOpt) {
         case 'Equals':
             return $this->addHighlightingSpan($value);
         case 'Starts with':
             return preg_replace($pattern, $this->addHighlightingSpan('$1'), $value);
         case 'Contains':
             return preg_replace($pattern, $this->addHighlightingSpan('$1'), $value);
         default:
             return $value;
     }
 }
Ejemplo n.º 5
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     $inputType = $this->pageObject->pSetEdit->getHTML5InputType($this->field);
     $altAttr = ($mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) && $this->is508 == true ? ' alt="' . $this->strLabel . '" ' : '';
     echo '<input id="' . $this->cfield . '" ' . $this->inputStyle . ' type="' . $inputType . '" ' . ($mode == MODE_SEARCH ? 'autocomplete="off" ' : '') . $altAttr . 'name="' . $this->cfield . '" ' . $this->pageObject->pSetEdit->getEditParams($this->field) . ' value="' . runner_htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Ejemplo n.º 6
0
 public function showDBValue(&$data, $keylink)
 {
     $result = $this->getTextValue($data);
     if (!$this->container->forExport || $this->container->forExport && $this->container->forExport != "excel" && $this->container->forExport != "csv") {
         $result = runner_htmlspecialchars($result);
     }
     return $result;
 }
Ejemplo n.º 7
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     if ($mode == MODE_EDIT || $mode == MODE_ADD || $mode == MODE_INLINE_EDIT || $mode == MODE_INLINE_ADD) {
         echo '<span id="readonly_' . $this->cfield . '" ' . $this->inputStyle . '>' . $this->pageObject->readOnlyFields[$this->field] . '</span>';
     }
     echo '<input id="' . $this->cfield . '" type="Hidden" name="' . $this->cfield . '" value="' . runner_htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Ejemplo n.º 8
0
 function searchAssign()
 {
     parent::searchAssign();
     $searchforAttrs = 'placeholder="' . "buscar" . '"';
     $searchGlobalParams = $this->searchClauseObj->getSearchGlobalParams();
     if ($this->searchClauseObj->isUsedSrch()) {
         $valSrchFor = $searchGlobalParams["simpleSrch"];
         $searchforAttrs .= " value=\"" . runner_htmlspecialchars($valSrchFor) . "\"";
     }
     $searchforAttrs .= " size=\"15\" name=\"ctlSearchFor" . $this->id . "\" id=\"ctlSearchFor" . $this->id . "\"";
     $this->xt->assign("searchfor_attrs", $searchforAttrs);
 }
 public function showDBValue(&$data, $keylink)
 {
     $value = "";
     $this->upload_handler->tkeys = $keylink;
     $filesArray = $this->getFilesArray($data[$this->field]);
     $showThumbnails = $this->container->pSet->showThumbnail($this->field);
     $isExport = $this->container->pageType == PAGE_EXPORT || $this->container->forExport != '';
     if ($showThumbnails) {
         $zoomboxRand = rand(11111, 99999);
     }
     foreach ($filesArray as $file) {
         $userFile = $this->upload_handler->buildUserFile($file);
         if (!$isExport) {
             $value .= $value != "" ? "</br>" : "";
             if ($showThumbnails && $userFile["thumbnail_url"] != "" && CheckImageExtension($file["name"])) {
                 $value .= "<a target=_blank href=\"" . runner_htmlspecialchars($userFile["url"]) . "\" class='zoombox zgallery" . $zoomboxRand . "'><img  border='0'";
                 if ($this->is508) {
                     $value .= " alt=\"" . runner_htmlspecialchars($userFile["name"]) . "\"";
                 }
                 $value .= " src=\"" . runner_htmlspecialchars(GetRootPathForResources($userFile["thumbnail_url"])) . "\" /></a>";
             } else {
                 if ($this->container->pSet->showIcon($this->field)) {
                     $value .= '<a href="' . runner_htmlspecialchars($userFile["url"]) . '"><img style="vertical-align: middle;" src="' . GetRootPathForResources('images/icons/' . $this->getFileIconByType($file["name"], $file["type"])) . '" /></a>';
                 }
             }
         }
         if ($this->container->pSet->showCustomExpr($this->field)) {
             $value .= fileCustomExpression($file, $data, $this->field, $this->container->pageType);
         } else {
             if ($isExport) {
                 $value .= ($value != "" ? ", " : "") . $file["usrName"];
             } else {
                 if ($showThumbnails && $userFile["thumbnail_url"] != "" && CheckImageExtension($file["name"]) && $value != "") {
                     $value .= "<br />";
                 }
                 $label = runner_htmlspecialchars($file["usrName"] != "" ? $file["usrName"] : $file["name"]);
                 if ($this->searchHighlight) {
                     $label = $this->highlightSearchWord($label, true, "");
                 }
                 $value .= '<a dir="LTR" href="' . runner_htmlspecialchars($userFile["url"]) . '">' . $label . '</a>';
             }
         }
         if ($this->container->pSet->showFileSize($this->field)) {
             $fileSizeAndUnit = $this->getFileSizeAndUnits($file["size"]);
             $value .= " " . str_format_number(round($fileSizeAndUnit["size"], 2)) . " " . $this->sizeUnits[$fileSizeAndUnit["unitIndex"]];
         }
     }
     return $value;
 }
Ejemplo n.º 10
0
    public function showDBValue(&$data, $keylink)
    {
        $value = "";
        if (@$data[$this->field] != NULL && $this->container->pageType != PAGE_PRINT) {
            $videoId = 'video_' . GoodFieldName(runner_htmlspecialchars($this->field)) . '_';
            $videoId .= $this->getContainer()->id . "_";
            if ($this->getContainer()->pageType != PAGE_ADD) {
                $videoId .= $this->getContainer()->recId;
            } else {
                $videoId .= postvalue("id");
            }
            $type = 'video/mp4';
            $fileName = 'file.mp4';
            $fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
            if ($fileNameF) {
                $fileName = $data[$fileNameF];
                if (!$fileName) {
                    $fileName = 'file.mp4';
                } else {
                    $type = getContentTypeByExtension(substr($fileName, strrpos($fileName, '.')));
                }
            }
            $href = GetTableLink("mfhandler", "", "filename=" . $fileName . "&table=" . rawurlencode($this->getContainer()->pSet->_table) . "&field=" . rawurlencode($this->field) . "&pageType=" . $this->getContainer()->pageType . $keylink);
            $vWidth = $this->getContainer()->pSet->getVideoWidth($this->field);
            $vHeight = $this->getContainer()->pSet->getVideoHeight($this->field);
            if ($vWidth == 0) {
                $vWidth = 300;
            }
            if ($vHeight == 0) {
                $vHeight = 200;
            }
            $value .= '
				<div style="width:' . $vWidth . 'px; height:' . $vHeight . 'px;">
				<video class="projekktor" width="' . $vWidth . '" height="' . $vHeight . '" id="' . $videoId . '" type="' . $type . '" src="' . $href . '" >
				</video></div>';
            if ($this->pageObject != null) {
                $this->pageObject->controlsMap['video'][] = $videoId;
            }
        } else {
            $fileNameF = $this->getContainer()->pSet->getFilenameField($this->field);
            if ($fileNameF) {
                $fileName = $data[$fileNameF];
                if (!$fileName) {
                    $value = $fileName;
                }
            }
        }
        return $value;
    }
Ejemplo n.º 11
0
 public function showDBValue(&$data, $keylink)
 {
     $value = "";
     $fileName = $data[$this->field];
     if (strlen($fileName)) {
         $fieldIsUrl = $this->container->pSet->isVideoUrlField($this->field);
         if (!$fieldIsUrl) {
             $this->upload_handler->tkeys = $keylink;
             $filesArray = $this->getFilesArray($fileName);
         } else {
             $filesArray = array($fileName);
         }
         $title = "";
         $titleField = $this->container->pSet->getAudioTitleField($this->field);
         if ($titleField) {
             $title = runner_htmlspecialchars($data[$titleField]);
         }
         foreach ($filesArray as $file) {
             if ($this->container->pageType == PAGE_EXPORT || $this->container->pageType == PAGE_PRINT || $this->container->forExport != '') {
                 if ($value != "") {
                     $value .= ", ";
                 }
                 $value .= $fieldIsUrl ? $file : $file["usrName"];
                 continue;
             }
             // if file
             if (!$fieldIsUrl) {
                 if (!file_exists(getabspath($file["name"]))) {
                     continue;
                 }
             }
             if ($fieldIsUrl) {
                 $href = $file;
             } else {
                 $userFile = $this->upload_handler->buildUserFile($file);
                 $href = runner_htmlspecialchars($userFile["url"]);
                 if (!$title || !$titleField) {
                     $title = $userFile["name"];
                 }
             }
             $link = '<a title="' . $title . '" href="' . $href . '">' . $title . '</a>';
             $value .= ($value == "" ? "" : "<br />") . '<audio controls preload="none" src="' . $href . '">' . $link . '</audio>';
         }
     }
     return $value;
 }
 public function showDBValue(&$data, $keylink)
 {
     $value = "";
     $fileNameF = $this->container->pSet->getFilenameField($this->field);
     if ($fileNameF) {
         $fileName = $data[$fileNameF];
         if (!$fileName) {
             $fileName = "file.bin";
         }
     } else {
         $fileName = "file.bin";
     }
     if (strlen($data[$this->field])) {
         $value = "<a href='" . GetTableLink("getfile", "", "table=" . GetTableURL($this->container->pSet->_table) . "&filename=" . rawurlencode($fileName) . "&field=" . rawurlencode($this->field) . $keylink) . "'>";
         $value .= runner_htmlspecialchars($fileName);
         $value .= "</a>";
     }
     return $value;
 }
 public function showDBValue(&$data, $keylink)
 {
     $value = "";
     $title = "";
     $titleField = $this->container->pSet->getAudioTitleField($this->field);
     if ($titleField) {
         $title = runner_htmlspecialchars($data[$titleField]);
     }
     if (@$data[$this->field] != NULL && $this->container->pageType != PAGE_PRINT) {
         if (!$title) {
             $title = "Track.mp3";
         }
         $href = GetTableLink('getfile', '', 'table=' . GetTableURL($this->container->pSet->_table) . '&field=' . rawurlencode($this->field) . $keylink . '&filename=' . $title);
         $link = '<a title="' . $title . '" href="' . $href . '">' . $title . '</a>';
         $value = '<audio controls preload="none" src="' . $href . '">' . $link . '</audio>';
     } else {
         $value = $title;
     }
     return $value;
 }
Ejemplo n.º 14
0
 public function showDBValue(&$data, $keylink)
 {
     if (!$this->pageObject) {
         return runner_htmlspecialchars($data[$this->field]);
     } elseif ($this->pageObject->pageType == PAGE_EXPORT || $this->pageObject->pageType == PAGE_RPRINT && $this->container->forExport == "excel") {
         return runner_htmlspecialchars($data[$this->field]);
     }
     if ($this->pageObject->pageType != PAGE_LIST) {
         $mapData = $this->pageObject->addGoogleMapData($this->field, $data);
     }
     if ($this->pageObject->pageType != PAGE_PRINT && $this->pageObject->pageType != PAGE_RPRINT) {
         return '<div id="littleMap_' . GoodFieldName($this->field) . '_' . $this->pageObject->recId . '" style="width: ' . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['width'] . 'px; height: ') . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['height'] . 'px;" ') . 'class="littleMap"></div>';
     }
     if ($mapData['markers'][0]['lat'] == "" && $mapData['markers'][0]['lng'] == "") {
         $location = $mapData['markers'][0]['address'];
     } else {
         $location = $mapData['markers'][0]['lat'] . ',' . $mapData['markers'][0]['lng'];
     }
     $src = 'http://maps.googleapis.com/maps/api/staticmap?center=' . $location . '&zoom=' . $mapData['zoom'] . '&size=' . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['width']) . 'x' . ($this->pageObject->googleMapCfg['fieldsAsMap'] == null ? "100" : $this->pageObject->googleMapCfg['fieldsAsMap'][$this->field]['height']) . '&maptype=mobile&markers=' . $location . '&sensor=false';
     return '<img border="0" alt="" src="' . $src . '">';
 }
 public function getValueHighlighted($value, $highlightData)
 {
     $searchWordArr = array();
     foreach ($highlightData['searchWords'] as $searchWord) {
         $word = $searchWord;
         $wordArr = str_split($word);
         $word = implode("([\\-\\(]|\\) )?", $wordArr);
         $searchWordArr[] = '[(]?' . runner_htmlspecialchars($word);
     }
     $searchWord = implode('|', $searchWordArr);
     $searchOpt = $highlightData['searchOpt'];
     switch ($searchOpt) {
         case 'Equals':
             return $this->addHighlightingSpan($value);
         case 'Starts with':
             return preg_replace('/^(' . $searchWord . ')/', $this->addHighlightingSpan('$1'), $value);
         case 'Contains':
             return preg_replace('/(' . $searchWord . ')/', $this->addHighlightingSpan('$1'), $value);
         default:
             return $value;
     }
 }
Ejemplo n.º 16
0
 $strLabel = GetFieldLabel("DashboardUsers", "email");
 $message .= $strLabel . ": " . $values["email"] . "\r\n";
 $strLabel = GetFieldLabel("DashboardUsers", "active");
 $message .= $strLabel . ": " . $values["active"] . "\r\n";
 $strLabel = GetFieldLabel("DashboardUsers", "fullname");
 $message .= $strLabel . ": " . $values["fullname"] . "\r\n";
 $strLabel = GetFieldLabel("DashboardUsers", "groupid");
 $message .= $strLabel . ": " . $values["groupid"] . "\r\n";
 $sentMailResults = runner_mail(array('to' => "*****@*****.**", 'subject' => "Notification on registering", 'body' => $message));
 if (!count($sentMailResults) || $sentMailResults['mailed']) {
     //	show Registartion successful message
     $pageObject->updatePageLayoutAndCSS('', 'success');
     $pageObject->addCommonJs();
     $pageObject->fillSetCntrlMaps();
     $pageObject->addButtonHandlers();
     $pageObject->body["begin"] .= $includes . "<form method=\"POST\" action=\"" . GetTableLink("login") . "\" name=\"loginform\">\n\t\t\t<input type=\"Hidden\" name=username value=\"" . runner_htmlspecialchars($strUsername) . "\">" . "<input type=\"Hidden\" name=password value=\"" . runner_htmlspecialchars($strPassword) . "\"></form>";
     $pageObject->body["end"] .= "<script>";
     $pageObject->body['end'] .= "window.controlsMap = " . my_json_encode($pageObject->controlsHTMLMap) . ";";
     $pageObject->body['end'] .= "window.viewControlsMap = " . my_json_encode($pageObject->viewControlsHTMLMap) . ";";
     $pageObject->body['end'] .= "window.settings = " . my_json_encode($pageObject->jsSettings) . ";</script>";
     $pageObject->body['end'] .= "<script language=\"JavaScript\" src=\"" . GetRootPathForResources("include/runnerJS/RunnerAll.js") . "\"></script>\r\n";
     $pageObject->body["end"] .= "<script>" . $pageObject->PrepareJS() . "</script>";
     $xt->assign("registered_block", true);
     $xt->assign("body", $pageObject->body);
     $xt->assign("loginlink_attrs", "onclick=\"document.forms.loginform.submit();return false;\" id=\"ProceedToLogin\"");
     if (postvalue("onFly") == 1) {
         $pageObject->templatefile = GetTemplateName("", "register_success");
         $xt->assign("id", $id);
         $xt->assign("footer", false);
         $xt->assign("header", false);
         $xt->assign("body", true);
Ejemplo n.º 17
0
    while (($row = $qResult->fetchNumeric()) && count($response) < $numberOfSuggests) {
        $val = $cipherer->DecryptField($f, $row[0]);
        if (IsGuid($fType)) {
            $val = substr($val, 1, -1);
        }
        // "_" is added to conver number type to string
        $fieldControl->suggestValue("_" . $val, $searchFor, $response, $row);
    }
}
$_connection->close();
ksort($response, SORT_STRING);
foreach ($response as $value => $realValue) {
    if (count($result) > $numberOfSuggests) {
        break;
    }
    $strValue = $value[0] == '_' ? substr($value, 1) : $value;
    // .net compatibility issue
    $strRealValue = $realValue[0] == '_' ? substr($realValue, 1) : $realValue;
    $pos = my_stripos($strValue, $searchFor, 0);
    if ($pos === FALSE) {
        $result[] = array("value" => runner_htmlspecialchars($strValue), "realValue" => $strRealValue);
    } else {
        $highlightedValue = runner_htmlspecialchars(substr($strValue, 0, $pos)) . "<b>" . runner_htmlspecialchars(substr($strValue, $pos, strlen($searchFor))) . "</b>" . runner_htmlspecialchars(substr($strValue, $pos + strlen($searchFor)));
        $result[] = array("value" => $highlightedValue, "realValue" => $strRealValue);
    }
}
$returnJSON = array();
$returnJSON['success'] = true;
$returnJSON['result'] = $result;
echo printJSON($returnJSON);
exit;
Ejemplo n.º 18
0
 function buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data)
 {
     parent::buildControl($value, $mode, $fieldNum, $validate, $additionalCtrlParams, $data);
     echo '<input id="' . $this->cfield . '" type="Hidden" name="' . $this->cfield . '" value="' . runner_htmlspecialchars($value) . '">';
     $this->buildControlEnd($validate);
 }
Ejemplo n.º 19
0
foreach ( $arrPrivateCharts as $chart ) {
	if ( $chart["status"] == "public" ) {
		$private_charts .= '<div style="margin-bottom:5px;">';
		$private_charts .= '<span class="ritem" id="' . $chart['name'] . '" title="'.runner_htmlspecialchars($chart['title']).'">';
				$private_charts .= '<img src="images/unlock16.png" title="'."Public chart".'"/>';
		$private_charts .= ( strlen( $chart['title'] ) > $cMaxTitleLength+5 ) ? substr( $chart['title'], 0, $cMaxTitleLength  ) . "..." : $chart['title'];
		$private_charts .= '<a class="action view" type="chart" href="#">['."View".']</a>';
		if(count($arr_tables_db) || count($arr_tables_project) || count($arr_tables_custom))	
			$private_charts .= '<a class="action edit" type="chart" href="#">['."Edit".']</a>';
		$private_charts .= '<a class="action del" type="chart" href="#">['."Delete".']</a>';
		$private_charts .= '</span>';		
		$private_charts .= '</div>'."\r\n";
	} else {
		$private_charts .= '<div style="margin-bottom:5px;">';
		$private_charts .= '<span class="ritem" id="' . $chart['name'] . '" title="'.runner_htmlspecialchars($chart['title']).'">';
				$private_charts .= '<img src="images/lock16.png" title="'."Private chart".'"/>';
		$private_charts .= ( strlen( $chart['title'] ) > $cMaxTitleLength+5 ) ? substr( $chart['title'], 0, $cMaxTitleLength  ) . "..." : $chart['title'];
		$private_charts .= '<a class="action view" type="chart" href="#">['."View".']</a>';
		if(count($arr_tables_db) || count($arr_tables_project) || count($arr_tables_custom))	
			$private_charts .= '<a class="action edit" type="chart" href="#">['."Edit".']</a>';
		$private_charts .= '<a class="action del" type="chart" href="#">['."Delete".']</a>';
		$private_charts .= '</span>';		
		$private_charts .= '</div>'."\r\n";
	}
}

$xt->assign("css_height_report","height:100px;");
$xt->assign("css_height_chart","height:100px;");
if ((count($arrPrivateReports)>6 || count($arrSharedReports)>6) || (count($arrPrivateCharts)>6 || count ($arrSharedCharts)>6)) {
	$xt->assign("css_height_report","height:200px;");
function DisplayMasterTableInfoForPrint_GroupMaster($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "GroupMaster";
    $xt->eventsObject = getEventObject($tName);
    $cipherer = new RunnerCipherer($tName);
    $settings = new ProjectSettings($tName, PAGE_PRINT);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "BranchMaster") {
        $keysAssoc["Groupid"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("Groupid", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("Groupid", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("Groupid", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GroupMaster", "Groupid") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if ($detailtable == "CompanyMaster") {
        $keysAssoc["Groupid"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("Groupid", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("Groupid", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("Groupid", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GroupMaster", "Groupid") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Export", $tName);
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->m_where->toSql($masterQuery), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["Groupid"]));
    $xt->assign("Groupid_mastervalue", $viewControls->showDBValue("Groupid", $data, $keylink));
    $format = $settings->getViewFormat("Groupid");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("Groupid"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("Groupid_class", $class);
    // add class for field header as field value
    $xt->assign("GroupName_mastervalue", $viewControls->showDBValue("GroupName", $data, $keylink));
    $format = $settings->getViewFormat("GroupName");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("GroupName"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("GroupName_class", $class);
    // add class for field header as field value
    $xt->assign("GroupContactPerson_mastervalue", $viewControls->showDBValue("GroupContactPerson", $data, $keylink));
    $format = $settings->getViewFormat("GroupContactPerson");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("GroupContactPerson"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("GroupContactPerson_class", $class);
    // add class for field header as field value
    $xt->assign("GroupContactEmail_mastervalue", $viewControls->showDBValue("GroupContactEmail", $data, $keylink));
    $format = $settings->getViewFormat("GroupContactEmail");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("GroupContactEmail"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("GroupContactEmail_class", $class);
    // add class for field header as field value
    $xt->assign("GroupContactNumber_mastervalue", $viewControls->showDBValue("GroupContactNumber", $data, $keylink));
    $format = $settings->getViewFormat("GroupContactNumber");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("GroupContactNumber"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("GroupContactNumber_class", $class);
    // add class for field header as field value
    $xt->assign("GroupCloudFolder_mastervalue", $viewControls->showDBValue("GroupCloudFolder", $data, $keylink));
    $format = $settings->getViewFormat("GroupCloudFolder");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("GroupCloudFolder"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("GroupCloudFolder_class", $class);
    // add class for field header as field value
    $xt->assign("IsActive_mastervalue", $viewControls->showDBValue("IsActive", $data, $keylink));
    $format = $settings->getViewFormat("IsActive");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("IsActive"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("IsActive_class", $class);
    // add class for field header as field value
    $layout = GetPageLayout("GroupMaster", 'masterprint');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->displayPartial(GetTemplateName("GroupMaster", "masterprint"));
}
Ejemplo n.º 21
0
 public function showDBValue($value, $keyLink)
 {
     $imageValue = "";
     $this->initUploadHandler();
     $this->upload_handler->tkeys = $keyLink;
     $filesArray = my_json_decode($value);
     if (!is_array($filesArray) || count($filesArray) == 0) {
         if ($value == "") {
             $filesArray = array();
         } else {
             $uploadedFile = $this->upload_handler->get_file_object($value);
             if (is_null($uploadedFile)) {
                 $filesArray = array();
             } else {
                 $filesArray = array($uploadedFile);
             }
         }
     }
     foreach ($filesArray as $imageFile) {
         $userFile = $this->upload_handler->buildUserFile($imageFile);
         if ($this->pageObject->pSetEdit->getViewFormat($this->field) == FORMAT_FILE) {
             $imageValue .= $imageValue != "" ? "</br>" : "";
             $imageValue .= '<a href="' . runner_htmlspecialchars($userFile["url"]) . '">' . runner_htmlspecialchars($imageFile["usrName"] != "" ? $imageFile["usrName"] : $imageFile["name"]) . '</a>';
         } else {
             if (CheckImageExtension($imageFile["name"])) {
                 $imageValue .= $imageValue != "" ? "</br>" : "";
                 if ($this->pageObject->pSetEdit->showThumbnail($this->field)) {
                     $thumbname = $userFile["thumbnail_url"];
                     $imageValue .= "<a target=_blank";
                     $imageValue .= " href=\"" . runner_htmlspecialchars($userFile["url"]) . "\" class='zoombox'>";
                     $imageValue .= "<img";
                     if ($thumbname == "" || $imageFile["name"] == $imageFile["thumbnail"]) {
                         $imgWidth = $this->pageObject->pSetEdit->getImageWidth($this->field);
                         $imageValue .= $imgWidth ? " width=" . $imgWidth : "";
                         $imgHeight = $this->pageObject->pSetEdit->getImageHeight($this->field);
                         $imageValue .= $imgHeight ? " height=" . $imgHeight : "";
                     }
                     $imageValue .= " border=0";
                     if ($this->is508) {
                         $imageValue .= " alt=\"" . runner_htmlspecialchars($userFile["name"]) . "\"";
                     }
                     $imageValue .= " src=\"" . runner_htmlspecialchars($userFile["thumbnail_url"]) . "\"></a>";
                 } else {
                     $imageValue .= "<img";
                     $imgWidth = $this->pageObject->pSetEdit->getImageWidth($this->field);
                     $imageValue .= $imgWidth ? " width=" . $imgWidth : "";
                     $imgHeight = $this->pageObject->pSetEdit->getImageHeight($this->field);
                     $imageValue .= $imgHeight ? " height=" . $imgHeight : "";
                     $imageValue .= " border=0";
                     if ($this->is508) {
                         $imageValue .= " alt=\"" . runner_htmlspecialchars($userFile["name"]) . "\"";
                     }
                     $imageValue .= " src=\"" . runner_htmlspecialchars($userFile["url"]) . "\">";
                 }
             }
         }
     }
     return $imageValue;
 }
Ejemplo n.º 22
0
		$tbl=$tbl_name["sqlname"];
		$isStorProc=$tbl_name["isStorProc"];
	}
	else
	{
		$tbl=$tbl_name;
		$isStorProc=false;
	}	
	if(!$isStorProc)
	{
		$selected = "";
		if ( !empty( $_SESSION['webreports']['tables'] ) ){
			if ( in_array( $tbl, $_SESSION['webreports']['tables'] ) )
				$selected = "selected";
		}
			$tables .= '<option ' . $selected . ' value="' . runner_htmlspecialchars($tbl) . '">'.(!is_wr_project() ? $tbl : getCaptionTable($tbl)) . (is_wr_project() ? (getCaptionTable($tbl)!=$tbl ? "&nbsp;(".$tbl.")" : "" ) : "").'</option>'."\r\n";
	}
}

if (@$_SESSION['webreports']['settings']['title'] != "") {
	$xt->assign("report_title",", "."Title".": ".@$_SESSION['webreports']['settings']['title']);
} else {
	$xt->assign("report_title","");
}
$xt->assign("tables", $tables);

if(!count($arr_tables_db) && !count($arr_tables_project) || !count($arr_tables_custom) && !count($arr_tables_project) || !count($arr_tables_custom) && !count($arr_tables_db))
	$xt->assign("radio_style","style='display:none';");
	
if(count($arr_tables_db))
	$xt->assign("view_radio_db",true);
Ejemplo n.º 23
0
 /**
 Private Array to XML.
 changes php arrays into xml text recursively.
 @param arg_arr_array the array to be changed into XML.
 @param arg_int_pad_number the number of pads of the current tag.
 @param arg_str_pad the indentation pad text.
 @return String xml text.
 @see array_to_xml().
 @access Private.
 */
 function prv_array_to_xml($arg_arr_array, $arg_int_pad_number = 0, $arg_str_pad = "")
 {
     $str_xml = "";
     $keys = array_keys($arg_arr_array);
     for ($i = 0; $i < count($keys); $i++) {
         $k = $keys[$i];
         $v = $arg_arr_array[$k];
         $str_xml .= $this->pad($arg_int_pad_number, $arg_str_pad) . "<attr value=\"" . runner_htmlspecialchars($k) . "\">";
         if (is_array($v)) {
             $str_xml .= $this->prv_array_to_xml($v, $arg_int_pad_number + 1, $arg_str_pad);
         } else {
             $str_xml .= $this->pad($arg_int_pad_number + 1, $arg_str_pad) . runner_htmlspecialchars($v);
         }
         $str_xml .= $this->pad($arg_int_pad_number, $arg_str_pad) . "</attr>\n";
     }
     return $str_xml;
 }
Ejemplo n.º 24
0
$xt->assign("guestlink_block", isGuestLoginAvailable());
$_SESSION["MyURL"] = $myurl;
if ($myurl && $_SESSION["MyUrlAccess"]) {
    $xt->assign("guestlink_attrs", "href=\"" . $myurl . "\"");
} else {
    $xt->assign("guestlink_attrs", "href=\"" . GetTableLink("menu") . "\"");
}
if (postvalue("username")) {
    $xt->assign("username_attrs", ($is508 == true ? "id=\"username\" " : "") . "value=\"" . runner_htmlspecialchars($pUsername) . "\"");
} else {
    $xt->assign("username_attrs", ($is508 == true ? "id=\"username\" " : "") . "value=\"" . runner_htmlspecialchars(refine(@$_COOKIE["username"])) . "\"");
}
if (postvalue("password")) {
    $xt->assign("password_attrs", ($is508 == true ? " id=\"password\"" : "") . " value=\"" . runner_htmlspecialchars($pPassword) . "\"");
} else {
    $xt->assign("password_attrs", ($is508 == true ? " id=\"password\"" : "") . " value=\"" . runner_htmlspecialchars(refine(@$_COOKIE["password"])) . "\"");
}
if (@$_GET["message"] == "expired") {
    $message = "Your session has expired." . "Please login again.";
}
if (@$_GET["message"] == "invalidlogin") {
    $message = "Invalid Login";
}
if ($message) {
    $xt->assign("message_block", true);
    $xt->assign("message", "<div class='message rnr-error'>" . $message . "</div>");
}
$pageObject->body["begin"] .= GetBaseScriptsForPage(false);
$pageObject->body["begin"] .= "<form method=\"post\" action='" . GetTableLink("login") . "' id=\"form1\" name=\"form1\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"btnSubmit\" value=\"Login\">";
$pageObject->body["end"] .= "</form>";
$pageObject->addCommonJs();
Ejemplo n.º 25
0
				$strMessage = "User"." ".$strUsernameEmail." "."is not registered.";
		}

	}

}

$xt->assign("submit_attrs","onclick='document.forms.form1.submit();return false;'");

$xt->assign("username_email_label",true);
$is508=isEnableSection508();
if($is508)
{
	$xt->assign_section("username_email_label","<label for=\"username_email\">","</label>");
}
$xt->assign("username_email_attrs",($is508==true ? "id=\"username_email\" " : "")."value=\"".runner_htmlspecialchars($strUsernameEmail)."\"");

if(@$strMessage)
{
	$xt->assign("message","<div class='message rnr-error'>".$strMessage."</div>");
	$xt->assign("message_block",true);
	if($pageObject->isCaptchaOk==1) 
		$_SESSION[$sessPrefix."_count_captcha"]=$_SESSION[$sessPrefix."_count_captcha"]+1;
}

$pageObject->body["begin"] .= GetBaseScriptsForPage(false);

$pageObject->body["begin"] .="<script language = JavaScript>
function OnKeyDown()
{
	e = window.event;
Ejemplo n.º 26
0
 function fillCheckAttr(&$record, $data, $keyblock)
 {
     $checkbox_attrs = "name=\"selection[]\" value=\"" . runner_htmlspecialchars(@$data[$this->linkField]) . "\" id=\"check" . $this->recId . "\"";
     $record["checkbox"] = array("begin" => "<input type='checkbox' " . $checkbox_attrs . ">", "data" => array());
 }
		$xt->assign("next_button", true);
	 		$nextlink .="editid1=".runner_htmlspecialchars(rawurlencode($next[1-1]));
		$xt->assign("nextbutton_attrs", "id=\"nextButton".$id."\"");
	}
	else if( count($prev) )
	{
		$xt->assign("next_button", true);
		$xt->assign("nextbutton_class", "rnr-invisible-button");
	}
	else 
		$xt->assign("next_button", false);	
		
	if(count($prev))
	{
		$xt->assign("prev_button", true);
			$prevlink .="editid1=".runner_htmlspecialchars(rawurlencode($prev[1-1]));
		$xt->assign("prevbutton_attrs", "id=\"prevButton".$id."\"");
	}
	else if( count($next) )
	{
		$xt->assign("prev_button", true);
		$xt->assign("prevbutton_class", "rnr-invisible-button");
	}
	else
		$xt->assign("prev_button", false);
//End show Next Prev button
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	if(!$inlineview) 
	{
		$xt->assign("back_button",true);
Ejemplo n.º 28
0
}	
elseif (postvalue('cname'))
{
	$contents_block["begin"].='action="'.GetTableLink("dchart").'?cname='.runner_htmlspecialchars(rawurlencode(postvalue("cname"))).'" ';
}	
$contents_block["begin"] .= 'name="editform"><input type="hidden" id="a" name="a" value="advsearch">';
$contents_block["end"] = '</form>';
$xt->assignbyref("contents_block",$contents_block);

$xt->assign("searchbutton_attrs", 'name="SearchButton" onclick="document.forms.editform.submit();"');
$xt->assign("resetbutton_attrs", 'onclick="return ResetControls();"');
$xt->assign("backbutton_attrs", "onclick=\"document.forms.editform.a.value='return'; document.forms.editform.submit();\"");
$xt->assign("conditions_block",true);
$xt->assign("search_button",true);
$xt->assign("reset_button",true);
$xt->assign("back_button",true);
$xt->assign("wr_pagestylepath", $wr_pagestylepath);

$xt->assign("dynamic", "true");
if (postvalue('rname')) {
	$xt->assign("rname", postvalue('rname'));
}
if (postvalue('cname')) {
	$xt->assign("cname", postvalue('cname'));
}
	
$templatefile = GetTemplateName("", "dsearch");

$xt->assign( "reportTitle", runner_htmlspecialchars( $xml_array['settings']['title'] ) );
$xt->display($templatefile);
?>
Ejemplo n.º 29
0
function DisplayMasterTableInfo_GE_ESTADO_CIVIL($params)
{
    global $cman;
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $xt = new Xtempl();
    $tName = "GE.ESTADO_CIVIL";
    $settings = new ProjectSettings($tName, PAGE_LIST);
    $cipherer = new RunnerCipherer($tName);
    $connection = $cman->byTable($tName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $keysAssoc = array();
    $showKeys = "";
    if ($detailtable == "GE.PERSONA_DISPONIBLE") {
        $keysAssoc["ESTADO_CIVIL_ID"] = $keys[1 - 1];
        $where .= RunnerPage::_getFieldSQLDecrypt("ESTADO_CIVIL_ID", $connection, $settings, $cipherer) . "=" . $cipherer->MakeDBValue("ESTADO_CIVIL_ID", $keys[1 - 1], "", true);
        $keyValue = $viewControls->showDBValue("ESTADO_CIVIL_ID", $keysAssoc);
        $showKeys .= " " . GetFieldLabel("GE_ESTADO_CIVIL", "ESTADO_CIVIL_ID") . ": " . $keyValue;
        $xt->assign('showKeys', $showKeys);
    }
    if (!$where) {
        return;
    }
    $str = SecuritySQL("Search");
    if (strlen($str)) {
        $where .= " and " . $str;
    }
    $strWhere = whereAdd($masterQuery->WhereToSql(), $where);
    if (strlen($strWhere)) {
        $strWhere = " where " . $strWhere . " ";
    }
    $strSQL = $masterQuery->HeadToSql() . ' ' . $masterQuery->FromToSql() . $strWhere . $masterQuery->TailToSql();
    LogInfo($strSQL);
    $data = $cipherer->DecryptFetchedArray($connection->query($strSQL)->fetchAssoc());
    if (!$data) {
        return;
    }
    // reassign pagetitlelabel function adding extra params
    $xt->assign_function("pagetitlelabel", "xt_pagetitlelabel", array("record" => $data, "settings" => $settings));
    $keylink = "";
    $keylink .= "&key1=" . runner_htmlspecialchars(rawurlencode(@$data["ESTADO_CIVIL_ID"]));
    $xt->assign("ESTADO_CIVIL_ID_mastervalue", $viewControls->showDBValue("ESTADO_CIVIL_ID", $data, $keylink));
    $format = $settings->getViewFormat("ESTADO_CIVIL_ID");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("ESTADO_CIVIL_ID"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("ESTADO_CIVIL_ID_class", $class);
    // add class for field header as field value
    $xt->assign("NOMBRE_mastervalue", $viewControls->showDBValue("NOMBRE", $data, $keylink));
    $format = $settings->getViewFormat("NOMBRE");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("NOMBRE"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("NOMBRE_class", $class);
    // add class for field header as field value
    $xt->assign("FEC_CREACION_mastervalue", $viewControls->showDBValue("FEC_CREACION", $data, $keylink));
    $format = $settings->getViewFormat("FEC_CREACION");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("FEC_CREACION"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("FEC_CREACION_class", $class);
    // add class for field header as field value
    $xt->assign("USUARIO_CREACION_mastervalue", $viewControls->showDBValue("USUARIO_CREACION", $data, $keylink));
    $format = $settings->getViewFormat("USUARIO_CREACION");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("USUARIO_CREACION"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("USUARIO_CREACION_class", $class);
    // add class for field header as field value
    $xt->assign("FEC_ULTIMA_MOD_mastervalue", $viewControls->showDBValue("FEC_ULTIMA_MOD", $data, $keylink));
    $format = $settings->getViewFormat("FEC_ULTIMA_MOD");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("FEC_ULTIMA_MOD"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("FEC_ULTIMA_MOD_class", $class);
    // add class for field header as field value
    $xt->assign("USUARIO_ULTIMA_MOD_mastervalue", $viewControls->showDBValue("USUARIO_ULTIMA_MOD", $data, $keylink));
    $format = $settings->getViewFormat("USUARIO_ULTIMA_MOD");
    $class = " rnr-field-text";
    if ($format == FORMAT_FILE) {
        $class = ' rnr-field-file';
    }
    if ($format == FORMAT_AUDIO) {
        $class = ' rnr-field-audio';
    }
    if ($format == FORMAT_CHECKBOX) {
        $class = ' rnr-field-checkbox';
    }
    if ($format == FORMAT_NUMBER || IsNumberType($settings->getFieldType("USUARIO_ULTIMA_MOD"))) {
        $class = ' rnr-field-number';
    }
    $xt->assign("USUARIO_ULTIMA_MOD_class", $class);
    // add class for field header as field value
    $layout = GetPageLayout("GE_ESTADO_CIVIL", 'masterlist');
    if ($layout) {
        $xt->assign("pageattrs", 'class="' . $layout->style . " page-" . $layout->name . '"');
    }
    $xt->displayPartial(GetTemplateName("GE_ESTADO_CIVIL", "masterlist"));
}
Ejemplo n.º 30
0
    $data = $qResult->fetchNumeric();
    if (!$data) {
        echo "Invalid validation code.";
        return;
    }
    $dbPassword = $regCipherer->DecryptField("password", $data[0]);
    $usercode = $username . md5($dbPassword);
    if ($code != md5($usercode)) {
        echo "Invalid validation code.";
        return;
    }
    $sql = "update " . $pageObject->connection->addTableWrappers("ConsolidatedStockEnquiry_users") . " set " . $pageObject->connection->addFieldWrappers("active1") . "=1 " . " where " . $pageObject->getFieldSQLDecrypt("username") . "=" . $strUsername;
    $pageObject->connection->exec($sql);
    $pageObject->updatePageLayoutAndCSS('', 'success');
    $pageObject->body["begin"] .= "<form method=\"POST\" action=\"" . GetTableLink("login") . "\" name=\"loginform\">\n\t<input type=\"Hidden\" name=\"username\" value=\"" . runner_htmlspecialchars($username) . "\">";
    $pageObject->body["begin"] .= "<input type=\"Hidden\" name=\"password\" value=\"" . runner_htmlspecialchars($data["password"]) . "\">";
    $pageObject->body["begin"] .= "</form>";
    $xt->assign("body", $pageObject->body);
    $xt->assign("registered_block", true);
    $xt->assign("loginlink_attrs", "onclick=\"document.forms.loginform.submit();return false;\" id=\"ProceedToLogin\"");
    return $pageObject->display(GetTemplateName("", "register_success"));
    // return $pageObject->display for .net compatibility
}
// proccess captcha
if ($isUseCaptcha) {
    $pageObject->doCaptchaCode();
}
if (!$pageObject->isCaptchaOk) {
    $allow_registration = false;
}
if (@$_POST["btnSubmit"] == "Register") {