Ejemplo n.º 1
0
	/**
	 * Get filters blocks' data and Assing it to the Filter panel's blocks
	 */
	public function buildFilterPanel()
	{	
		include_once getabspath("classes/controls/FilterControl.php");
		foreach($this->filterFileds as $fieldName) 
		{			
			if( $this->pageObj->pSet->hasDependantFilter($fieldName) )
				continue;
							
			$filterFieldName = $fieldName;
			$filterControl = FilterControl::getFilterControl($filterFieldName, $this->pageObj, $this->id, $this->viewControls);			
			
			$filterCtrlBlocks = $filterControl->buildFilterCtrlBlockArray($this->pageObj);
			$filterButtonParams = $filterControl->getFilterButtonParams();
			$filterExtraControls = $filterControl->getFilterExtraControls();
			
			while( $filterControl->dependant )
			{
				$filterFieldName = $filterControl->parentFilterName;			
				$filterControl = FilterControl::getFilterControl($filterFieldName, $this->pageObj, $this->id, $this->viewControls);
					
				$filterCtrlBlocks = $filterControl->buildFilterCtrlBlockArray( $this->pageObj, $filterCtrlBlocks );		
				$filterButtonParams = $filterControl->getFilterButtonParams( $filterButtonParams );
				$filterExtraControls = $filterControl->getFilterExtraControls( $filterExtraControls );
			}			
			
			$filterState = $filterControl->getFilterState();
			
			$this->assignFilterPanelField($filterFieldName, $filterCtrlBlocks, $filterState, $filterButtonParams, $filterExtraControls);			
		}
	}
Ejemplo n.º 2
0
 function Delete()
 {
     $path = $this->destPath;
     if (!$this->destPathIsAbsolute) {
         $path = getabspath($path);
     }
     $last = substr($path, strlen($path) - 1);
     if ($last != "/" && $last != "\\") {
         $path .= "/";
     }
     runner_delete_file($path . $this->destFilename);
 }
Ejemplo n.º 3
0
 function initUploadHandler()
 {
     if (is_null($this->upload_handler)) {
         require_once getabspath("classes/uploadhandler.php");
         $this->upload_handler = new UploadHandler(getOptionsForMultiUpload($this->container->pSet, $this->field));
         if (!is_null($this->pageObject)) {
             $this->upload_handler->pSet = $this->pageObject->pSetEdit;
         } else {
             $this->upload_handler->pSet = $this->container->pSet;
         }
         $this->upload_handler->field = $this->field;
         $this->upload_handler->table = $this->container->pSet->_table;
         $this->upload_handler->pageType = $this->container->pageType;
     }
 }
Ejemplo n.º 4
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;
 }
	function getFinalUploadFolder($field, $fileData = array())
	{
		if($this->isAbsolute($field))
			$path = $this->getUploadFolder($field, $fileData);
		else
			$path = getabspath($this->getUploadFolder($field, $fileData));
				if(strlen($path) && substr($path,strlen($path)-1) != "/")
			$path.="/";
		return $path;
	}
Ejemplo n.º 6
0
$tableCaptions[""]["GE_PERSONA_DISPONIBLEXIDIOMA"] = "PERSONA DISPONIBLEXIDIOMA";
$tableCaptions[""]["GE_PERSONA_DISPONIBLEXOCUPACION"] = "PERSONA DISPONIBLEXOCUPACION";
$tableCaptions[""]["GE_PERSONA_DISPONIBLEXRELIGION"] = "PERSONA DISPONIBLEXRELIGION";
$tableCaptions[""]["GE_VISITA"] = "VISITA";
$tableCaptions[""]["GE_PERSONA_DISPONIBLEXINTERES"] = "PERSONA DISPONIBLEXINTERES";
$tableCaptions[""]["GE_PERSONA_DISPONIBLEXMASCOTA"] = "PERSONA DISPONIBLEXMASCOTA";
$tableCaptions[""]["GE_FOTO"] = "FOTO";
$tableCaptions[""]["GE_BEBEDOR"] = "GE BEBEDOR";
$tableCaptions[""]["GE_PERSONA"] = "GE PERSONA";
$globalEvents = new class_GlobalEvents();
$tableEvents = array();
$mlang_defaultlang = "Spanish";
$page_titles[".global"] = array();
if (mlang_getcurrentlang() == "Spanish") {
}
if (mlang_getcurrentlang() == "") {
}
include getabspath('classes/security.php');
include getabspath("connections/dbfunctions_legacy.php");
include getabspath("connections/ConnectionManager.php");
$cman = new ConnectionManager();
// default connection link #9875
$conn = $cman->getDefault()->conn;
$isGroupSecurity = false;
$isUseRTEBasic = true;
$isUseRTECK = false;
$isUseRTEInnova = false;
$caseInsensitiveUsername = 0;
include getabspath('classes/projectsettings.php');
include_once getabspath('classes/runnerpage.php');
function runner_error_handler($errno, $errstr, $errfile, $errline)
{
    global $strLastSQL;
    if ($errno == 2048) {
        return 0;
    }
    if ($errno == 8192) {
        if ($errstr == "Assigning the return value of new by reference is deprecated") {
            return 0;
        }
        if (strpos($errstr, "set_magic_quotes_runtime")) {
            return 0;
        }
    }
    if ($errno == 2 && strpos($errstr, "has been disabled for security reasons")) {
        return 0;
    }
    if ($errno == 2 && strpos($errstr, "Data is not in a recognized format")) {
        return 0;
    }
    if ($errno == 8 && !strncmp($errstr, "Undefined index", 15)) {
        return 0;
    }
    if (strpos($errstr, "It is not safe to rely on the system's timezone settings.")) {
        return 0;
    }
    if (strpos($errstr, "fopen(") === 0) {
        return 0;
    }
    // show error htm
    if (!class_exists("Xtempl")) {
        require_once getabspath("include/xtempl.php");
    }
    $xt = new Xtempl();
    $xt->assign('errno', $errno);
    $xt->assign('errstr', $errstr);
    $url = $_SERVER["SERVER_NAME"] . $_SERVER["SCRIPT_NAME"];
    if (array_key_exists("QUERY_STRING", $_SERVER)) {
        $url .= "?" . htmlspecialchars($_SERVER["QUERY_STRING"]);
    }
    $xt->assign('url', $url);
    $xt->assign('errfile', $errfile);
    $xt->assign('errline', $errline);
    $sqlStr = isset($strLastSQL) ? htmlspecialchars(substr($strLastSQL, 0, 1024)) : '';
    $xt->assign('sqlStr', $sqlStr);
    $debugInfoArr = parse_backtrace($errfile, $errline);
    $xt->assign_loopsection('debugRow', $debugInfoArr);
    $xt->display('error.htm');
    exit(0);
}
Ejemplo n.º 8
0
if (!$PageSize) {
    $PageSize = $pageObject->pSet->getInitialPageSize();
}
if ($PageSize < 0) {
    $all = 1;
}
$recno = 1;
$records = 0;
$maxpages = 1;
$pageindex = 1;
$pageno = 1;
// build arrays for sort (to support old code in user-defined events)
if ($eventObj->exists("ListQuery")) {
    $arrFieldForSort = array();
    $arrHowFieldSort = array();
    require_once getabspath('classes/orderclause.php');
    $fieldList = unserialize($_SESSION[$strTableName . "_orderFieldsList"]);
    for ($i = 0; $i < count($fieldList); $i++) {
        $arrFieldForSort[] = $fieldList[$i]->fieldIndex;
        $arrHowFieldSort[] = $fieldList[$i]->orderDirection;
    }
}
if (!$all) {
    if ($numrows) {
        $maxRecords = $numrows;
        $maxpages = ceil($maxRecords / $PageSize);
        if ($mypage > $maxpages) {
            $mypage = $maxpages;
        }
        if ($mypage < 1) {
            $mypage = 1;
Ejemplo n.º 9
0
<?php

include_once getabspath("include/pad_pad_sspd_settings.php");
function DisplayMasterTableInfo_pad_pad_sspd($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_sspd";
    //$strSQL = "SELECT id,   tahun,   sspdno,   sspdtgl,   sspdjam,   invoice_id,   keterangan,   bulan_telat,   hitung_bunga,   denda,   bunga,   jml_bayar,   sisa,   jenis_bayar,   printed,   tp_id,   is_validated,   is_valid,   enabled,   created,   create_uid,   updated,   update_uid,   petugas_id,   pejabat_id  FROM \"pad\".pad_sspd ";
    $cipherer = new RunnerCipherer($strTableName);
    $settings = new ProjectSettings($strTableName, PAGE_PRINT);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_sspd_masterprint"] = $layout;
    $showKeys = "";
    if ($detailtable == "public.pad_payment") {
Ejemplo n.º 10
0
<?php

require_once getabspath('classes/controls/TextControl.php');
class ReadOnlyField extends TextControl
{
    function ReadOnlyField($field, $pageObject, $id)
    {
        parent::EditControl($field, $pageObject, $id);
        $this->format = EDIT_FORMAT_READONLY;
    }
    function buildControl($value, $mode, $fieldNum = 0, $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="' . htmlspecialchars($value) . '">';
        $this->buildControlEnd($validate);
    }
}
Ejemplo n.º 11
0
<?php

@ini_set("display_errors", "1");
@ini_set("display_startup_errors", "1");
require_once "include/dbcommon.php";
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
require_once "classes/charts.php";
require_once getabspath("include/xml.php");
require_once getabspath("classes/searchclause.php");
if (!isLogged()) {
    Security::saveRedirectURL();
    HeaderRedirect("login", "", "message=expired");
    return;
}
$xml = new xml();
$chrt_strXML = "";
if (checkTableName(postvalue("chartname"), titCHART)) {
    include_once "include/" . postvalue("chartname") . "_variables.php";
    $chrt_strXML = GetChartXML(postvalue("chartname"));
    $chrt_array = $xml->xml_to_array($chrt_strXML);
    $_SESSION["webobject"]["table_type"] = "project";
    $_SESSION["object_sql"] = "";
}
$webchart = false;
if (!$chrt_strXML) {
    $sessPrefix = "webchart" . postvalue('cname');
    $chrt_strXML = LoadSelectedChart(postvalue('cname'));
    $webchart = true;
    $chrt_array = $xml->xml_to_array($chrt_strXML);
    if (is_wr_project()) {
        include_once "include/" . $chrt_array['settings']['short_table_name'] . "_variables.php";
$options["id"] = postvalue("id") ? postvalue("id") : 1;
$options["mode"] = $mode;
$options['xt'] =& $xt;
$options['mainMasterPageType'] = postvalue("mainmasterpagetype");
$options['masterPageType'] = postvalue("masterpagetype");
$options["masterTable"] = postvalue("mastertable");
$options["masterId"] = postvalue("masterid");
$options["firstTime"] = postvalue("firsttime");
$i = 1;
while (isset($_REQUEST["masterkey" . $i])) {
    $options["masterKeysReq"][$i] = $_REQUEST["masterkey" . $i];
    $i++;
}
$pageObject = ListPage::createListPage($strTableName, $options);
unset($_SESSION["message_add"]);
unset($_SESSION["message_edit"]);
// prepare code for build page
$pageObject->prepareForBuildPage();
$includesArr = array();
$masterTablesInfoArr = GetMasterTablesArr($strTableName);
for ($i = 0; $i < count($masterTablesInfoArr); $i++) {
    if ($masterTablesInfoArr[$i]['dispInfo']) {
        $includesArr[] = getabspath("include/" . $masterTablesInfoArr[$i]['mShortTable'] . "_masterlist.php");
    }
}
//include files if need
for ($i = 0; $i < count($includesArr); $i++) {
    include $includesArr[$i];
}
// show page depends of mode
$pageObject->showPage();
Ejemplo n.º 13
0
				}
			    } else {
				$filename = "file.bin";
			    }
			    if (strlen(db_fld_value($data, fldname($fld)))) {
				$value = "<a href=\"" . GetTableLink($rpt_array['short_table_name'], "getfile") . "?filename=" . rawurlencode($filename) . "&field=" . runner_htmlspecialchars(rawurlencode(fldname($fld))) . $keylink . "\">";
				$value.=runner_htmlspecialchars($filename);
				$value.="</a>";
			    }
			}
		    } elseif (!is_wr_project()) {
			$value = WRProcessLargeText($viewControls->getControl(gfldname($fld), $fld['view_format'])->showDBValue($data, ""), fldname($fld), count($rowinfo), 100, $render_mode, $fld['label']);
		    } elseif (( $fld["edit_format"] == EDIT_FORMAT_LOOKUP_WIZARD || $fld["edit_format"] == EDIT_FORMAT_RADIO ) && ($fld['lookupobj_lookuptype'] == LT_LOOKUPTABLE || $fld['lookupobj_lookuptype'] == LT_QUERY)) {
			//delete tjhis after the tests on feature #6356
			//$value = DisplayLookupWizard(fldname($fld), $data[fldname($fld)], $data, $keylink, $render_mode, PAGE_REPORT);
			include_once getabspath('classes/controls/ViewLookupWizardField.php');
			if (!$viewControls->viewControls[fldname($fld)])
			    $viewControls->viewControls[fldname($fld)] = new ViewLookupWizardField(fldname($fld), $viewControls, null);
			$value = $viewControls->showDBValue($viewControls, $data, $keylink);
		    }
		    elseif ($fld["view_format"] != FORMAT_CUSTOM && $fld["view_format"] != FORMAT_FILE_IMAGE && $fld["view_format"] != FORMAT_FILE && $fld["view_format"] != FORMAT_HYPERLINK && $fld["view_format"] != FORMAT_EMAILHYPERLINK && $fld["view_format"] != FORMAT_CHECKBOX) {
			$value = WRProcessLargeText($viewControls->getControl(gfldname($fld), $fld['view_format'])->showDBValue($data, "")
				, fldname($fld)
				, count($rowinfo), $gSettings->getNumberOfChars(), $render_mode, $fld['label']);
		    } else {
			$value = $viewControls->getControl(fldname($fld), $fld['view_format'])->showDBValue($data, "");
		    }
		    if ($summary[0]["sds"]) {
			$row["1" . GoodFieldName(fldname($fld)) . "_value"] = $value;
			$arrFields["data"][0][fldname($fld)] = $value;
		    }
	function isSystemControl($className)
	{
		include_once(getabspath("classes/controls/Control.php"));
		$cTypes = new ControlTypes();
		if($this->pageType == PAGE_SEARCH || $this->pageType == PAGE_LIST)
			return isset($cTypes->forSearch[$className]);
		else
			return isset($cTypes->forEdit[$className]);
	}
$proto15["m_column"]=$obj;
$proto15["m_contained"] = array();
$proto15["m_strCase"] = "";
$proto15["m_havingmode"] = false;
$proto15["m_inBrackets"] = false;
$proto15["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto15);

$proto13["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto13);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_webreport_users = createSqlQuery_webreport_users();

				
	
$tdatawebreport_users[".sqlquery"] = $queryData_webreport_users;

include_once(getabspath("include/webreport_users_events.php"));
$tableEvents["webreport_users"] = new eventclass_webreport_users;
$tdatawebreport_users[".hasEvents"] = true;

$cipherer = new RunnerCipherer("webreport_users");

?>
Ejemplo n.º 16
0
 public function get_file_object($file_name)
 {
     $file_path = $this->pSet->getUploadFolder($this->field) . $file_name;
     if (is_file($file_path) && $file_name[0] !== '.') {
         $file = array();
         $file["error"] = false;
         $file["name"] = $file_path;
         $file["usrName"] = $file_name;
         $path_parts = $this->pathinfo_local($file_name);
         $file["type"] = getContentTypeByExtension($path_parts["extension"]);
         $file["size"] = filesize($file_path);
         $file["url"] = rawurlencode($file_path);
         $file["thumbnail"] = "";
         foreach ($this->options['image_versions'] as $version => $options) {
             if ($file_path) {
                 $thumbPath = $this->pSet->getUploadFolder($this->field) . $this->pSet->getStrThumbnail($this->field) . $file_name;
                 if (is_file(getabspath($thumbPath))) {
                     $file["thumbnail"] = $thumbPath;
                     $path_parts = $this->pathinfo_local($thumbPath);
                     $file["thumbnail_type"] = getContentTypeByExtension($path_parts["extension"]);
                     $file["thumbnail_size"] = filesize(getabspath($thumbPath));
                 } else {
                     $file["thumbnail"] = $file_path;
                     $file["thumbnail_type"] = $file["type"];
                     $file["thumbnail_size"] = $file["size"];
                 }
             }
         }
         $this->set_file_delete_url($file);
         return $file;
     }
     return null;
 }
<?php

include_once getabspath("include/pad_pad_kelurahan_settings.php");
function DisplayMasterTableInfo_pad_pad_kelurahan($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    $detailPageObj = $params["detailPageObj"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "pad.pad_kelurahan";
    $settings = new ProjectSettings($strTableName, PAGE_LIST);
    $cipherer = new RunnerCipherer($strTableName);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_LIST);
    $where = "";
    $mKeys = array();
    $showKeys = "";
    global $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterlist", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterlistheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterlistfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["pad_pad_kelurahan_masterlist"] = $layout;
Ejemplo n.º 18
0
<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");

include("include/dbcommon.php");
include('classes/remindpwdpage.php');
include('include/xtempl.php');
require_once(getabspath("classes/cipherer.php"));

$reminded = false;
$sentMailResults = array();

$cipherer = new RunnerCipherer("webreport_users");

$xt = new Xtempl();
$sessPrefix = 'remind';
$id = postvalue("id")!=="" ? postvalue("id") : 1;
$cEmailField = "email";




$layout = new TLayout("remind2", "BoldOrange", "MobileOrange");
$layout->version = 2;
$layout->blocks["top"] = array();
$layout->containers["remind"] = array();
$layout->containers["remind"][] = array("name"=>"remindheader", 
	"block"=>"remindheader", "substyle"=>2  );

$layout->containers["remind"][] = array("name"=>"message", 
	"block"=>"message_block", "substyle"=>1  );
<?php

include_once getabspath("include/Module_settings.php");
function DisplayMasterTableInfo_Module($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "dbo.Module";
    //$strSQL = "SELECT ID,   [Module Type],   [Module Status],   [Module Condition],   [Serial Num],   [Entry Date]  FROM dbo.[Module]";
    $sqlHead = "SELECT ID,   [Module Type],   [Module Status],   [Module Condition],   [Serial Num],   [Entry Date]";
    $sqlFrom = "FROM dbo.[Module]";
    $sqlWhere = "";
    $sqlTail = "";
    $where = "";
    global $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "BoldOrange", "MobileOrange");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["Module_masterprint"] = $layout;
    if ($detailtable == "dbo.Anomalies") {
        $where .= GetFullFieldName("ID") . "=" . make_db_value("ID", $keys[1 - 1]);
Ejemplo n.º 20
0
<?php

require_once "include/phpfunctions.php";
header("Content-Type: text/css");
$file = getQueryString();
$ext = substr($file, strrpos($file, '.') + 1);
if ($ext != "css" || strpos($file, '..') !== false) {
    exit;
}
$css = myfile_get_contents(getabspath($file), "r");
$css = preg_replace(array("/ :not\\(.*?\\)/", "/ :first-child/", "/ :last-child/", "/ :nth-last-child\\(.*?\\)/"), " *", $css);
$css = preg_replace(array("/:not\\(.*?\\)/", "/:first-child/", "/:last-child/", "/:nth-last-child\\(.*?\\)/"), "", $css);
echo $css;
Ejemplo n.º 21
0
<?php

require_once getabspath("plugins/PHPExcel/IOFactory.php");
require_once getabspath("include/export_functions_excel.php");
function ExportToExcel($rs, $nPageSize, $eventObj, $cipherer, $pageObj)
{
    if ($eventObj->exists("ListFetchArray")) {
        $row = $eventObj->ListFetchArray($rs, $pageObj);
    } else {
        $row = $cipherer->DecryptFetchedArray($pageObj->connection->fetch_array($rs));
    }
    $tmpArr = array();
    $totals = array();
    $arrLabel = array();
    $arrTotal = array();
    $arrFields = array();
    $arrTmpTotal = array();
    $arrColumnWidth = array();
    $arrTotalMessage = array();
    $tmpArr = $pageObj->pSet->getExportFields();
    foreach ($tmpArr as $value) {
        if ($pageObj->pSet->appearOnExportPage($value)) {
            $arrFields[] = $value;
        }
    }
    $arrTmpTotal = $pageObj->pSet->getTotalsFields();
    $pageObj->viewControls->forExport = "excel";
    foreach ($arrFields as $value) {
        $arrLabel[$value] = GetFieldLabel(GoodFieldName($pageObj->tName), GoodFieldName($value));
        $arrColumnWidth[$value] = 10;
        $totals[$value] = array("value" => 0, "numRows" => 0);
<?php

$strTableName = "dbo.User Roles";
$_SESSION["OwnerID"] = $_SESSION["_" . $strTableName . "_OwnerID"];
$strOriginalTableName = "dbo.User Roles";
$gstrOrderBy = "";
if (strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy, 0, 8)) != "order by") {
    $gstrOrderBy = "order by " . $gstrOrderBy;
}
$g_orderindexes = array();
$gsqlHead = "SELECT Code,   [Role]";
$gsqlFrom = "FROM dbo.[User Roles]";
$gsqlWhereExpr = "";
$gsqlTail = "";
include_once getabspath("include/User_Roles_settings.php");
// alias for 'SQLQuery' object
$gQuery =& $queryData_User_Roles;
$eventObj =& $tableEvents["dbo.User Roles"];
$reportCaseSensitiveGroupFields = false;
$gstrSQL = gSQLWhere("");
Ejemplo n.º 23
0
 protected static function createLoginPageObject()
 {
     include_once getabspath('classes/loginpage.php');
     $loginXt = new Xtempl();
     $loginParams = array("pageType" => PAGE_LOGIN);
     $loginParams['xt'] =& $loginXt;
     $loginParams["tName"] = NOT_TABLE_BASED_TNAME;
     $loginParams['needSearchClauseObj'] = false;
     $loginPageObject = new LoginPage($loginParams);
     $loginPageObject->init();
     return $loginPageObject;
 }
Ejemplo n.º 24
0
<?php

include_once getabspath("include/app_users_settings.php");
function DisplayMasterTableInfo_app_users($params)
{
    $detailtable = $params["detailtable"];
    $keys = $params["keys"];
    global $conn, $strTableName;
    $xt = new Xtempl();
    $oldTableName = $strTableName;
    $strTableName = "app.users";
    //$strSQL = "SELECT userid,   nama,   created,   disabled,   passwd,   id,   kd_kantor,   kd_kanwil,   kd_tp,   kd_kanwil_bank,   kd_kppbb_bank,   kd_bank_tunggal,   kd_bank_persepsi,   nip,   jabatan,   handphone,   create_uid,   update_uid,   updated,   last_login,   is_login,   is_logout,   last_ip  FROM app.users ";
    $cipherer = new RunnerCipherer($strTableName);
    $settings = new ProjectSettings($strTableName, PAGE_PRINT);
    $masterQuery = $settings->getSQLQuery();
    $viewControls = new ViewControlsContainer($settings, PAGE_PRINT);
    $where = "";
    global $pageObject, $page_styles, $page_layouts, $page_layout_names, $container_styles;
    $layout = new TLayout("masterprint", "RoundedGreen", "MobileGreen");
    $layout->blocks["bare"] = array();
    $layout->containers["0"] = array();
    $layout->containers["0"][] = array("name" => "masterprintheader", "block" => "", "substyle" => 1);
    $layout->skins["0"] = "empty";
    $layout->blocks["bare"][] = "0";
    $layout->containers["mastergrid"] = array();
    $layout->containers["mastergrid"][] = array("name" => "masterprintfields", "block" => "", "substyle" => 1);
    $layout->skins["mastergrid"] = "grid";
    $layout->blocks["bare"][] = "mastergrid";
    $page_layouts["app_users_masterprint"] = $layout;
    $showKeys = "";
    if ($detailtable == "app.user_groups") {
if ($rowcount) {
    $xt->assign("details_data", true);
    $rs = db_query($strSQL, $conn);
    $display_count = 10;
    if ($mode == "inline") {
        $display_count *= 2;
    }
    if ($rowcount > $display_count + 2) {
        $xt->assign("display_first", true);
        $xt->assign("display_count", $display_count);
    } else {
        $display_count = $rowcount;
    }
    $rowinfo = array();
    $data = $cipherer->DecryptFetchedArray($rs);
    require_once getabspath('classes/controls/ViewControlsContainer.php');
    $pSet = new ProjectSettings($strTableName, PAGE_LIST);
    $viewContainer = new ViewControlsContainer($pSet, PAGE_LIST);
    while ($data && $recordsCounter < $display_count) {
        $recordsCounter++;
        $row = array();
        $keylink = "";
        $keylink .= "&key1=" . htmlspecialchars(rawurlencode(@$data["id"]));
        //	id -
        $viewContainer->recId = $recordsCounter;
        $value = $viewContainer->showDBValue("id", $data, $keylink);
        $row["id_value"] = $value;
        //	parent -
        $viewContainer->recId = $recordsCounter;
        $value = $viewContainer->showDBValue("parent", $data, $keylink);
        $row["parent_value"] = $value;
Ejemplo n.º 26
0
 /**
  * @param String fieldValue
  * @return String
  */
 function getFieldValueCopy($fieldValue)
 {
     $this->initUploadHandler();
     $uploadFolder = $this->pageObject->pSetEdit->getUploadFolder($this->field);
     $absoluteUploadDirPath = $this->pageObject->pSetEdit->getFinalUploadFolder($this->field);
     $filesData = my_json_decode($fieldValue);
     if (!is_array($filesData) || count($filesData) == 0) {
         return $fieldValue;
     }
     foreach ($filesData as $idx => $fileData) {
         $info = $this->upload_handler->pathinfo_local($fileData["usrName"]);
         $newFieldName = $this->upload_handler->tempnam_sfx($absoluteUploadDirPath, $info['filename'], $info['extension']);
         runner_copy_file(getabspath($fileData["name"]), $absoluteUploadDirPath . $newFieldName);
         $filesData[$idx]["name"] = $uploadFolder . $newFieldName;
         if ($this->pageObject->pSetEdit->getCreateThumbnail($this->field)) {
             $thumbnailPrefix = $this->pageObject->pSetEdit->getStrThumbnail($this->field);
             $newThumbName = $this->upload_handler->tempnam_sfx($absoluteUploadDirPath, $thumbnailPrefix . $info['filename'], $info['extension']);
             runner_copy_file(getabspath($fileData["thumbnail"]), $absoluteUploadDirPath . $newThumbName);
             $filesData[$idx]["thumbnail"] = $uploadFolder . $newThumbName;
         }
     }
     return my_json_encode($filesData);
 }
$fdata["isSeparate"] = false;
// the field's search options settings
// the default search options list
$fdata["searchOptionsList"] = array("Contains", "Equals", "Empty");
// the end of search options settings
$tdataFact_StockTransaction_Report["DESCRIP"] = $fdata;
$tables_data["Fact_StockTransaction Report"] =& $tdataFact_StockTransaction_Report;
$field_labels["Fact_StockTransaction_Report"] =& $fieldLabelsFact_StockTransaction_Report;
$fieldToolTips["Fact_StockTransaction Report"] =& $fieldToolTipsFact_StockTransaction_Report;
$page_titles["Fact_StockTransaction_Report"] =& $pageTitlesFact_StockTransaction_Report;
// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
// tables which are master tables for current table (detail)
$masterTablesData["Fact_StockTransaction Report"] = array();
// -----------------end  prepare master-details data arrays ------------------------------//
require_once getabspath("classes/sql.php");
function createSqlQuery_Fact_StockTransaction_Report()
{
    $proto0 = array();
    $proto0["m_strHead"] = "SELECT";
    $proto0["m_strFieldList"] = "calendar_table.fiscalYear,  calendar_table.fiscalMonth,  calendar_table.monthName,  Fact_SalesTransaction.GroupID,  Fact_SalesTransaction.CompanyID,  Fact_SalesTransaction.BranchID,  DimDept.DepartmentDesc,  SUM(Fact_SalesTransaction.Fact_SalesValue) AS `SUM(Fact_SalesValue)`,  SUM(Fact_SalesTransaction.Fact_CostValue) AS `SUM(Fact_CostValue)`,  SUM(Fact_SalesTransaction.Fact_DiscountValue) AS `SUM(Fact_DiscountValue)`,  SUM(Fact_SalesTransaction.Fact_GrossProfit) AS `SUM(Fact_GrossProfit)`,  AVG(Fact_SalesTransaction.Fact_GP) AS `SUM(Fact_GP)`,  AVG(SMAST.QOH) AS `AVG(QOH)`,  AVG(DATEDIFF(CURDATE(), SMAST.DATELSOLD)) AS LastSoldDays,  SMAST.DESCRIP";
    $proto0["m_strFrom"] = "FROM SMAST  INNER JOIN Fact_SalesTransaction ON SMAST.CODE = Fact_SalesTransaction.TranStockCode  INNER JOIN calendar_table ON Fact_SalesTransaction.TranDate = calendar_table.dt  INNER JOIN thisYear ON calendar_table.fiscalYear = thisYear.ThisYear  INNER JOIN DimDept ON SMAST.DEPT = DimDept.DeptID";
    $proto0["m_strWhere"] = "";
    $proto0["m_strOrderBy"] = "ORDER BY calendar_table.fiscalMonth";
    $proto0["m_strTail"] = "GROUP BY calendar_table.fiscalYear, calendar_table.fiscalMonth, calendar_table.monthName, Fact_SalesTransaction.GroupID, Fact_SalesTransaction.CompanyID, Fact_SalesTransaction.BranchID, DimDept.DepartmentDesc, SMAST.DESCRIP";
    $proto0["cipherer"] = null;
    $proto1 = array();
    $proto1["m_sql"] = "";
    $proto1["m_uniontype"] = "SQLL_UNKNOWN";
    $obj = new SQLNonParsed(array("m_sql" => ""));
    $proto1["m_column"] = $obj;
	/**
	 * Create new control (if needed) for view field, and return it
	 * @param {string} field name
	 * @param {string} predefined view format 
	 */
	public function getControl($field, $format = null)
	{
		// if conrol does not created previously  
		if(!array_key_exists($field, $this->viewControls))
		{
			include_once(getabspath("classes/controls/ViewControl.php"));
			$vcTypes = new ViewControlTypes();
			$editFormat = $this->pSet->getEditFormat($field);
			if(is_null($format)){
				$localPSet = $this->pSet;
				$lookupPageType = "";
				if(!$this->isLocal)
				{
					$lookupPageType = $this->pSet->getPageTypeByFieldEditFormat($field, EDIT_FORMAT_LOOKUP_WIZARD);
					if($lookupPageType != "")
						$localPSet = new ProjectSettings($this->pSet->_table, $lookupPageType);
				}
				if(!$this->isLocal
					&& ($editFormat == EDIT_FORMAT_LOOKUP_WIZARD || $lookupPageType != "")  
					&& ($localPSet->getLookupType($field) == LT_LOOKUPTABLE || $localPSet->getLookupType($field) == LT_QUERY) 
					&& $localPSet->getLWLinkField($field) != $localPSet->getLWDisplayField($field))
				{
					$viewFormat = FORMAT_LOOKUP_WIZARD;
				}else
					$viewFormat = $this->pSet->getViewFormat($field);
			}else 
				$viewFormat = $format;
				
			if($viewFormat == FORMAT_FILE_IMAGE && $this->pSet->isCompatibilityMode($field))
				$viewFormat = FORMAT_FILE_IMAGE_OLD;
				
			$className = $vcTypes->viewTypes[$viewFormat];
			if($className == "" && $viewFormat != "")
			{
				$className = "View".$viewFormat;
				$userControl = true;
				include_once(getabspath("classes/controls/ViewUserControl.php"));
			}
		
			if($className != "")
			{
				$this->viewControls[$field] = createViewControlClass($className, $field, $this, $this->pageObject);
			}
			else
				$this->viewControls[$field] = new ViewControl($field, $this, $this->pageObject);
			
			if($userControl)
			{
				$this->viewControls[$field]->viewFormat = $className;
				$this->viewControls[$field]->init();
				$this->viewControls[$field]->initUserControl();
			}
		}
		return $this->viewControls[$field];
	}
Ejemplo n.º 29
0
<?php

include_once getabspath("classes/runnerpage.php");
class ViewPage extends RunnerPage
{
    var $keys = array();
    var $data = null;
    var $all = false;
    var $jsKeys = array();
    var $keyFields = array();
    function ViewPage(&$params)
    {
        parent::RunnerPage($params);
    }
    /**
     * Set keys values
     *
     * @param {array} 
     */
    function setKeys($keys = array())
    {
        if (count($keys)) {
            $this->keys = $keys;
            return;
        }
        $tKeys = $this->pSet->getTableKeys();
        for ($i = 0; $i < count($tKeys); $i++) {
            $this->keys[$tKeys[$i]] = postvalue("editid" . ($i + 1));
        }
        $this->setKeysForJs();
    }
<?php

$strTableName = "dbo.Anomalies";
$_SESSION["OwnerID"] = $_SESSION["_" . $strTableName . "_OwnerID"];
$strOriginalTableName = "dbo.Anomalies";
$gstrOrderBy = "";
if (strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy, 0, 8)) != "order by") {
    $gstrOrderBy = "order by " . $gstrOrderBy;
}
$g_orderindexes = array();
$gsqlHead = "SELECT ID,   [Module ID],   [Anomaly Description],   [Anomaly Type],   [Date Time],   [Action Taken]";
$gsqlFrom = "FROM dbo.Anomalies";
$gsqlWhereExpr = "";
$gsqlTail = "";
include_once getabspath("include/Anomalies_settings.php");
// alias for 'SQLQuery' object
$gQuery =& $queryData_Anomalies;
$eventObj =& $tableEvents["dbo.Anomalies"];
$reportCaseSensitiveGroupFields = false;
$gstrSQL = gSQLWhere("");