Esempio n. 1
1
<?php

define("VIRGO_API_DIR", "virgo_api");
require_once "smarty/Smarty.class.php";
require_once VIRGO_API_DIR . "/virgo_api.php";
require "Sajax.php";
require VIRGO_API_DIR . "/ajaxfunctions.php";
sajax_init();
sajax_export("AJAXSynchronizeDB");
sajax_handle_client_request();
$smarty = new Smarty();
$api = new VirgoAPI();
sajax_handle_client_request();
$smarty->assign("synchronizeDB", $api->GetSynchronizeJS());
$smarty->assign("ajax", sajax_show_javascript());
$smarty->display("index.tpl");
Esempio n. 2
0
    /**
     * Outputs the AJAX-powered JavaScript to the browser. It is meant to be used
     * by renderJavaScript()
     *
     * @access private
     */
    function _renderAJAXJavaScript()
    {
        jpimport('helpers.sajax', true);
        sajax_init();
        sajax_force_page_ajax();
        sajax_export('toggle', 'filepane', 'folderpane');
        ?>
<script language="JavaScript" type="text/javascript">
	/*
	 * (S)AJAX Library code
	 */
	 <?php 
        sajax_show_javascript();
        ?>
 	sajax_fail_handle = SAJAXTrap;

	function SAJAXTrap( myData ) {
		alert('Invalid AJAX reponse: ' + myData);
	}

	var globRoot = '';
	
	function toggle( fileName )
	{
		x_toggle( fileName, toggle_cb );
	}
	
	function toggle_cb( myRet )
	{
		filepane();
	}
	
	function filepane()
	{
		x_filepane( globRoot, filepane_cb ); 
	}
	
	function filepane_cb( myRet )
	{
		document.getElementById('filepane').innerHTML = myRet;
	}
	
	function folderpane( path )
	{
		globRoot = path;
		document.getElementById('currentdirectory').innerHTML = globRoot;
		x_folderpane( globRoot, folderpane_cb );
	}
	
	function folderpane_cb( myRet )
	{
		document.getElementById('folderpane').innerHTML = myRet;
		filepane();
	}
</script>
<?php 
    }
Esempio n. 3
0
 public function __construct()
 {
     sajax_init();
     sajax_export("AJAXSynchronizeDB");
     sajax_export("AJAXSynchronizeOffersCount");
     sajax_handle_client_request();
     $this->synchronizeDB = $this->GetSynchronizeJS();
     $this->synchronizeOffersCount = $this->GetSynchronizeOffersCount();
     $this->ajax = sajax_show_javascript();
 }
Esempio n. 4
0
    /**
     * Outputs the AJAX-powered JavaScript to the browser. It is meant to be used
     * by renderJavaScript()
     *
     * @access private
     */
    function _renderAJAXJavaScript()
    {
        jpimport('helpers.sajax', true);
        sajax_init();
        sajax_force_page_ajax();
        sajax_export('toggle', 'tablepane');
        ?>
<script language="JavaScript" type="text/javascript">
	/*
	 * (S)AJAX Library code
	 */
	 <?php 
        sajax_show_javascript();
        ?>
 	sajax_fail_handle = SAJAXTrap;

	function SAJAXTrap( myData ) {
		alert('Invalid AJAX reponse: ' + myData);
	}

	function toggle( table )
	{
		x_toggle( table, toggle_cb );
	}
	
	function toggle_cb( myRet )
	{
		tablepane();
	}
		
	function tablepane()
	{
		x_tablepane( tablepane_cb );
	}
	
	function tablepane_cb( myRet )
	{
		document.getElementById('tablepane').innerHTML = myRet;
	}
</script>
<?php 
    }
Esempio n. 5
0
		echo '<select name="ing">'.$inglist.'</select><input type="button" onclick="add(); return false;">'; */
		return $retval;
	}
	
	function refresh() {
//		parse_str($msg);
//		$fname='/tmp/'.metaphone($recipe).'.'.$rindex;
		$fname='/tmp/recipe.html';
		$lines = file($fname);
		// return the last 25 lines
		return join("\n", $lines);
	}
	
	$sajax_request_type = "GET";
	sajax_init();
	sajax_export("add_ingredient", "refresh");
	sajax_handle_client_request();
	
?>
<html>
<head>
	<script>
	<?
	sajax_show_javascript();
	?>
	
	var check_n = 0;
	
	function refresh_cb(new_data)
	{
		existing = document.getElementById("inglist").innerHTML;
Esempio n. 6
0
        $current = $row2[1];
    }
    if ($current > $all_c) {
        $query2 = "update tree_history set th_current=" . $all_c . " where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $_SESSION['projects'] . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR)";
        $tmp .= $query2 . "\n\r";
        mysql_query($query2) or die(mysql_error());
    }
    $query2 = "delete from tree_history where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $p_id . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR) order by th_id desc limit " . $current;
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    $query2 = "update tree_history set th_current=0 where th_u_id=" . $_SESSION['uid'] . " and th_p_id=" . $p_id . " and th_date>=DATE_SUB(now(), INTERVAL 1 HOUR)";
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    $query2 = "insert into tree_history (th_r_id,th_u_id,th_p_id,th_parent_old,th_parent_old_pos,th_parent_new,th_parent_new_pos,th_rh_id,th_date,th_current) values (" . $r_id . "," . $_SESSION['uid'] . "," . $_SESSION['projects'] . "," . $r_parent_id_tmp . "," . $r_pos . "," . $r_parent_id_tmp . "," . $tmpPos . "," . $rh_id . ",now(),0)";
    $tmp .= $query2 . "\n\r";
    mysql_query($query2) or die(mysql_error());
    $query2 = "update test set r_id='" . $tmp . "' where t_id=5";
    $rs2 = mysql_query($query2) or die(mysql_error());
    return $tmp;
}
//include Sajax
require "sajax.php";
//Sajax init
$sajax_request_type = "POST";
$sajax_debug_mode = "0";
sajax_init();
sajax_export("submitOrder");
//register all SITE FUNCTIONS
sajax_export("submitOrder2");
//register all SITE FUNCTIONS
sajax_handle_client_request();
Esempio n. 7
0
 <?php 
/*------------------------------------------------------------------------
# com_adagency
# ------------------------------------------------------------------------
# author    iJoomla
# copyright Copyright (C) 2013 ijoomla.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.ijoomla.com
# Technical Support:  Forum - http://www.ijoomla.com/forum/index/
-------------------------------------------------------------------------*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$sajax_request_type = "POST";
sajax_init();
sajax_export("phpchangeProvince", "phpchangeCity");
sajax_handle_client_request();
Esempio n. 8
0
<?php

require "lib/Sajax.php";
sajax_init();
$sajax_debug_mode = 1;
sajax_export("display");
sajax_handle_client_request();
?>

<!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>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>SAJAX test</title>
<script type="text/javascript"> 
    <?php 
sajax_show_javascript();
?>
</script>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/player.js"></script>	
<script type="text/javascript" src="lib/mediaplayer/swfobject.js"></script>
</head>

<body>
    <div id="playing">
        <h3>SAJAX test</h3>
        <a href="#" onclick="play(); return false;" title="Play This Playlist Now">play</a>
        <div id="jwplayer"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
            <script type="text/javascript">
Esempio n. 9
0
<?php

/**
 * @package JoomlaPack
 * @copyright Copyright (c)2006-2009 JoomlaPack Developers
 * @license GNU General Public License version 2, or later
 * @version $id$
 * @since 1.3
 *
 * The main page of the JoomlaPack component is where all the fun takes place :)
 */
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted Access');
jpimport('helpers.sajax', true);
sajax_init();
sajax_export('getDefaultOutputDirectory', 'testFTPConnection');
$null = null;
sajax_handle_client_request($null);
function getDefaultOutputDirectory()
{
    return JPATH_COMPONENT_ADMINISTRATOR . DS . 'backup';
}
function testFTPConnection($host, $port, $user, $pass, $initdir, $usessl, $passive)
{
    jpimport('abstract.enginearchiver');
    jpimport('engine.packer.directftp');
    jpimport('core.utility.logger');
    $config = array('host' => $host, 'port' => $port, 'user' => $user, 'pass' => $pass, 'initdir' => $initdir, 'usessl' => $usessl, 'passive' => $passive);
    $test = new JoomlapackPackerDirectftp();
    $test->initialize('', '', $config);
    $errors = $test->getError();
Esempio n. 10
0
<?php

/**
 * @package JoomlaPack
 * @copyright Copyright (c)2006-2009 JoomlaPack Developers
 * @license GNU General Public License version 2, or later
 * @version $id$
 * @since 1.3
 *
 * The main page of the JoomlaPack component is where all the fun takes place :)
 */
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted Access');
jpimport('helpers.sajax', true);
sajax_init();
sajax_export('testdatabase');
$null = null;
sajax_handle_client_request($null);
function testdatabase($host, $port, $user, $pass, $database)
{
    $JP_Error_Reporting = @error_reporting(E_ERROR | E_PARSE);
    $host = $host . ($port != '' ? ":{$port}" : '');
    jimport('joomla.database.database');
    jimport('joomla.database.table');
    $conf =& JFactory::getConfig();
    $driver = $conf->getValue('config.dbtype');
    $options = array('driver' => $driver, 'host' => $host, 'user' => $user, 'password' => $pass, 'database' => $database, 'prefix' => '');
    $database =& JDatabase::getInstance($options);
    $result = true;
    if (JError::isError($database)) {
        $result = false;
foreach ($this->profiles as $profile_id => $profile_description) {
    $optprofiles[] = JHTML::_('select.option', $profile_id, $profile_description);
}
function echoLabel($labelkey, $tooltipkey = null)
{
    if (is_null($tooltipkey)) {
        echo JText::_($labelkey);
    } else {
        echo JHTML::_('tooltip', JText::_($tooltipkey), '', '', JText::_($labelkey));
    }
}
// Load SAJAX library
jpimport('helpers.sajax', true);
sajax_init();
sajax_force_page_ajax();
sajax_export('getDefaultURL', 'getDefaultSecret', 'testFTP');
?>
<script type="text/javascript" language="JavaScript">
	/*
	 * (S)AJAX Library code
	 */
	 
	<?php 
sajax_show_javascript();
?>
	 
	sajax_fail_handle = SAJAXTrap;
	
	function SAJAXTrap( myData ) {
		alert('Invalid AJAX reponse: ' + myData);
	}
}
function return_string()
{
    return "Name: Tom / Age: 26";
}
function return_int()
{
    return 26;
}
function return_float()
{
    return 26.25;
}
$sajax_request_type = "GET";
sajax_init();
sajax_export("return_array", "return_object", "return_string", "return_int", "return_float");
sajax_handle_client_request();
?>
<html>
<head>
<script>
<?php 
sajax_show_javascript();
?>
function display_result(val) {
	var repr;
	
	repr  = "";
	repr += "Type: " + typeof val + "\n";
	repr += "Value: ";
	if (typeof val == "object" ||
Esempio n. 13
0
*  http://www.mp3act.net
*  Copyright (C) 2005 Jon Buda (www.jonbuda.com)
*
*  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

*  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*************************************************************************/
require_once "modules/music/mp3act_functions.php";
require_once "modules/music/mp3act_sajax.php";
GarbageCollector();
$sajax_remote_uri = 'music/';
$sajax_request_type = 'POST';
sajax_init();
sajax_export("getplaylistnames", "musicLookup", "playlist_rem", "playlist_add", "playlistInfo", "clearPlaylist", "buildBreadcrumb", "play", "playlist_move", "searchMusic", "viewPlaylist", "getDropDown", "savePlaylist", "getRandItems", "randAdd", "deletePlaylist");
sajax_handle_client_request();
$headers[] = '<link rel="Stylesheet" href="' . skin_url . 'music.css" type="text/css">';
require 'modules/_shared/tmpl/' . tmpl . '/header.php';
?>

    <script type="text/javascript">
            var page = 'search';
            var mode = '<?php 
echo $_SESSION['sess_playmode'];
?>
';
            var bc_parenttype = '';
            var bc_parentitem = '';
            var bc_childtype = '';
            var bc_childitem = '';
Esempio n. 14
0
require "Sajax.php";
function get_highscore()
{
    $db = new DB_Seminar("SELECT MAX(score) FROM murmeln_highscore");
    $db->next_record();
    return $db->f(0);
}
function get_highscore_list()
{
    $db = new DB_Seminar("SELECT murmeln_highscore.*,username FROM murmeln_highscore LEFT JOIN auth_user_md5 USING(user_id) ORDER BY score DESC LIMIT 20");
    $ret = '<ol>';
    $maxscore = 0;
    while ($db->next_record()) {
        $ret .= '<li><b>' . $db->f('score') . '</b> - 
				' . ($db->f('username') ? '<a href="' . UrlHelper::getLink('about.php?username='******'username')) . '">' . htmlReady(get_fullname_from_uname($db->f('username'))) . '</a>' : htmlready($db->f('name'))) . '</li>';
        $maxscore = $db->f('score');
    }
    $ret .= '</ol>';
    $db->query("DELETE FROM murmeln_highscore WHERE score < " . $maxscore);
    return $ret;
}
function set_highscore($score = 0)
{
    $db = new DB_Seminar("INSERT INTO murmeln_highscore (score,user_id,name) VALUES (\n\t\t\t\t\t\t\t{$score}, '" . $GLOBALS['user']->id . "','" . mysql_escape_string(get_fullname()) . "')");
    return $db->affected_rows();
}
$GLOBALS['sajax_remote_uri'] = $pluginrelativepath . '/sajax_functions.php';
$GLOBALS['sajax_debug_mode'] = 0;
sajax_init();
sajax_export("get_highscore", "get_highscore_list", "set_highscore");
sajax_handle_client_request();
Esempio n. 15
0
            $campo = 'Nenhum registro encontrado!';
        } else {
            $campo .= '</select>';
        }
        return $campo;
    }
    $sajax_request_type = "POST";
    //forma como os dados serao enviados
    $sajax_debug_mode = 0;
    sajax_init();
    //inicia o SAJAX
    sajax_export("busca");
    // lista de funcoes a ser exportadas
    sajax_export("busca2");
    // lista de funcoes a ser exportadas
    sajax_export("busca3");
    // lista de funcoes a ser exportadas
    sajax_handle_client_request();
    // serve instancias de clientes
    //////////
    echo '<script language="JavaScript" type="text/javascript">';
    sajax_show_javascript();
    //gera o javascript
    echo '
	function mudaPesquisa(tipo)
	{
		var indexOption1 = document.getElementById(\'numcontacorrente\').selectedIndex;
		var nome = document.getElementById(\'numcontacorrente\').options[indexOption1].text;
		var valor = document.getElementById(\'numcontacorrente\').options[indexOption1].value;
		document.getElementById(\'tipoc\').value = nome;
		var index = nome.indexOf(\'-\')+2;
Esempio n. 16
0
        echo sajax_get_javascript();
    }
    $SAJAX_INCLUDED = 1;
}
function add_data($data)
{
    global $session, $database;
    $data = explode("|", $data);
    $name = $session->username;
    $msg = htmlspecialchars($data[1]);
    $id_user = $session->uid;
    $alliance = $session->alliance;
    $now = time();
    $q = "INSERT into " . TB_PREFIX . "chat (id_user,name,alli,date,msg) values ('{$id_user}','{$name}','{$alliance}','{$now}','{$msg}')";
    mysql_query($q, $database->connection);
}
function get_data()
{
    global $session, $database;
    $alliance = $session->alliance;
    $query = mysql_query("select * from " . TB_PREFIX . "chat where alli='{$alliance}' order by id desc limit 0,13");
    while ($r = mysql_fetch_array($query)) {
        $dates = date("g:i", $r[date]);
        $data .= "[{$dates}] <a href='spieler.php?uid={$r['id_user']}'>{$r['name']}</a>: {$r[msg]} <br>";
    }
    return $data;
}
$sajax_request_type = "GET";
sajax_init();
sajax_export("add_data", "get_data");
sajax_handle_client_request();
Esempio n. 17
0
                $pg->setLayout($pg->FullColumn);
                $pg->addBlock($pg->Column, $treng->_('About Us', "modulemap"), $groupdesc, $treng->_('About Us', "map"));
            }
            // operational box
            if ($access_isGroupAdmin || $access_isGroupMember && $can_members_change_tab_order_home) {
                if ($oblocks % 2 == 1) {
                    $pg->addBlock($pg->LeftColumn, "", homeAddNewModuleBlock(), "", false, true);
                } else {
                    $pg->addBlock($pg->RightColumn, "", homeAddNewModuleBlock(), "", false, true);
                }
            }
        }
        $ajax_functions .= home_getAjaxFunctions();
        $to_register = home_getFunctionsToRegister();
        foreach ($to_register as $r) {
            sajax_export($r);
        }
        if ($pg->generateHTML()) {
            $page_content .= $pg->getHTML();
        } else {
            die('Could not generate HTML');
        }
        break;
}
$tpl->assign('module', $function);
$tpl->assign('page_content', $page_content);
$tpl->assign('ajax_functions', $ajax_functions);
$tpl->assign('thehelp_text', $thehelp_text);
ob_start();
sajax_handle_client_request();
$ajax_handle_requests = ob_get_contents();
Esempio n. 18
0
            $retval .= '<tr><td colspan=2><i>on ' . $line["cdate"] . ' ' . $line["name"] . ' said:</i></td></tr><tr><td width="50px"></td><td colspan=2>' . $line["comment"] . '</td></tr>';
        }
        $retval .= '</tr></table>';
    }
    return $retval;
}
function submit_comment($msg)
{
    parse_str($msg);
    $sql = 'insert into comments values(' . $rIndex . ', "' . $cName . '", "' . $newComment . '", curdate())';
    mysql_query($sql) or die('Error:  ' . mysql_error());
    return get_comments($rIndex);
}
$sajax_request_type = "GET";
sajax_init();
sajax_export("saveInstructions", "get_recipe_types", "get_recipe_names", "update_assoc", "submit_comment");
sajax_handle_client_request();
?>
<html>
<head>
<script>
<?
sajax_show_javascript();
?>
function editSetUp()
{
	var Instructions;
	var buttonIndex;
	Instructions=document.getElementById("RecipeInstructions").innerHTML;
	buttonIndex=Instructions.indexOf("<br");
	document.getElementById("RecipeInstructions").innerHTML='<textarea id="Instructions" cols="60" rows="15">'+Instructions.substring(0,buttonIndex)+'</textarea>';
Esempio n. 19
0
*  Copyright (C) 2005 Jon Buda (www.jonbuda.com)
*  
*  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

*  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*  
*  You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*************************************************************************/
include_once "includes/mp3act_functions.php";
include_once "includes/sessions.php";
require "includes/Sajax.php";
$sajax_remote_uri = 'index.php';
$sajax_request_type = "POST";
sajax_init();
// list of functions to export
sajax_export("getCurrentSong", "getUser", "musicLookup", "playlist_add", "playlist_update", "playlistInfo", "clearPlaylist", "buildBreadcrumb", "play", "searchMusic", "editUser", "switchMode", "viewPlaylist", "getDropDown", "savePlaylist", "getRandItems", "randPlay", "resetDatabase", "createInviteCode", "editSettings", "deletePlaylist", "adminEditUsers", "adminAddUser");
sajax_handle_client_request();
// serve client instances
if (!isLoggedIn()) {
    header("Location: login.php");
}
?>
<!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>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php 
echo "http://" . $GLOBALS['http_server'] . $GLOBALS['uri_path'];
?>
/feed.php" />
Esempio n. 20
0
defined('_JEXEC') or die('Restricted Access');
?>
<h1><?php 
echo JText::_('BACKUP_HEADER_BACKINGUP');
?>
</h1>
<p><?php 
echo JText::_('BACKUP_TEXT_BACKINGUP');
?>
</p>
<?php 
if ($this->backupMethod == 'ajax') {
    jpimport('helpers.sajax', true);
    sajax_init();
    sajax_force_page_ajax('backup');
    sajax_export('start', 'tick', 'renderProgress');
    $description = JRequest::getString('description');
    $comment = JRequest::getString('comment');
    $baseURL = str_replace('\\', '%5c', JURI::base() . 'index.php?option=com_joomlapack&view=backup&task=');
    ?>
<!-- AJAX-powered backup method -->
<script type="text/javascript" language="Javascript">
	/**
	 * (S)AJAX JavaScript
	 */
	<?php 
    sajax_show_javascript();
    ?>

	//sajax_debug_mode = 1;
	sajax_profiling = false;
Esempio n. 21
0
    }
    function sajax_export()
    {
        global $sajax_export_list;
        $n = func_num_args();
        for ($i = 0; $i < $n; $i++) {
            $sajax_export_list[] = func_get_arg($i);
        }
    }
    $sajax_js_has_been_shown = 0;
    function sajax_get_javascript()
    {
        global $sajax_js_has_been_shown;
        global $sajax_export_list;
        $html = "";
        if (!$sajax_js_has_been_shown) {
            $html .= sajax_get_common_js();
            $sajax_js_has_been_shown = 1;
        }
        foreach ($sajax_export_list as $func) {
            $html .= sajax_get_one_stub($func);
        }
        return $html;
    }
    $SAJAX_INCLUDED = 1;
}
###  $sajax_debug_mode = 1;
sajax_init();
sajax_export("cforms_submitcomment");
sajax_export("reset_captcha");
sajax_handle_client_request();
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file.  If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
include "defs.php3";
include_once "template_defs.php";
require "Sajax.php";
sajax_init();
sajax_export("ModifyAnno");
#
# Only known and logged in users ...
#
$this_user = CheckLoginOrDie();
$uid = $this_user->uid();
$isadmin = ISADMIN();
#
# Verify page arguments.
#
$reqargs = RequiredPageArguments("instance", PAGEARG_INSTANCE, "runidx", PAGEARG_INTEGER);
$template = $instance->GetTemplate();
# Need these below.
$guid = $template->guid();
$vers = $template->vers();
$pid = $template->pid();
Esempio n. 23
0
<?php

define("VIRGO_API_DIR", "virgo_api");
require_once "smarty/Smarty.class.php";
require_once VIRGO_API_DIR . "/virgo_api.php";
require "Sajax.php";
require VIRGO_API_DIR . "/ajaxfunctions.php";
sajax_init();
sajax_export("AJAXSynchronizeDB");
sajax_export("AJAXGetInvestmentsDistricts");
sajax_export("AJAXGetInvestmentsLocations");
sajax_export("AJAXGetInvestmentsQuarters");
sajax_handle_client_request();
$smarty = new Smarty();
$api = new VirgoAPI();
function ShowSearchForm(VirgoAPI $api, Smarty $smarty, $lng)
{
    $smarty->assign("ShowSearchForm", true);
    $smarty->assign("provinces", $api->GetInvestmentsProvinces($lng));
    $smarty->assign("categories", $api->GetInvestmentsCategories($lng));
    $smarty->assign("post", $_POST);
}
function GetSelectedItem($array)
{
    $sel = array();
    foreach ($array as $item) {
        $sel[$item] = true;
    }
    return $sel;
}
$lng = 1045;
Esempio n. 24
0
 function commonSAJAX()
 {
     jpimport('helpers.sajax');
     sajax_init();
     sajax_force_page_ajax();
     sajax_export('toggleDBFilter', 'DBSelectionHTML', 'ResetDBEF', 'FilterNonJoomlaTables');
 }
Esempio n. 25
0
<?php

/**
 * @package JoomlaPack
 * @copyright Copyright (c)2006-2009 JoomlaPack Developers
 * @license GNU General Public License version 2, or later
 * @version $id$
 * @since 1.3
 */
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted Access');
jpimport('helpers.sajax', true);
sajax_init();
sajax_force_page_ajax('backup');
sajax_export('start', 'tick', 'renderProgress', 'addWarning');
$null = null;
sajax_handle_client_request($null);
function start($description, $comment)
{
    jpimport('core.cube');
    JoomlapackCUBE::reset();
    $cube =& JoomlapackCUBE::getInstance();
    $cube->start($description, $comment);
    $cube->save();
    $array = $cube->getCUBEArray();
    return _processCUBE($array);
}
function tick()
{
    jpimport('core.cube');
    JoomlapackLogger::WriteLog(_JP_LOG_DEBUG, '--- Preparing to get instance');
Esempio n. 26
0
 * @package JoomlaPack
 * @copyright Copyright (c)2006-2008 JoomlaPack Developers
 * @license GNU General Public License version 2, or later
 * @version $id$
 * @since 1.3
 * 
 * The main page of the JoomlaPack component is where all the fun takes place :)
 */
// Protect from unauthorized access
defined('_JEXEC') or die('Restricted Access');
jimport('joomla.html.pane');
$tabs =& JPane::getInstance('sliders');
jpimport('helpers.sajax', true);
sajax_init();
sajax_force_page_ajax();
sajax_export('getDefaultOutputDirectory');
// Modal dialog setup
$params = array('size' => array('x' => 600, 'y' => 380));
JHTML::_('behavior.modal', 'a.modal', $params);
?>
<div id="jpcontainer">
<script language="JavaScript" type="text/javascript">
/*
 * (S)AJAX Library code
 */
 
<?php 
sajax_show_javascript();
?>
 
sajax_fail_handle = SAJAXTrap;
Esempio n. 27
0
$result = mysql_query($query, $conecta);
$row = mysql_fetch_assoc($result);
$campo = '<select name="numcontacorrente" id="numcontacorrente">
	    <option value="0">Selecione</option>';
do {
    $campo .= '<option value="' . $row['numcontacorrente'] . '">' . $row['cc_nome'] . '</option>';
} while ($row = mysql_fetch_assoc($result));
$campo .= '</select>';
//return $campo;
echo $query;
//}
$sajax_request_type = "GET";
//forma como os dados serao enviados
sajax_init();
//inicia o SAJAX
sajax_export("busca");
// lista de funcoes a ser exportadas
sajax_handle_client_request();
// serve instancias de clientes
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="JavaScript" type="text/javascript">
///////////////////////////////////////////////////////////
<?php 
sajax_show_javascript();
//gera o javascript
?>
<?php

/**
 * @package JoomlaPack
 * @copyright Copyright (c)2006-2009 JoomlaPack Developers
 * @license GNU General Public License version 2, or later
 * @version $id$
 * @since 1.3
 */
defined('_JEXEC') or die('Restricted access');
jpimport('helpers.sajax', true);
sajax_init();
sajax_export('toggle', 'tablepane');
$null = null;
sajax_handle_client_request($null);
function toggle($table)
{
    jpimport('models.dbef', true);
    $model = new JoomlapackModelDbef();
    $model->toggleFilter($table);
    return true;
}
function tablepane()
{
    jpimport('helpers.dbef', true);
    return JoomlapackHelperDbef::getTablePane();
}
Esempio n. 29
0
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file.  If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
include "defs.php3";
include_once "template_defs.php";
require "Sajax.php";
sajax_init();
sajax_export("Show", "GraphChange");
#
# Only known and logged in users ...
#
$this_user = CheckLoginOrDie();
$uid = $this_user->uid();
$isadmin = ISADMIN();
#
# Verify page arguments
#
$reqargs = RequiredPageArguments("template", PAGEARG_TEMPLATE);
$optargs = OptionalPageArguments("action", PAGEARG_STRING, "show", PAGEARG_STRING, "confirmed", PAGEARG_STRING);
if (!($experiment = $template->GetExperiment())) {
    TBERROR("Could not find experiment object for template!", 1);
}
# Need these below
Esempio n. 30
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Kermert; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# ***** END LICENSE BLOCK *****
include_once dirname(__FILE__) . '/prepend.php';
include_once dirname(__FILE__) . '/includes/classes/class.kmuser.php';
//include_once(dirname(__FILE__).'/includes/wrappers/wrapper.kmuser.php');
require_once dirname(__FILE__) . '/includes/Sajax.php';
$sajax_remote_uri = './includes/wrappers/wrapper.kmuser.php';
sajax_init();
sajax_export("userList");
sajax_handle_client_request();
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<link rel="stylesheet" type="text/css" href="./style.css" media="screen" />
<title>Administration</title>
<script type="text/javascript" src="./includes/tools.js"></script>
<script type="text/javascript" src="./includes/sajax_extra.js"></script>
<script language="javascript" type="text/javascript" src="./includes/sajax_functions.js"></script>
<script language="javascript" type="text/javascript" src="./includes/wrappers/wrapper.kmuser.js"></script>
<script language="javascript" type="text/javascript">
<!--