示例#1
0
 public static function registerServices()
 {
     Container::register('form_generator', function () {
         require_once 'vendor/php-form-generator/fg/load.php';
     });
     Container::register('pdf', function () {
         include Container::get('params')->getMPdfLocation();
         $pdf = new Pdf();
         //left, right, top, bottom
         $pdf->getMPDF(new mPDF('utf-8', 'A4', '8', '', 25, 15, 20, 20, 10, 10));
         return $pdf;
     });
     Container::register('errors', function () {
         return Errors::getInstance();
     });
     Container::register('params', function () {
         return Parameters::getInstance();
     });
     Container::register('twig', function () {
         $loader = new Twig_Loader_Filesystem(Container::get('params')->getViewDir());
         $cacheConfJson = file_get_contents(Container::get('params')->getConfigDir() . '/' . 'cache.json');
         $cacheConf = json_decode($cacheConfJson, true);
         if ($cacheConf['enable_cache']) {
             return new Nmzd_Twig_Environment($loader, array('cache' => Container::get('params')->getCacheDir()));
         } else {
             return new Nmzd_Twig_Environment($loader);
         }
     });
     Container::register('twigStr', function () {
         $loader = new Twig_Loader_String();
         $twig = new Twig_Environment($loader);
         $function = new Twig_SimpleFunction("form_text", function ($name, $id, $value = "", $class = "form_text") {
             require_once 'Src/Modules/Ajax/Libs/PhpLiveX/PHPLiveX.php';
             $ajax = new \PHPLiveX();
             require_once 'Src/Modules/Ajax/Controllers/MainController.php';
             $myClass = new \Src\Modules\Ajax\Controllers\MainController();
             $ajax->AjaxifyObjectMethods(array('myClass' => array('validateEmail')));
             $ajax->Run();
             echo '<input type="text" name="' . $name . '" id="' . $id . '" value="' . $value . '" class="' . $class . '">';
         });
         $twig->addFunction($function);
         return $twig;
     });
     Container::register('theme_settings', function () {
         $themeData = Container::get('params')->getThemeData();
         require_once 'Src/Views/Themes/' . $themeData['theme'] . '/ThemeSettings.php';
         $themeSettings = 'Src\\Views\\Themes\\' . $themeData['theme'] . '\\ThemeSettings';
         $themeSettingsInstance = new $themeSettings();
         $themeSettings = $themeSettingsInstance->getSettings();
         return $themeSettings;
     });
     Container::register('router', function () {
         return new \App\Core\Router();
     });
 }
示例#2
0
.table td {
    font-size: 14px;
}

#content_column_header {
    font-weight: normal;
    line-height: 20px;
	color: white;
}

';
//$page_style = '';
$page->setPageStyle($page_style);
$page->displayPageTop('full');
$ajax->Run('phplivex.js');
// Must be called inside the 'html' or 'body' tags
// **********************Start html for content column ****************************//
$notify->Notify();
?>
<div id="prl" style="display:none;"><img  id="prl_image" src="images/spinner.gif"  /></div>
<div id="content_column_header" style="background-color:#3F3F3F;">
    
	  <?php 
echo $fctsearch->search_flowchart_tasks2();
?>
  <div align="right"> <a href="#" onclick="table2CSV($('#search_table')); return false;"> <img src="images/csv.png"  alt="Export to CSV" /> </a> </div>	
</div>
	
<div id="form_main">
    <div id="bucket_search">
示例#3
0
            cache: false,
            filter_hide: true,
            filter_selected: true,
			maxitems: 10,
          });
		  		 
      });		

}

');
$page->setPageStyle($page_style);
$page->displayPageTop();
// **********************Start html for content column ****************************//
$notify->Notify();
$ajax->Run('js/phplivex.js');
// Must be called inside the 'html' or 'body' tags
$project_id = $_GET[project_id];
?>
<div id="div_project"   class="" style="display:none;"></div>
<div id="prl" style="visibility:hidden;"><img  id="prl_image" src="images/spinner.gif"  /></div>


<div id="content_column_header" ><?php 
echo $project->returnProjectHead($project_id);
?>
</div>

<div class="form_main">
<?php 
$project->projectProfile($_REQUEST['project_id']);
示例#4
0
            $key = $key + 1;
            //print_r($value);
            $sql = "UPDATE `country` \r\n\t\t\t\t   SET `order` = '{$key}'\r\n\t\t\t\t   WHERE `country_id` = '{$value}'";
            mysql_query($sql);
            //$objDb->prepare($sql)->execute(array($key, $value));
        }
        $html = ob_get_contents();
        ob_end_clean();
        return $html;
    }
}
$country = new Country();
require "tpl/inc/head.php";
$ajax = new PHPLiveX();
$ajax->AjaxifyObjects(array("country"));
$ajax->Run("tpl/phplivex.js");
// Must be called inside the 'html' or 'body' tags
?>
<body> 
<div id="page"> 
<?php 
require "tpl/inc/header.php";
?>
 <script src="js/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="js/jquery.tablednd_0_5.js" type="text/javascript"></script>
<link href="css/core.css" rel="stylesheet" type="text/css" />
<?php 
require "tpl/inc/path.php";
?>
 
  <div id="content"> 
示例#5
0
//$task -> SetUserID($page->auth->Get_user_id());
$page->setPageKeywords('');
$page->setPageDescription('');
$page->setPageTitle("MANAGE CATEGORIES");
$page->setActiveButton('5');
$page->setInnerNav('0');
$page->SetDynamicCSS_1('main_style.php');
$page->SetDynamicCSS_2('form.php');
$page->setCustomJavaScripts('');
//*********************Page Style *******************************//
// used to set page styles.  This should be used sparingly.  External css should be used instead.
$page->setPageStyle($page_style);
$page->displayPageTop();
// **********************Start html for content column ****************************//
//$notify->Notify();
$ajax->Run();
// Must be called inside the 'html' or 'body' tags
?>


<div id="prl" style="visibility:hidden;"><img  id="prl_image" src="images/spinner.gif"  /></div>
<div id="content_column_header">
Manage master fields :
</div>
<div class="form_main" style="text-align:left !important;">
<?php 
/////////BindingOptions/////////////
if (@$_POST['go7'] == 'go') {
    echo $obj->set_archive('server');
} else {
    echo $obj->set_archive('local');
示例#6
0
if (isset($_SESSION['schema'])) {
    $schema = $_SESSION['schema'];
} else {
    $schema = '';
}
$dashboard_setup = true;
require_once "Zend/Db.php";
require_once "Zend/Db/Select.php";
require_once "includes/config.php";
require_once $_SERVER['DOCUMENT_ROOT'] . $configuration['phplivex_path'] . "/PHPLiveX.php";
require_once 'includes/dependencies_functions.php';
require_once 'includes/optionFunctions.php';
$config_path = "../../" . $configuration['phppgadmin_path'];
// Ajaxify Your PHP Functions
$ajax = new PHPLiveX(array("get_options", "get_templates", "get_template_name", "get_settings", "validate", "save_coordinates", "get_stations", "delete_station", "create_link", "delete_link", "get_inter_process_updates", "refresh_dashboards", "get_screen_nodes", "reset_table_station", "add_processing_module"));
$ajax->Run($configuration['phplivex_path'] . '/phplivex.js');
#die("test");
echo '	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> ';
?>
<head> 
<title>Dependency Editor</title> 
<script src="<? echo $configuration['prototype_path'];?>/prototype.js" type="text/javascript"></script> 
  <script src="<? echo $configuration['scriptaculous_path'];?>/scriptaculous.js" type="text/javascript"></script> 
  <!--[if IE]><script type="text/javascript" src="<? echo $configuration['excanvas_path'];?>/excanvas.js"></script><![endif]--> 
  <script type="text/javascript"> 
  var even = false;
Event.observe(window, 'load', function() {
    $$('tr').each(function(row) {
	if(even) {
	  row.style['background'] = 'rgb(191, 191, 191)';
示例#7
0
return tinyMCE.get(id).getContent();
}
								');


//*********************Page Style *******************************//
// used to set page styles.  This should be used sparingly.  External css should be used instead.
$page_style = '';

$page -> setPageStyle($page_style);

$page -> displayPageTop();

// **********************Start html for content column ****************************//

$ajax->Run('js/phplivex.js'); // Must be called inside the 'html' or 'body' tags  

$notify->Notify();

$id=$_REQUEST[id];

?>
<div id="content_column_header">
	<span class="textb">Viewing News</span> <?php if($id!='') { ?><span align="right" class="verysmall_text"><a href="read_news.php">View All</a></span><? } ?>
</div>
<div id="prl" style="visibility:hidden;"><img  id="prl_image" src="images/spinner.gif"  /></div>
<div class="form_main">
	<?php 
		
		if($id=='')
		$news->Show_All_News();
示例#8
0
<?
session_start();
require_once("Zend/Db.php");
require_once("config.php");
require_once("PHPLiveX.php");

require_once("types/integer.php");
require_once("types/float.php");
require_once("types/checkbox.php");
require_once("types/dropdown.php");
require_once("types/dropdowntable.php");
require_once("viz/dynamic.php");

$ajax = new PHPLiveX(array("validate_integer","validate_float","validate_checkbox","validate_dropdown","validate_dropdowntable","check_change_php","place_input", "place_viz","write_coordinates"));
$ajax->Run(true,'../'.$configuration['phplivex_path'].'/phplivex.js'); 

function start_dashboard()
{
	echo '<html><head>		<script src="'.$configuration['prototype_path'].'/prototype.js" type="text/javascript"></script>
		<script src="'.$configuration['scriptaculous_path'].'/scriptaculous.js" type="text/javascript"></script></head><body id="mainelement">';
}

function stop_dashboard()
{
	echo '</body></html>';
}


function put_javascript()
{
	 echo '';