getJavascript() публичный Метод

See printJavascript> for more information.
public getJavascript ( )
 function __construct()
 {
     $GLOBALS['phpgw_info']['flags']['noframework'] = true;
     require_once PHPGW_SERVER_ROOT . '/felamimail/inc/xajax.inc.php';
     $xajax = new xajax($GLOBALS['phpgw']->link('/felamimail/xajax.php', false, true), 'xajax_', 'utf-8');
     $xajax->waitCursorOff();
     $xajax->registerFunction("doXMLHTTP");
     $GLOBALS['phpgw_info']['flags']['java_script'] .= $xajax->getJavascript($GLOBALS['phpgw_info']['server']['webserver_url'] . '/felamimail/js/');
     $GLOBALS['phpgw']->js->validate_file('jsapi', 'jsapi', 'felamimail');
     $this->displayCharset = 'utf-8';
     if (!isset($_POST['composeid']) && !isset($_GET['composeid'])) {
         // create new compose session
         $this->bocompose = CreateObject('felamimail.bocompose', '', $this->displayCharset);
         $this->composeID = $this->bocompose->getComposeID();
     } else {
         // reuse existing compose session
         if (isset($_POST['composeid'])) {
             $this->composeID = $_POST['composeid'];
         } else {
             $this->composeID = $_GET['composeid'];
         }
         $this->bocompose = CreateObject('felamimail.bocompose', $this->composeID, $this->displayCharset);
     }
     $this->t = CreateObject('phpgwapi.Template', PHPGW_APP_TPL);
     $this->bofelamimail = CreateObject('felamimail.bofelamimail', $this->displayCharset);
     $this->mailPreferences = ExecMethod('felamimail.bopreferences.getPreferences');
     $this->t->set_unknowns('remove');
     $this->rowColor[0] = $GLOBALS['phpgw_info']["theme"]["bg01"];
     $this->rowColor[1] = $GLOBALS['phpgw_info']["theme"]["bg02"];
     if (!isset($GLOBALS['phpgw']->css) || !is_object($GLOBALS['phpgw']->css)) {
         $GLOBALS['phpgw']->css = createObject('phpgwapi.css');
     }
     $GLOBALS['phpgw']->css->validate_file('app', 'felamimail');
 }
Пример #2
0
require_once "{$include}/xajax_webwin/webwin.inc.php";
$conf['html_headers'] .= '<script type="text/javascript" src="' . $baseURL . '/include/xajax_webwin/webwin.js"></script>' . "\n";
$conf['html_headers'] .= '<script type="text/javascript" src="' . $baseURL . '/include/xajax_webwin/webwinTT.js"></script>' . "\n";
$conf['html_headers'] .= '<link rel="stylesheet" type="text/css" href="' . $baseURL . '/include/xajax_webwin/webwin.css" />' . "\n";
// These aren't AJAX, but it's part of our "Advanced Development Kit" ;-)
// NIFTY CORNERS
// $conf['html_headers'] .= '<script type="text/javascript" src="'.$baseURL.'/include/js/nifty_corners/nifty.js"></script>' . "\n";
// $conf['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'.$baseURL.'/include/js/nifty_corners/nifty_styles.css" />' . "\n";
// $conf['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'.$baseURL.'/include/js/nifty_corners/nifty_print.css" media="print"/>' . "\n";
// DomTT
// $conf['html_headers'] .= '<script type="text/javascript" src="'.$baseURL.'/include/js/domTT/domLib.js"></script>' . "\n";
// $conf['html_headers'] .= '<script type="text/javascript" src="'.$baseURL.'/include/js/domTT/domTT.js"></script>' . "\n";
// Process xajax requests
$xajax->{$xajaxProcReq}();
// Include the xajax javascript in our html headers
$conf['html_headers'] .= $xajax->getJavascript($baseURL . '/include/xajax');
//////////////////////////////////////////////////////////////////////////////
// Function: parse_options_string($string)
// Returns an array from a string of comma separated key => value pairs.
// If $string doesn't look like an array the original string is returned.
// I.E. "id => 14, name=>this is a test" becomes:
//      array('id' => 14, 'name' => 'this is a test');
//////////////////////////////////////////////////////////////////////////////
function parse_options_string($input)
{
    $array = array();
    // If the user supplied an array in a string, build the array and store it in $array
    if (is_string($input) and preg_match('/=>/', $input)) {
        $parts = explode(',', $input);
        foreach ($parts as $part) {
            $part = explode('=>', $part, 2);
            $return .= '<select id="destination" name="SessionCoursesListDestination[]" class="form-control">';
            while ($course = Database::fetch_array($rs)) {
                $course_list_destination[] = $course['code'];
                $return .= '<option value="' . $course['code'] . '" title="' . @htmlspecialchars($course['title'] . ' (' . $course['visual_code'] . ')', ENT_QUOTES, api_get_system_encoding()) . '">' . $course['title'] . ' (' . $course['visual_code'] . ')</option>';
            }
            $return .= '</select>';
            $_SESSION['course_list_destination'] = $course_list_destination;
            // Send response by ajax
            $xajax_response->addAssign('ajax_list_courses_destination', 'innerHTML', api_utf8_encode($return));
        }
    }
    return $xajax_response;
}
$xajax->processRequests();
/* HTML head extra */
$htmlHeadXtra[] = $xajax->getJavascript(api_get_path(WEB_LIBRARY_PATH) . 'xajax/');
$htmlHeadXtra[] = '<script type="text/javascript">
function checkSelected(id_select,id_radio,id_title,id_destination) {
   var num=0;
   obj_origin = document.getElementById(id_select);
   obj_destination = document.getElementById(id_destination);

   for (x=0;x<obj_origin.options.length;x++) {
      if (obj_origin.options[x].selected) {
            if (obj_destination.options.length > 0) {
                for (y=0;y<obj_destination.options.length;y++) {
                        if (obj_origin.options[x].value == obj_destination.options[y].value) {
                            obj_destination.options[y].selected = true;
                        }
                }
            }
$interbreadcrumb[] = array('url' => "resume_session.php?id_session=" . $id_session, "name" => get_lang('SessionOverview'));
// Database Table Definitions
$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
// setting the name of the tool
$tool_name = get_lang('SubscribeCoursesToSession');
$add_type = 'multiple';
if (isset($_GET['add_type']) && $_GET['add_type'] != '') {
    $add_type = Security::remove_XSS($_REQUEST['add_type']);
}
$page = isset($_GET['page']) ? Security::remove_XSS($_GET['page']) : null;
$xajax->processRequests();
$htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
$htmlHeadXtra[] = '<script>
function add_course_to_session (code, content) {
	document.getElementById("course_to_add").value = "";
	document.getElementById("ajax_list_courses_single").innerHTML = "";

	destination = document.getElementById("destination");

	for (i=0;i<destination.length;i++) {
		if(destination.options[i].text == content) {
				return false;
		}
	}

	destination.options[destination.length] = new Option(content,code);
Пример #5
0
        $template->assign_vars(array('STREET_USE' => $useracreage));
        page_header($user->lang['INDEX']);
        $template->set_filenames(array('body' => 'city_1_bizbody.html'));
        page_footer();
        break;
    case 'applyroom':
        require_once $phpbb_root_path . 'includes/xajax/xajax.inc.php';
        $xajax = new xajax($phpbb_root_path . 'includes/xajax/city/license.server.php');
        $xajax->registerFunction('license');
        //$xajax->debugOn();
        $user->setup('shop_info');
        $sql = 'SELECT tech.* FROM ' . CITY_TECH . ' tech
				WHERE city_id =' . $cityid;
        $result = $db->sql_query($sql);
        if ($row = $db->sql_fetchrow($result)) {
            $template->assign_vars(array('C_BUILD_LV' => $row['city_build_lv'], 'U_HALL_ROOM' => "{$phpbb_root_path}city.{$phpEx}{$SID}&amp;i=hall&amp;cityid={$cityid}", 'M_AJAX' => $xajax->getJavascript(), 'CITY_ID' => $cityid));
        }
        $db->sql_freeresult($result);
        $sql = 'SELECT * FROM ' . CITY_LICENSE . ' 
				WHERE cityid =' . $cityid . '';
        $result = $db->sql_query($sql);
        while ($row = $db->sql_fetchrow($result)) {
            if ($row['licensetype'] == 1) {
                $t_time = '';
                if ($row['useful_life'] > 3600) {
                    $h = $row['useful_life'] / 3600;
                    $t_time = $h . $user->lang['HOUR'];
                    if ($row['useful_life'] % 3600 > 60) {
                        $m = $row['useful_life'] % 3600 / 60;
                        $t_time .= $m . $user->lang['MINUTE'];
                    }
Пример #6
0
}
/** Ajax request */
if (defined('R3_USERMANAGER_RELATIVE_LINKS') && R3_USERMANAGER_RELATIVE_LINKS) {
    $url = basename(__FILE__);
    $p = strpos($_SERVER['REQUEST_URI'], '?');
    if ($p > 0) {
        $url .= substr($_SERVER['REQUEST_URI'], $p);
    }
} else {
    $url = R3_DOMAIN_URL . $_SERVER['REQUEST_URI'];
}
$url .= (strpos($url, '?') === false ? '?' : '&') . 'proxytime=' . md5(time());
$objAjax = new xajax($url);
$objAjax->registerExternalFunction('submitForm', 'domains_edit_ajax.php');
$objAjax->processRequests();
$smarty->assign('xajax_js_include', $objAjax->getJavascript(R3_JS_URL));
/** Authentications methods */
$authMethods = $auth->getAuthenticationMethods(array('DB', 'POP3', 'LDAP'));
$smarty->assign('do_auth_type_list', $authMethods);
/** Applications list */
try {
    $appList = $auth->getApplicationsList();
} catch (EPermissionDenied $e) {
}
$smarty->assign('applications_list', $auth->mkAssociativeArray($appList, 'APPLICATION'));
if ($_REQUEST['act'] == 'add') {
    $data['do_auth_type'] = 'DB';
    $data['do_auth_data'] = '';
    $data['do_name'] = '';
    $data['do_alias'] = '';
    $data['applications'] = array();
Пример #7
0
#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
#
#$Id: addcontent.php 8510 2012-11-24 17:04:05Z calguy1000 $
$CMS_ADMIN_PAGE = 1;
require_once "../include.php";
$urlext = '?' . CMS_SECURE_PARAM_NAME . '=' . $_SESSION[CMS_USER_KEY];
check_login();
$userid = get_userid();
define('XAJAX_DEFAULT_CHAR_ENCODING', $config['admin_encoding']);
require_once dirname(dirname(__FILE__)) . '/lib/xajax/xajax_core/xajax.inc.php';
require_once dirname(__FILE__) . '/editcontent_extra.php';
$xajax = new xajax();
$xajax->register(XAJAX_FUNCTION, 'ajaxpreview');
$headtext = $xajax->getJavascript('../lib/xajax') . "\n";
if (isset($_POST["cancel"])) {
    redirect("listcontent.php" . $urlext);
}
require_once "header.php";
$tmpfname = '';
$error = FALSE;
$submit = false;
if (isset($_POST["submitbutton"])) {
    $submit = true;
}
$apply = false;
if (isset($_POST["applybutton"])) {
    $apply = true;
}
$contentobj = null;
Пример #8
0
    /**
     * Uses new functions (php 5.2) for displaying real upload progress.
     * @param string $upload_id							The value of the field UPLOAD_IDENTIFIER, the second parameter (XXX) of the $form->addElement('file', XXX) sentence
     * @param string $element_after						The first element of the form (to place at first UPLOAD_IDENTIFIER)
     * @param int $delay (optional)						The frequency of the xajax call
     * @param bool $wait_after_upload (optional)
     */
    public function add_real_progress_bar($upload_id, $element_after, $delay = 2, $wait_after_upload = false)
    {
        if (!function_exists('uploadprogress_get_info')) {
            $this->add_progress_bar($delay);
            return;
        }
        $xajax_upload = new xajax(api_get_path(WEB_LIBRARY_PATH) . 'upload.xajax.php');
        $xajax_upload->registerFunction('updateProgress');
        // IMPORTANT : must be the first element of the form
        $el = $this->insertElementBefore(FormValidator::createElement('html', '<input type="hidden" name="UPLOAD_IDENTIFIER" value="' . $upload_id . '" />'), $element_after);
        $this->addElement('html', '<br />');
        // Add div-element where the progress bar is to be displayed
        $this->addElement('html', '
                		<div id="dynamic_div_container" style="display:none">
                			<div id="dynamic_div_label">' . get_lang('UploadFile') . '</div>
                			<div id="dynamic_div_frame" style="width:214px; height:12px; border:1px solid grey; background-image:url(' . api_get_path(WEB_IMG_PATH) . 'real_upload_frame.gif);">
                				<div id="dynamic_div_filled" style="width:0%;height:100%;background-image:url(' . api_get_path(WEB_IMG_PATH) . 'real_upload_step.gif);background-repeat:repeat-x;background-position:center;"></div>
                			</div>
                		</div>');
        if ($wait_after_upload) {
            $this->addElement('html', '
			<div id="dynamic_div_waiter_container" style="display:none">
				<div id="dynamic_div_waiter_label">
					' . get_lang('SlideshowConversion') . '
				</div>
				<div id="dynamic_div_waiter_frame">
					<img src="' . api_get_path(WEB_IMG_PATH) . 'real_upload_frame.gif" />
				</div>
			</div>
		');
        }
        // Get the xajax code
        $this->addElement('html', $xajax_upload->getJavascript(api_get_path(WEB_LIBRARY_PATH) . 'xajax'));
        // Get the upload code
        $this->addElement('html', api_get_js('js/upload.js'));
        $this->addElement('html', '<script type="text/javascript">var myUpload = new upload(' . abs(intval($delay)) * 1000 . ');</script>');
        if (!$wait_after_upload) {
            $wait_after_upload = 0;
        }
        // Add the upload event
        $this->updateAttributes("onsubmit=\"javascript: myUpload.startRealUpload('dynamic_div','" . $upload_id . "','" . $this->getAttribute('id') . "'," . $wait_after_upload . ")\"");
    }
Пример #9
0
define('XAJAX_DEFAULT_CHAR_ENCODING', $config['admin_encoding']);
require_once dirname(dirname(__FILE__)) . '/lib/xajax/xajax_core/xajax.inc.php';
$xajax = new xajax();
$xajax->register(XAJAX_FUNCTION, 'content_list_ajax');
$xajax->register(XAJAX_FUNCTION, 'content_setactive');
$xajax->register(XAJAX_FUNCTION, 'content_setinactive');
$xajax->register(XAJAX_FUNCTION, 'content_setdefault');
$xajax->register(XAJAX_FUNCTION, 'content_expandall');
$xajax->register(XAJAX_FUNCTION, 'content_collapseall');
$xajax->register(XAJAX_FUNCTION, 'content_toggleexpand');
$xajax->register(XAJAX_FUNCTION, 'content_move');
$xajax->register(XAJAX_FUNCTION, 'content_delete');
// $xajax->register(XAJAX_FUNCTION,'reorder_display_list');
// $xajax->register(XAJAX_FUNCTION,'reorder_process');
$xajax->processRequest();
$headtext = $xajax->getJavascript($config['root_url'] . '/lib/xajax') . "\n";
include_once "header.php";
function prettyurls_ok()
{
    static $_prettyurls_ok = -1;
    if (-1 < $_prettyurls_ok) {
        return $_prettyurls_ok;
    }
    $config = cmsms()->GetConfig();
    if (isset($config['url_rewriting']) && $config['url_rewriting'] != 'none') {
        $_prettyurls_ok = 1;
    } else {
        $_prettyurls_ok = 0;
    }
    return $_prettyurls_ok;
}
Пример #10
0
        for ($i = 0; $i < count($cities); $i++) {
            $addCities[$i + 1]['name'] = $cities[$i]['city_name_ru'];
        }
        $objResponse->addScriptCall("addCity", $addCities);
        return $objResponse;
    }
}
require_once "classes/ajax/xajax.class.php";
$objResponse = new xajaxResponse("utf-8");
$xajax = new xajax("utf-8");
$xajax->registerFunction(array("getRegion", "location", "getRegion"));
$xajax->registerFunction(array("getCity", "location", "getCity"));
$xajax->registerFunction(array("getOption", "location", "getOption"));
$xajax->registerFunction(array("getName", "location", "getName"));
$xajax->processRequests();
$xjavascript = $xajax->getJavascript("../../../");
$next_tovar = $db->assoc("Select * From adv \n\t\t\t\t\t\tWhere subcat_id = '" . $tovar['subcat_id'] . "' and city = '" . $tovar['city'] . "' and id > " . $tovar['id'] . " \n\t\t\t\t\t\torder by id asc");
$pre_tovar = $db->assoc("Select * From adv \n\t\t\t\t\t\tWhere subcat_id = '" . $tovar['subcat_id'] . "' and city = '" . $tovar['city'] . "' and id < " . $tovar['id'] . " \n\t\t\t\t\t\torder by id desc");
$similar_tovar = $db->in_array("Select * From adv \n\t\t\t\t\t\tWhere subcat_id = '" . $tovar['subcat_id'] . "' and region = '" . $tovar['region'] . "' and id <> " . $tovar['id'] . "\n\t\t\t\t\t\torder by id desc limit 0,4");
if ($tovar['metro']) {
    if ($tovar['city'] == 'Москва') {
        $city_id = '1';
    } else {
        $city_id = '174';
    }
    $out = $db->assoc("select * From metro Where name = '" . $tovar['metro'] . "' and city_id = '{$city_id}'");
} else {
    //$out = $db->assoc("select * From net_city Where name_ru = '".$tovar['city']."'");
}
//$on_body_load = 'onload="initialize()"';
include 'tpl/main/header.tpl';
Пример #11
0
    $JSResponse = new xajaxResponse();
    // read template information
    @(include DOC_DIR . '/templates/' . $template . '/info.php');
    // call plugin
    @(include DOC_DIR . '/templates/' . $engine['name'] . '/' . $engine['plugin'] . '.php');
    $JSResponse->assign('plugin', 'innerHTML', $result);
    return $JSResponse;
}
/* Using AJAX for template plugins */
require LIB_DIR . '/xajax/xajax_core/xajax.inc.php';
$xajax = new xajax();
$xajax->configure('errorHandler', true);
$xajax->configure('javascript URI', 'img');
$xajax->register(XAJAX_FUNCTION, 'plugin');
$xajax->processRequest();
$SMARTY->assign('xajax', $xajax->getJavascript());
/* end AJAX plugin stuff */
$layout['pagetitle'] = trans('Documents Generator');
if (isset($_POST['document'])) {
    $document = $_POST['document'];
    $oldfromdate = $document['fromdate'];
    $oldtodate = $document['todate'];
    if (!$document['type']) {
        $error['type'] = trans('Document type is required!');
    }
    if (!$document['title']) {
        $error['title'] = trans('Document title is required!');
    }
    if ($document['number'] == '') {
        $tmp = $LMS->GetNewDocumentNumber($document['type'], $document['numberplanid']);
        $document['number'] = $tmp ? $tmp : 0;
Пример #12
0
 function loadXajax()
 {
     // Prevents xajax from loading twice if already loaded by jReviews or BlueFlame Platform
     if (!class_exists('xajax') && !defined('XAJAX_LOADED') && !defined('XAJAX_VER')) {
         define('XAJAX_LOADED', 1);
         App::import('Vendor', 'xajax_05final' . DS . 'xajax_core' . DS . 'xajax.inc');
         if (defined('MVC_FRAMEWORK_ADMIN')) {
             $xajax = new xajax('index2.php?option=' . S2Paths::get('jreviews', 'S2_CMSCOMP') . '&task=xajax&no_html=1');
         } else {
             $xajax = new xajax();
         }
         $xajax->setCharEncoding(strtoupper(cmsFramework::getCharset()));
         if (strtolower(cmsFramework::getCharset()) == 'utf-8') {
             $decodeUTF8 = false;
         } else {
             $decodeUTF8 = true;
         }
         /* Set defaults from params */
         $this->xajax_statusMessage ? $xajax->setFlag('statusMessages', true) : $xajax->setFlag('statusMessages', false);
         $this->xajax_waitCursor ? $xajax->setFlag('waitCursor', true) : $xajax->setFlag('waitCursor', false);
         $this->xajax_debug ? $xajax->setFlag('debug', true) : $xajax->setFlag('debug', false);
         $decodeUTF8 ? $xajax->setFlag('decodeUTF8Input', true) : $xajax->setFlag('decodeUTF8Input', false);
         $xajax->registerFunction('xajaxDispatch');
         //			ob_start('ob_gzhandler');		// Results in wrong encoding error ni certain servers
         $xajax->processRequest();
         $js = $xajax->getJavascript(S2_VENDORS_URL . 'xajax_05final' . _DS);
         cmsFramework::addScript($js);
     }
 }
Пример #13
0
<?php

/**
 * @author
 */
define(RU, "1");
//for windows-1251
require_once SERVER_PATH . '/lib/xajax/xajax.inc.php';
$xajax = new xajax();
//$xajax->debugOn();
if (RU == 1) {
    $xajax->decodeUTF8InputOn();
}
$xajax->statusMessagesOn();
$xajax->errorHandlerOn();
//$xajax->setLogFile("../xajax/xajax_log/errors.log");
$xajax->registerFunction("process_form");
$xajax->registerFunction("process_browse_url");
$xajax->processRequests();
$sXajaxJavascript = $xajax->getJavascript('/lib/xajax');
Пример #14
0
            }
            if ($row['object1'] != '') {
                $object1 = unserialize($row['object1']);
            } else {
                $object1 = '';
            }
            if ($row['object2'] != '') {
                $object2 = unserialize($row['object2']);
            } else {
                $object2 = '';
            }
            if ($row['object3'] != '') {
                $object3 = unserialize($row['object3']);
            } else {
                $object3 = '';
            }
            if ($row['object4'] != '') {
                $object4 = unserialize($row['object4']);
            } else {
                $object4 = '';
            }
            $template->assign_block_vars('formula_list', array('FORMULA_ID' => $row['formulaid'], 'OBJECTNAME' => $row['objectname'], 'OBJECTID' => $row['objectid'], 'CASTG' => $row['price_g'], 'CASTS' => $row['price_s'], 'CASTC' => $row['price_c'], 'SKILL1ID' => $skill1['skid'] ? $skill1['skid'] : 0, 'SKILL1NAME' => $skill1['skid'] ? $skill1['skname'] : '', 'SKILL1LV' => $skill1['skid'] ? $skill1['sklv'] : 0, 'SKILL2ID' => $skill2 ? $skill2['skid'] : 0, 'SKILL2NAME' => $skill2 ? $skill2['skname'] : '', 'SKILL2LV' => $skill2 ? $skill2['sklv'] : 0, 'OBJECT1ID' => $object1 ? $object1['obid'] : 0, 'OBJECT1NAME' => $object1 ? $object1['obname'] : '', 'OBJECT1LV' => $object1 ? $object1['oblv'] : 0, 'OBJECT1NUM' => $object1 ? $object1['obnum'] : 0, 'OBJECT2ID' => $object2 ? $object2['obid'] : 0, 'OBJECT2NAME' => $object2 ? $object2['obname'] : '', 'OBJECT2LV' => $object2 ? $object2['oblv'] : 0, 'OBJECT2NUM' => $object2 ? $object2['obnum'] : 0, 'OBJECT3ID' => $object3 ? $object3['obid'] : 0, 'OBJECT3NAME' => $object3 ? $object3['obname'] : '', 'OBJECT3LV' => $object3 ? $object3['oblv'] : 0, 'OBJECT3NUM' => $object3 ? $object3['obnum'] : 0, 'OBJECT4ID' => $object4 ? $object4['obid'] : 0, 'OBJECT4NAME' => $object4 ? $object4['obname'] : '', 'OBJECT4LV' => $object4 ? $object4['oblv'] : 0, 'OBJECT4NUM' => $object4 ? $object4['obnum'] : 0));
        }
        $template->assign_vars(array('M_AJAX' => $xajax->getJavascript(), 'BUILDID' => $confid, 'BUILD_NAME' => $build_info['build_name'], 'S_MAIN_URL' => $url, 'SKILL_USE' => $user->lang['SKILL_USE'][$build_info['system_type']]));
        $db->sql_freeresult($result);
        // Output page
        page_header($user->lang['INDEX']);
        $template->set_filenames(array('body' => 'confraternity_do_body.html'));
        page_footer();
        break;
}
Пример #15
0
 /**
  * Finishes configuration parameters
  *
  * @return	boolean True if successful
  * @access	public
  * @since	1.5
  */
 function mainConfig()
 {
     global $mainframe;
     $vars =& $this->getVars();
     // get ftp configuration into registry for use in case of safe mode
     if ($vars['ftpEnable']) {
         JInstallationHelper::setFTPCfg($vars);
     }
     // Check a few directories are writeable as this may cause issues
     if (!is_writeable(JPATH_SITE . DS . 'tmp') || !is_writeable(JPATH_SITE . DS . 'installation' . DS . 'sql' . DS . 'migration')) {
         $vars['dircheck'] = JText::_('Some paths may be unwritable');
     }
     // Require the xajax library
     require_once JPATH_BASE . DS . 'includes' . DS . 'xajax' . DS . 'xajax.inc.php';
     // Instantiate the xajax object and register the function
     $xajax = new xajax(JURI::base() . 'installer/jajax.php');
     $xajax->registerFunction(array('instDefault', 'JAJAXHandler', 'sampledata'));
     //		$xajax->debugOn();
     $xajax->errorHandlerOn();
     $doc =& JFactory::getDocument();
     $doc->addCustomTag($xajax->getJavascript('', 'includes/js/xajax.js', 'includes/js/xajax.js'));
     // Deal with possible sql script uploads from this stage
     $vars['loadchecked'] = 0;
     if (JRequest::getVar('sqlupload', 0, 'post', 'int') == 1) {
         $vars['sqlresponse'] = JInstallationHelper::uploadSql($vars);
         $vars['dataloaded'] = '1';
         $vars['loadchecked'] = 1;
     }
     if (JRequest::getVar('migrationupload', 0, 'post', 'int') == 1 && JRequest::getVar('migrationUploaded', 0, 'post', 'int') == 0) {
         jexit(print_r(JRequest::getVar('migrationUploaded', 0, 'post', 'int')));
         $vars['migresponse'] = JInstallationHelper::uploadSql($vars, true);
         $vars['dataloaded'] = '1';
         $vars['loadchecked'] = 2;
     }
     if (JRequest::getVar('migrationUploaded', 0, 'post', 'int') == 1) {
         $vars['migresponse'] = JInstallationHelper::findMigration($vars);
         $vars['dataloaded'] = '1';
         $vars['loadchecked'] = 2;
     }
     //		$strip = get_magic_quotes_gpc();
     if (isset($vars['siteName'])) {
         $vars['siteName'] = stripslashes(stripslashes($vars['siteName']));
     }
     $folders = array('administrator/backups', 'administrator/cache', 'administrator/components', 'administrator/language', 'administrator/modules', 'administrator/templates', 'cache', 'components', 'images', 'images/banners', 'images/stories', 'language', 'plugins', 'plugins/content', 'plugins/editors', 'plugins/search', 'plugins/system', 'tmp', 'modules', 'templates');
     // Now lets make sure we have permissions set on the appropriate folders
     //		foreach ($folders as $folder)
     //		{
     //			if (!JInstallationHelper::setDirPerms( $folder, $vars ))
     //			{
     //				$lists['folderPerms'][] = $folder;
     //			}
     //		}
     return true;
 }
Пример #16
0
<?php

include "global.php";
$xajax = new xajax();
$xajax->registerFunction("codesFunction");
$xajax->processRequests();
$smarty->assign('str', $xajax->getJavascript('./xajax/'));
function codesFunction()
{
    $objResponse = new xajaxResponse();
    $objResponse->assign('showCodes', 'innerHTML', '<img src="images.php?' . md5(rand(10000, 99999)) . '" width="70" height="20">');
    return $objResponse->getXML();
}
$do_act = @$_POST['do_act'];
$userName = @$_POST['username'];
$pwd = @$_POST['password'];
if ($do_act == 'login') {
    $select = $db->select();
    $select->from(TABLE_CXECH_MEMBER, '*');
    $select->where('m_username =?', $userName);
    //$select->where('m_pwd =?', $pwd);
    $rows = $db->fetchRow($select);
    if ($rows) {
        if ($pwd == $rows['m_pwd']) {
            $u_ary = array('login_failure' => 0);
            $db->update(TABLE_CXECH_MEMBER, $u_ary, 'm_id =' . $rows['m_id']);
            $msg = '登陆成功';
        } else {
            $rows['login_failure'] = $rows['login_failure'] + 1;
            $u_ary = array('login_failure' => $rows['login_failure']);
            $db->update(TABLE_CXECH_MEMBER, $u_ary, 'm_id =' . $rows['m_id']);
Пример #17
0
include_once 'lib/map/map_query.php';
if (!function_exists('ms_newMapObj')) {
    $msg = tra("You must first setup MapServer");
    $smarty->assign('msg', $msg);
    $smarty->display('error.tpl');
    die;
}
$access->check_feature(array('feature_maps', 'ajax_xajax'));
$access->check_permission('tiki_p_map_view');
//setting up xajax
require_once "lib/ajax/xajax/xajax_core/xajaxAIO.inc.php";
$xajax = new xajax("x_maps.php");
//$xajax->setFlag('debug',true);
//$xajax->configure('statusMessages',true);
$xajax->register(XAJAX_FUNCTION, "map_redraw");
$smarty->assign('xajax_javascript', $xajax->getJavascript("lib/ajax/xajax"));
//handling the layer manager menu: visible by default if never used before
if (getCookie('layermenu', "menu") != 'o' && getCookie('layermenu', "menu") != 'c') {
    $smarty->assign('mnu_layermenu', 'display:block;');
}
$smarty->assign('tiki_p_map_edit', $tiki_p_map_edit);
if (isset($_REQUEST['mapfile'])) {
    // Validate to prevent displaying any file
    if (strstr($_REQUEST["mapfile"], '..')) {
        $smarty->assign('errortype', 401);
        $msg = tra("You do not have permission to do that");
        $smarty->assign('msg', $msg);
        $smarty->display('error.tpl');
        die;
    }
    $mapfile = $_REQUEST['mapfile'];
Пример #18
-13
        if (count($sparray) + count($sparrayNoLogout) === 0) {
            $httpredirect->setDestination(sspmod_SAML2_Message::getDebugDestination());
            $httpredirect->send($rg);
        } else {
            $logoutresponse = $httpredirect->getRedirectURL($rg);
        }
    } elseif (array_key_exists('RelayState', $logoutInfo)) {
        SimpleSAML_Utilities::redirect($logoutInfo['RelayState']);
        exit;
    } else {
        echo 'You are logged out';
        exit;
    }
} catch (Exception $exception) {
    SimpleSAML_Utilities::fatalError($session->getTrackID(), 'GENERATELOGOUTRESPONSE', $exception);
}
$spmeta = $metadata->getMetaData($requester, 'saml20-sp-remote');
$spname = $requester;
if (array_key_exists('name', $spmeta)) {
    $spname = $spmeta['name'];
}
$et = new SimpleSAML_XHTML_Template($config, 'logout-iframe.php');
$et->data['header'] = 'Logout';
$et->data['sparray'] = $sparray;
$et->data['sparrayNoLogout'] = $sparrayNoLogout;
$et->data['logoutresponse'] = $logoutresponse;
$et->data['xajax'] = $xajax;
$et->data['requesterName'] = $spname;
$et->data['head'] = $xajax->getJavascript();
$et->show();
exit(0);