public function resumeTypeHtml() { $default_type = array(1 => array('pkid' => 1, 'name' => '中文简历', 'url' => '/Student/like'), 3 => array('pkid' => 3, 'name' => '中/英文简历', 'url' => '/EnStudent/enlike'), 4 => array('pkid' => 4, 'name' => '附件简历', 'url' => '/PageOffice/like')); $data = $this->resumeType(); //是否已经上传了简历附件 if (isset($data[4])) { $upload_file = 1; } else { $upload_file = 0; } $default = $this->ResumeModel->resumeDefault(); //默认投递 $this->assign('default', $default_type[$default['resume_type']]); //做选择数组 foreach ($default_type as $key => $value) { if (empty($data[$key])) { unset($default_type[$key]); } else { if ($key == $default['resume_type']) { unset($default_type[$key]); } } } //插件下载链接 $download_url = 'http://' . C('APP_IP') . ':8080/JavaBridge/posetup.exe'; $this->assign('default_type', $default_type); $this->assign('upload_file', $upload_file); $this->assign('pop_show', isset($data[1]) ? 'show' : 'hide'); //判断是否能够上传简历,先有中文简历后方可上传简历 $this->assign('data', $data); $this->assign('download_url', $download_url); $this->assign('browser', checkBrowser()); $this->assign('cookie_set', cookieUploadCheck()); return $this->fetch('resume_upload'); }
public function test_checkBrowser() { $actual = array('browser' => 'chrome', 'version' => '46.0', 'platform' => 'linux', 'userAgent' => 'mozilla/5.0 (x11; linux i686) applewebkit/537.36 (khtml, like gecko) chrome/46.0.2490.80 safari/537.36'); $result = checkBrowser(); $this->assertEquals($actual, $result); }
/** * Check if compatible * * @return */ function isCompatible() { if (!is_readable(XOOPS_ROOT_PATH . _XK_P_PATH . "/include/functions.inc.php")) { return false; } include_once XOOPS_ROOT_PATH . _XK_P_PATH . "/include/functions.inc.php"; return checkBrowser(false); }
wp_enqueue_script("jquery"); ?> <script type="text/javascript">var switchTo5x=true;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher:'f4078d11-0af1-4091-b34f-110f481e6e75'});</script> <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?> /js/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?> " /> <?php $stylesheet = checkBrowser($useragent); echo $stylesheet; ?> <script> jQuery(document).ready(function() { jQuery('a.slide_down_posts').click(function(){ jQuery('.show_ind_posts').toggle(500); }); }); </script> </head> <body <?php
<?php require "counter.php"; updateVisits(); require "mySqlBase.php"; require "phpHelper.php"; initMySql(); checkBrowser(); $coords = collectCoordinates(); $updates = getAllUpdates(); echo "Sprache ist: " . $_GET['sprache']; ?> <html> <head> <title>BE</title> <meta name="description" content="Entdecken Sie mit Ihrem iPhone die gesamte Wattenmeerökologie der Insel Sylt- und das in nur wenigen Sekunden!"> <link rel="EXHAUST/icon_actual.png"> <meta name="keywords" content="Beach, explorer, niels, sievertsen, strand, wattenmeer, watt, meer, arten, iphone, smartphone, handy, entdecken, jqtouch, css, php, html, ajax"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css" media="screen">@import "ENGINE/jqtouch/jqtouch/jqtouch.css";</style> <style type="text/css" media="screen">@import "ENGINE/jqtouch/themes/jqt/theme.css";</style> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript" charset="utf-8"></script> <script src="ENGINE/jqtouch/jqtouch/jqtouch.js" type="application/x-javascript" charset="utf-8"></script> <script src="jqt.location.js" type="application/x-javascript" charset="utf-8"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script type="text/javascript" charset="utf-8"> var jQT = new $.jQTouch({ icon: 'EXHAUST/icon_actual.png',
$spaw_root = XOOPS_ROOT_PATH . '/modules/news/admin/spaw/'; include $spaw_root . 'spaw_control.class.php'; if (checkBrowser()) { $sw = new SPAW_Wysiwyg('hometext', $hometext); $sw->show(); } else { xoopsCodeTarea("hometext", 60, 15); xoopsSmilies("hometext"); } } else { xoopsCodeTarea("hometext", 60, 15); xoopsSmilies("hometext"); } echo "<br /></p><p><b>" . _AM_EXTEXT . "</b><br /><br />\n"; if ($xoopsModuleConfig['news_wysiwyg'] == '1') { if (checkBrowser()) { $sw = new SPAW_Wysiwyg('bodytext', $bodytext); $sw->show(); echo "</p>" . _MULTIPAGE; } else { xoopsCodeTarea("bodytext", 60, 15, 2); xoopsSmilies("bodytext"); echo "</p>" . _MULTIPAGE; } } else { xoopsCodeTarea("bodytext", 60, 15, 2); xoopsSmilies("bodytext"); echo "</p>" . _MULTIPAGE; } if (!empty($xoopsConfig['allow_html'])) { echo "<p>" . _AM_ALLOWEDHTML . "<br />";
<?php require_once "online/utils.php"; //Detect browser $outdated = false; $browser = detectBrowser(); if ($browser != false) { if (checkBrowser($browser) == false) { $outdated = true; } } else { $outdated = true; } //Outdated browser if ($outdated) { echo "<meta http-equiv=\"Refresh\" content=\"0; URL=offline/outdated.php\">"; exit; } //Connected or not $state = check_connected(); //If not connected if (!$state) { /* * User connection * */ //If validation of the Sign in form if (isset($_POST["go"])) { //Login & pass from form $login = strtolower(checkInput("post", "login", "/^[a-zA-Z0-9]{1,}\$/")); $password = checkInput("post", "password", "/.*/");
function do_login($requested_page, $outinfo = FALSE, $hh = FALSE) { // do login/ses sion code - returns array - 2/12/09, 3/8/09 global $hide_dispatched, $hide_status_groups; @session_start(); global $expiry, $istest; $now = mysql_format_date(time() - intval(get_variable('delta_mins')) * 60); $the_sid = isset($_SESSION['id']) ? $_SESSION['id'] : null; // 7/3/11 $warn = array_key_exists('expires', $_SESSION) && $now > $_SESSION['expires'] ? "Log-in has expired due to inactivity. Please log in again." : ""; $internet = get_variable("internet"); // 8/22/10 $temp = implode(";", $_SESSION); if (array_key_exists('user_id', $_SESSION) && is_expired($_SESSION['user_id'])) { $the_date = mysql_format_date($expiry); $sess_key = session_id(); // not expired $query = "UPDATE `{$GLOBALS['mysql_prefix']}user` SET `expires`= '{$the_date}' WHERE `sid` = '{$sess_key}' LIMIT 1"; $result = mysql_query($query) or do_error("", 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); $_SESSION['expires'] = $expiry; $warn = ""; if ($internet == 3) { set_filenames($internet); } // possible change to filenames based on connect status - 8/31/10 } else { // not logged in; now either get form data or db check form entries if (array_key_exists('frm_passwd', $_POST)) { // first, db check // 6/25/10 $categories = array(); // 3/15/11 $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}assigns` WHERE `clear` <> 'NULL'"; // 3/15/11 $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); $num_disp = mysql_num_rows($result); // if ($num_disp > 0 && $hide_dispatched == 1) { $category_butts[0] = "Deployed"; $i = 1; } else { $i = 0; } if ($hide_status_groups == 1) { // 3/15/11 $query = "SELECT DISTINCT `group` FROM `{$GLOBALS['mysql_prefix']}un_status` ORDER BY `group` ASC"; $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); while ($row = stripslashes_deep(mysql_fetch_assoc($result))) { $categories[$i] = $row['group']; $i++; } unset($result); } else { $categories[$i] = "Available"; $i++; $categories[$i] = "Not Available"; } $fac_categories = array(); $i = 0; $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}fac_types` ORDER BY `name` ASC"; $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); while ($row = stripslashes_deep(mysql_fetch_assoc($result))) { $fac_categories[$i] = $row['name']; $i++; } unset($result); $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}user` \n\t\t\t\tWHERE `user`=" . quote_smart($_POST['frm_user']) . " \t \n\t\t\t\tAND (`passwd`=PASSWORD(" . quote_smart($_POST['frm_passwd']) . ") \n\t\t\t\tOR `passwd`=MD5(" . quote_smart(strtolower($_POST['frm_passwd'])) . " )) \n\t\t\t\tLIMIT 1"; $result = mysql_query($query) or do_error("", 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); if (mysql_affected_rows() == 1) { $row = stripslashes_deep(mysql_fetch_assoc($result)); if ($row['sortorder'] == NULL) { $row['sortorder'] = "date"; } $dir = $row['sort_desc'] ? " DESC " : ""; $sid = session_id(); // 1/8/10 $browser = checkBrowser(FALSE); $the_date = mysql_format_date($expiry); $query = "UPDATE `{$GLOBALS['mysql_prefix']}user` SET \n\t\t\t\t\t`sid` = '{$sid}', \n\t\t\t\t\t`expires`= '{$the_date}', \n\t\t\t\t\t`login` = '{$now}', \n\t\t\t\t\t`_from`= '{$_SERVER['REMOTE_ADDR']}', \n\t\t\t\t\t`browser` = '{$browser}' \n\t\t\t\t\tWHERE `id` = {$row['id']} LIMIT 1"; $result = mysql_query($query) or do_error("", 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__); $_SESSION['id'] = $sid; $_SESSION['expires'] = time(); $_SESSION['user_id'] = $row['id']; $_SESSION['user'] = $row['user']; $_SESSION['level'] = $row['level']; $_SESSION['login_at'] = $now; $_SESSION['scr_height'] = $_POST['scr_height']; $_SESSION['scr_width'] = $_POST['scr_width']; // monitor dimensions this user $_SESSION['allow_dirs'] = TRUE; // allow directions $_SESSION['show_closed'] = TRUE; // show closed dispatched $_SESSION['sortorder'] = $row['sortorder'] == NULL ? "date" : $row['sortorder']; $_SESSION['sort_desc'] = $row['sort_desc'] == NULL ? " DESC " : $row['sort_desc']; $_SESSION['ticket_per_page'] = 0; $_SESSION['show_hide_unit'] = "s"; // show/hide units $_SESSION['show_hide_unav'] = "s"; // show/hide unavailable units - 4/27/10 $_SESSION['show_hide_fac'] = "h"; // show/hide facilities - 3/8/10 $_SESSION['unit_flag_1'] = ""; // unit id where status or position change $_SESSION['unit_flag_2'] = ""; // usage tbd 4/7/10 $_SESSION['tick_flag_1'] = ""; // usage tbd 4/7/10 $_SESSION['tick_flag_2'] = ""; // usage tbd 4/7/10 $_SESSION['fac_flag_2'] = 2; // 2/16/11 $_SESSION['list_type'] = 0; // 12/2/10 $_SESSION['show_hide_Deployed'] = "s"; // Show all deployed tickets 3/15/11 $_SESSION['day_night'] = $_POST['frm_daynight']; // 01/20/11 Set Day or Night Colors $_SESSION['hide_controls'] = "s"; // 3/15/11 $_SESSION['incs_list'] = "s"; // 3/15/11 $_SESSION['resp_list'] = "s"; // 3/15/11 $_SESSION['facs_list'] = "s"; // 3/15/11 $_SESSION['regions_boxes'] = "s"; // 6/10/11 $_SESSION['user_unit_id'] = $row['responder_id']; //3/19/11 $_SESSION['show_hide_upper'] = "Show Menu"; //6/10/11 foreach ($categories as $key => $value) { // 3/15/11 $sess_flag = "show_hide_" . $value; $_SESSION[$sess_flag] = "s"; } foreach ($fac_categories as $key => $value) { // 3/15/11 $fac_sess_flag = "show_hide_fac_" . $value; $_SESSION[$fac_sess_flag] = "h"; } $temp = implode(";", $_SESSION); set_filenames($internet); // 8/31/10 do_log($GLOBALS['LOG_SIGN_IN'], 0, 0, $row['id']); // log it // 7/21/10 $query = "DELETE FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE `status` = {$GLOBALS['STATUS_RESERVED']} AND `_by` = {$_SESSION['user_id']};"; $result = mysql_query($query); $to = ""; $subject = "Tickets Login"; $message = "From: " . gethostbyaddr($_SERVER['REMOTE_ADDR']) . "\nBrowser:" . $_SERVER['HTTP_USER_AGENT']; $message .= "\nBy: " . $_POST['frm_user']; $message .= "\nScreen: " . $_POST['scr_width'] . " x " . $_POST['scr_height']; $message .= "\nReferrer: " . $_POST['frm_referer']; // @mail ($to, $subject, $message); // 1/11/09 header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $unit_id = get_unit(); // 3/19/11 $level = $row['level']; if ($level == $GLOBALS['LEVEL_UNIT']) { // 3/1/12 $extra = 'mobile.php'; } else { if ($level == $GLOBALS['LEVEL_STATS']) { $extra = 'stats_scr.php?stats=stats'; } else { $extra = 'main.php?log_in=1'; } } // $extra = (($row['level']== $GLOBALS['LEVEL_UNIT']) ||($unit_id))? 'mobile.php' : 'main.php?log_in=1'; // 8/29/10 header("Location: http://{$host}{$uri}/{$extra}"); // to top of calling script exit; } // end if (mysql_affected_rows()==1) } // end if((!empty($_POST))&&(check_for_rows(...) // if no form data or values fail @session_destroy(); // 4/29/10 ?> <!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><TITLE>Tickets - free open source computer-aided dispatch software (CAD)</TITLE> <META HTTP-EQUIV=="Description" CONTENT="free, open source, CAD, dispatch, emergency response, ARES Teams, RACES Teams, amateur radio " /> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <META HTTP-EQUIV="Expires" CONTENT="0"> <META HTTP-EQUIV="Cache-Control" CONTENT="NO-CACHE"> <META HTTP-EQUIV="Pragma" CONTENT="NO-CACHE"> <META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript"> <META HTTP-EQUIV="Script-date" CONTENT="1/23/10"> <LINK REL=StyleSheet HREF="stylesheet.php?version=<?php print time(); ?> " TYPE="text/css"> <!-- 3/15/11 --> <STYLE type="text/css"> input {background-color:transparent;} /* Benefit IE radio buttons */ </STYLE> <SCRIPT defer="defer"> <!-- 11/18/10 --> String.prototype.trim = function () { return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"); }; function getBrowserWidth(){ var val=""; if (window.innerWidth){ var val= window.innerWidth;} else if (document.documentElement && document.documentElement.clientWidth != 0){ var val= document.documentElement.clientWidth; } else if (window.screen.width && window.screen.width != 0){ var val= window.screen.width; } else if (document.body){var val= document.body.clientWidth;} return(isNaN(val))? 1024: val; } function getBrowserHeight(){ var val=""; if (window.innerHeight){ var val= window.innerHeight;} else if (document.documentElement && document.documentElement.clientHeight != 0){ var val= document.documentElement.clientHeight; } else if (window.screen.height && window.screen.height != 0){ var val= window.screen.height; } else if (document.body){var val= document.body.clientHeight;} return(isNaN(val))? 740: val; } function Set_Cookie( name, value, expires, path, domain, secure ) { var today = new Date(); // set time in milliseconds today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000 * 60 ; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + //expires.toGMTString() ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } // if the expires variable is set, make the correct expires time, the // current script below will set it for x number of days, to make it // for hours, delete * 24, for minutes, delete * 60 * 24 // alert('expires ' + expires_date.toGMTString());// this is for testing purposes only // alert( 'today ' + today.toGMTString() );// this is for testing purpose only function Get_Cookie( check_name ) { var a_all_cookies = document.cookie.split( ';' ); // first we'll split this cookie up into name/value pairs var a_temp_cookie = ''; // note: document.cookie only returns name=value, not the other components var cookie_name = ''; var cookie_value = ''; var b_cookie_found = false; // set boolean t/f default f var i = ''; for ( i = 0; i < a_all_cookies.length; i++ ) { a_temp_cookie = a_all_cookies[i].split( '=' ); // plit each name=value pair cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); // and trim left/right whitespace if ( cookie_name == check_name ){ // if the extracted name matches passed check_name b_cookie_found = true; if ( a_temp_cookie.length > 1 ){ // we need to handle case where cookie has no value but exists (no = sign, that is): cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); } return cookie_value;// note that in cases where cookie is initialized but no value, null is returned break; } a_temp_cookie = null; cookie_name = ''; } if ( !b_cookie_found ) { return null; } } // end function Get_Cookie( function do_hh_onload () { // 2/24/09 document.login_form.scr_width.value=getBrowserWidth(); document.login_form.scr_height.value=getBrowserHeight(); document.login_form.frm_user.focus(); } // end function function do_onload () { if (this.window.name!="main") {self.close();} // in a popup if(self.location.href==parent.location.href) { // prevent frame jump self.location.href = 'index.php'; }; try { // should always be true parent.frames["upper"].document.getElementById("whom").innerHTML = "<?php echo NOT_STR; ?> " ; parent.frames["upper"].document.getElementById("level").innerHTML = "<?php echo NA_STR; ?> " ; parent.frames["upper"].document.getElementById("script").innerHTML = "login"; } catch(e) { } document.login_form.scr_width.value=screen.width; // 1/23/10 document.login_form.scr_height.value=screen.height; // document.login_form.frm_user.focus(); // parent.upper.hide_butts(); // 1/21/09 } // end function do onload () <?php if (get_variable('call_board') == 2) { // 7/7/09 ?> try { // 8/10/10 parent.calls.location.href = 'board.php'; } catch (e) { } <?php // print "\tparent.calls.location.href = 'board.php';\n"; // reload to show 'waiting' message 6/19/09 } print "\tparent.upper.location.href = 'top.php';\n"; // reload and initialize top frame 6/19/09 ?> window.setTimeout("document.forms[0].frm_user.focus()", 1000); </SCRIPT> </HEAD> <?php print $hh ? "\n\t<BODY onLoad = 'do_hh_onload()'>\n" : "\n\t<BODY onLoad = 'do_onload()'>\n"; // 2/24/09 ?> <!-- <BODY onLoad = "do_onload()"> 11/6/10 --> <CENTER><BR /> <?php if (get_variable('_version') != '') { print "<SPAN style='FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: #000000;'>" . get_variable('login_banner') . "</SPAN><BR /><BR />"; } ?> </FONT> <FORM METHOD="post" ACTION="<?php print $requested_page; ?> " NAME="login_form" onSubmit="return true;"> <TABLE BORDER=0> <?php if (array_key_exists('frm_passwd', $_POST)) { $warn = "Login failed. Pls enter correct values and try again."; } if (!empty($warn)) { print "<TR CLASS='odd'><TH COLSPAN='99'><FONT CLASS='warn'>\n\t\t\t{$warn}\n\t\t\t</FONT><BR /><BR /></TH></TR>"; } $temp = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ""; $my_click = $_SERVER["HTTP_HOST"] == "127.0.0.1" ? " onClick = \"document.login_form.frm_user.value='admin';document.login_form.frm_passwd.value='admin';\"" : ""; // print (array_key_exists ('frm_user', $_POST))? $_POST['frm_user'] . "/" : ""; // print (array_key_exists ('frm_passwd', $_POST))? $_POST['frm_passwd']: ""; ?> <TR CLASS='even'><TD ROWSPAN=6 VALIGN='middle' ALIGN='left' bgcolor=#EFEFEF><BR /><BR /> <IMG BORDER=0 SRC='open_source_button.png' <?php print $my_click; ?> ><BR /><BR /> <img src="php.png" /> </TD><TD CLASS="td_label"><?php print get_text("User"); ?> :</TD> <TD><INPUT TYPE="text" NAME="frm_user" MAXLENGTH="255" SIZE="30" onChange = "document.login_form.frm_user.value = document.login_form.frm_user.value.trim();" VALUE=""></TD></TR> <TR CLASS='odd'><TD CLASS="td_label"><?php print get_text("Password"); ?> : </TD> <TD><INPUT TYPE="password" NAME="frm_passwd" MAXLENGTH="255" SIZE="30" onChange = "document.login_form.frm_passwd.value = document.login_form.frm_passwd.value.trim();" VALUE=""></TD></TR> <TR CLASS="even"><TD COLSPAN=2> </TD></TR> <TR CLASS='odd'><TD CLASS="td_label">Colors: </TD> <TD><INPUT TYPE="radio" NAME="frm_daynight" VALUE="Day" checked>Day <INPUT TYPE="radio" NAME="frm_daynight" value="Night">Night</TD></TR> <TR CLASS="even"><TD COLSPAN=2> </TD></TR> <TR CLASS='even'><TD></TD><TD><INPUT TYPE="submit" VALUE="<?php print get_text("Log In"); ?> "></TD></TR> <TR CLASS='even'><TD COLSPAN=3 ALIGN='center'><BR /> Visitors may login as <B>guest</B> with password <B>guest</B>. </TD></TR> <TR CLASS='even'><TD COLSPAN=3> </TD></TR> <TR CLASS='even'><TD COLSPAN=3> </TD></TR> </TABLE> <INPUT TYPE='hidden' NAME = 'scr_width' VALUE=''> <INPUT TYPE='hidden' NAME = 'scr_height' VALUE=''> <INPUT TYPE='hidden' NAME = 'frm_referer' VALUE="<?php print $temp; ?> "> </FORM><BR /><BR /> <a href="http://www.ticketscad.org/"><SPAN CLASS='text_small'>Tickets CAD Project home</SPAN></a> </CENTER></HTML> <?php exit; // no return value } }
2/27/12 div's added for latest ticket, assigns, action and patient */ error_reporting(E_ALL); require_once './incs/functions.inc.php'; // 7/28/10 require_once './incs/browser.inc.php'; // 6/12/10 @session_start(); if (file_exists("./incs/modules.inc.php")) { // 10/28/10 require_once './incs/modules.inc.php'; } $temp = intval(get_variable('auto_poll')); $poll_cycle_time = $temp > 0 ? $temp * 1000 : 15000; // seconds to ms - 8/20/10 $browser = trim(checkBrowser(FALSE)); // 6/12/10 ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTML> <HEAD> <TITLE><?php print ucwords(LessExtension(basename(__FILE__))); ?> </TITLE> <META NAME="Author" CONTENT="" /> <META NAME="Keywords" CONTENT="" /> <META NAME="Description" CONTENT="" /> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" /> <META HTTP-EQUIV="Expires" CONTENT="0" />
/** * Prepare HTML for output * * @return string HTML */ function render() { // include files include_once XOOPS_ROOT_PATH . '' . $this->getUrl() . '/include/functions.inc.php'; include_once getLanguage($this->getUrl()); static $koivi_js_loaded = false; static $koivi_tabletools_loaded = false; $url = XOOPS_URL . '' . $this->getUrl(); $skinUrl = $url . '/skins/' . $this->getSkin(); $isie = checkBrowser(); $toggleMode = false; $themeCss = false; $colorPalette = false; $extraDivs = ''; // show dhtml textarea for non compatible browsers if (!checkBrowser(false)) { $textarea = new XoopsFormDhtmlTextArea($this->getCaption(), $this->getName(), $this->getValue(), 15, 60, ''); return $textarea->render(); } if (!$koivi_js_loaded) { $form = '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/cntextmenu.js"></script>'; $form .= '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/editor.js"></script>'; $form .= '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/xhtml.js"></script>'; $koivi_js_loaded = true; } else { $form = ''; } if (in_array('createtable', $this->getOptions()) && $koivi_tabletools_loaded == false) { $form .= '<script language="JavaScript" type="text/javascript" src="' . $url . '/include/js/table_tools.js"></script>'; $koivi_tabletools_loaded = true; } $form .= '<link href="' . $skinUrl . '/' . $this->getSkin() . '.css" rel="Stylesheet" type="text/css" /> <div id="alleditor' . $this->getName() . '" style="width:' . $this->getWidth() . ';border:1px solid silver;"> <div id="toolbar' . $this->getName() . '" class="' . $this->getSkin() . 'toolbarBackCell">'; if (in_array('floating', $this->getOptions())) { $form .= ' <div class="' . $this->getSkin() . 'editorStatus"> <img alt="" src="' . $skinUrl . '/minimize.gif" onclick="XK_hideToolbar(\'' . $this->getName() . '\',\'' . $skinUrl . '\')" /> <img id="floatButton' . $this->getName() . '" alt="' . _XK_FLOAT . '" title="' . _XK_FLOAT . '" src="' . $skinUrl . '/floating.gif" onclick="XK_floatingToolbar(\'' . $this->getName() . '\',\'' . $this->getSkin() . '\')"/> <img id="maximizeButton' . $this->getName() . '" alt="' . _XK_FLOAT . '" title="' . _XK_FLOAT . '" src="' . $skinUrl . '/fullscreen.gif" onclick="XK_maximizeEditor(\'' . $this->getName() . '\')"/> </div>'; } $form .= '<div id="buttons' . $this->getName() . '" class="' . $this->getSkin() . 'toolBar">'; foreach ($this->getOptions() as $tool) { switch (strtolower($tool)) { case "bold": $form .= '<img alt="' . _XK_BOLD . '" title="' . _XK_BOLD . '" src="' . $skinUrl . '/bold.gif" onmousedown="XK_doTextFormat(\'bold\',\'\',\'' . $this->getName() . '\')" />'; break; case "cellalign": $form .= '<img alt="' . _XK_CELLALIGN . '" title="' . _XK_CELLALIGN . '" src="' . $skinUrl . '/cellalign.gif"/>'; $form .= '<img alt="' . _XK_CELLALIGN . '" title="' . _XK_CELLALIGN . '" id="cellpropbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_useTableDivs(\'' . $this->getName() . '\',\'align\')"/>'; $extraDivs .= $this->_renderCellAlign(); break; case "cellborders": $form .= '<img alt="' . _XK_CELLPROPS . '" title="' . _XK_CELLPROPS . '" src="' . $skinUrl . '/cellborders.gif" onmousedown="XK_TTools(\'' . $this->getName() . '\',\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=cellProps&skin=' . $this->getSkin() . '&url=' . $this->getUrl() . '\',\'table\',400,260)"/>'; $form .= '<img alt="' . _XK_CELLALIGN . '" title="' . _XK_CELLALIGN . '" id="cbbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_useTableDivs(\'' . $this->getName() . '\',\'borders\')"/>'; $extraDivs .= $this->_renderCellBorders(); break; case "cellcolor": $form .= '<img alt="' . _XK_FORECOLOR . '" id="cellcolor' . $this->getName() . '" title="' . _XK_FORECOLOR . '" src="' . $skinUrl . '/cellcolor.gif" onclick="XK_color(\'' . $this->getName() . '\',\'cellcolor\',\'cellcolor\')"/>'; $colorPalette = true; break; case "code": $form .= '<img alt="' . _XK_CODE . '" title="' . _XK_CODE . '" src="' . $skinUrl . '/code.gif" onmousedown="XK_doTextFormat(\'Code\',\'\',\'' . $this->getName() . '\')"/>'; break; case "copy": $form .= '<img alt="' . _XK_COPY . '" title="' . _XK_COPY . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'copy\',\'\',\'' . $this->getName() . '\')"/>'; break; case "createlink": $form .= '<img alt="' . _XK_CREATELINK . '" title="' . _XK_CREATELINK . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'createlink\',\'\',\'' . $this->getName() . '\')"/>'; break; case "createtable": $form .= '<img alt="' . _XK_INSERTTABLE . '" title="' . _XK_INSERTTABLE . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_openPopup(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=table&url=' . $this->getUrl() . '\',\'table\',400,290)"/>'; $form .= '<img alt="' . _XK_CREATEQUICKTABLE . '" id="tablebutton' . $this->getName() . '" title="' . _XK_CREATEQUICKTABLE . '" src="' . $skinUrl . '/popup.gif" onclick="XK_showHideDiv(\'' . $this->getName() . '\',\'tablebutton\',\'tablepicker\')"/>'; $extraDivs .= $this->_renderQuickTable(); break; case "cut": $form .= '<img alt="' . _XK_CUT . '" title="' . _XK_CUT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'cut\',\'\',\'' . $this->getName() . '\')"/>'; break; case "fontname": $form .= '<select id="fontname' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" onchange="XK_doTextFormat(\'fontname\',this.options[this.selectedIndex].value,\'' . $this->getName() . '\')"><option value="">' . _XK_FONT . '</option>'; foreach ($this->getFonts() as $fontname => $font) { $form .= '<option value="' . $font . '">' . $fontname . '</option>'; } $form .= '</select>'; break; case "fontsize": $form .= ' <select id="fontsize' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" onchange="XK_doTextFormat(\'fontsize\',this.options[this.selectedIndex].value,\'' . $this->getName() . '\')""> <option value="">' . _XK_FONT_SIZE . '</option> <option value="-2">' . _XK_FONT_XSMALL . '</option> <option value="-1">' . _XK_FONT_SMALL . '</option> <option value="+0">' . _XK_FONT_MEDIUM . '</option> <option value="+1">' . _XK_FONT_LARGE . '</option> <option value="+2">' . _XK_FONT_XLARGE . '</option> <option value="+4">' . _XK_FONT_XXLARGE . '</option> </select>'; break; case "forecolor": $form .= '<img alt="' . _XK_FORECOLOR . '" id="forecolor' . $this->getName() . '" title="' . _XK_FORECOLOR . '" src="' . $skinUrl . '/forecolor.gif" onclick="XK_color(\'' . $this->getName() . '\',\'forecolor\',\'forecolor\')"/>'; $colorPalette = true; break; case "formatblock": $form .= ' <select id="formatblock' . $this->getName() . '" class="' . $this->getSkin() . 'selectInput" onchange="XK_doTextFormat(\'formatblock\',this.options[this.selectedIndex].value,\'' . $this->getName() . '\')"> <option value="">' . _XK_FONT_FORMAT . '</option> <option value="<p>">' . _XK_FONT_NONE . '</option> <option value="<h1>">' . _XK_FONT_HEADING1 . '</option> <option value="<h2>">' . _XK_FONT_HEADING2 . '</option> <option value="<h3>">' . _XK_FONT_HEADING3 . '</option> <option value="<h4>">' . _XK_FONT_HEADING4 . '</option> <option value="<h5>">' . _XK_FONT_HEADING5 . '</option> <option value="<h6>">' . _XK_FONT_HEADING6 . '</option> <option value="<p>">' . _XK_FONT_PARAGRAPH . '</option> <option value="<pre>">' . _XK_FONT_FORMATTED . '</option> <option value="<address>">' . _XK_FONT_ADDRESS . '</option> </select>'; break; case "hilitecolor": $form .= '<img alt="' . _XK_HILITECOLOR . '" id="hilitecolor' . $this->getName() . '" title="' . _XK_HILITECOLOR . '" src="' . $skinUrl . '/hilitecolor.gif" onclick="XK_color(\'' . $this->getName() . '\',\'hilitecolor\',\'hilitecolor\')"/>'; $colorPalette = true; break; case "imagemanager": $form .= '<img alt="' . _XK_INSERTIMAGEM . '" title="' . _XK_INSERTIMAGEM . '" onmouseover="style.cursor=\'hand\'" onmousedown="javascript:openWithSelfMain(\'' . XOOPS_URL . '/imagemanager.php?target=' . $this->getName() . '\',\'imgmanager\',400,430);" src="' . $skinUrl . '/imagemanager.gif"/>'; break; case "imageproperties": $form .= '<img alt="' . _XK_EDITIMAGE . '" title="' . _XK_EDITIMAGE . '" src="' . $skinUrl . '/imageprops.gif" onmousedown="XK_openPopup(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=imageProps&url=' . $this->getUrl() . '&skin=' . $this->getSkin() . '\',\'table\',400,260)"/>'; break; case "indent": $form .= '<img alt="' . _XK_INDENT . '" title="' . _XK_INDENT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'indent\',\'\',\'' . $this->getName() . '\')"/>'; break; case "inserthorizontalrule": $form .= '<img alt="' . _XK_INSERTHORIZONTALRULE . '" title="' . _XK_INSERTHORIZONTALRULE . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'inserthorizontalrule\',\'\',\'' . $this->getName() . '\')"/>'; break; case 'insertanchor': $form .= '<img alt="' . _XK_INSERTANCHOR . '" title="' . _XK_INSERTANCHOR . '" src="' . $skinUrl . '/insertanchor.gif" onmousedown="XK_insertAnchor(\'' . $this->getName() . '\')"/>'; break; case "insertdate": $form .= '<img alt="' . _XK_INSERTDATE . '" title="' . _XK_INSERTDATE . '" src="' . $skinUrl . '/insertdate.gif" onmousedown="XK_insertDate(\'' . $this->getName() . '\')"/>'; break; case "insertimage": $form .= '<img alt="' . _XK_INSERTIMAGE . '" title="' . _XK_INSERTIMAGE . '" src="' . $skinUrl . '/insertimage.gif" onmousedown="XK_doTextFormat(\'insertimage\',\'\',\'' . $this->getName() . '\')"/>'; break; case "insertorderedlist": $form .= '<img alt="' . _XK_INSERTORDEREDLIST . '" title="' . _XK_INSERTORDEREDLIST . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'insertorderedlist\',\'\',\'' . $this->getName() . '\')"/>'; break; case "insertunorderedlist": $form .= '<img alt="' . _XK_INSERTUNORDEREDLIST . '" title="' . _XK_INSERTUNORDEREDLIST . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'insertunorderedlist\',\'\',\'' . $this->getName() . '\')"/>'; break; case "insertsymbols": $form .= $this->_renderInsertSymbols(); break; case "italic": $form .= '<img alt="' . _XK_ITALIC . '" title="' . _XK_ITALIC . '" src="' . $skinUrl . '/italic.gif" onmousedown="XK_doTextFormat(\'italic\',\'\',\'' . $this->getName() . '\')"/>'; break; case "justifycenter": $form .= '<img alt="' . _XK_JUSTIFYCENTER . '" title="' . _XK_JUSTIFYCENTER . '" src="' . $skinUrl . '/justifycenter.gif" onmousedown="XK_doTextFormat(\'justifycenter\',\'\',\'' . $this->getName() . '\')"/>'; break; case "justifyfull": $form .= '<img alt="' . _XK_JUSTIFYFULL . '" title="' . _XK_JUSTIFYFULL . '" src="' . $skinUrl . '/justifyfull.gif" onmousedown="XK_doTextFormat(\'justifyfull\',\'\',\'' . $this->getName() . '\')"/>'; break; case "justifyleft": $form .= '<img alt="' . _XK_JUSTIFYLEFT . '" title="' . _XK_JUSTIFYLEFT . '" src="' . $skinUrl . '/justifyleft.gif" onmousedown="XK_doTextFormat(\'justifyleft\',\'\',\'' . $this->getName() . '\')"/>'; break; case "justifyright": $form .= '<img alt="' . _XK_JUSTIFYRIGHT . '" title="' . _XK_JUSTIFYRIGHT . '" src="' . $skinUrl . '/justifyright.gif" onmousedown="XK_doTextFormat(\'justifyright\',\'\',\'' . $this->getName() . '\')"/>'; break; case "ltr": $form .= '<img alt="' . _XK_LEFTTORIGHT . '" title="' . _XK_LEFTTORIGHT . '" src="' . $skinUrl . '/ltr.gif" onmousedown="XK_textDirection(\'ltr\',\'' . $this->getName() . '\')"/>'; break; case "newline": $form .= '<br />'; break; case 'newparagraph': if ($isie) { $form .= '<input class="' . $this->getSkin() . 'checkbox" type="checkbox" alt="' . _XK_NEWPARAGRAPH . '" title="' . _XK_NEWPARAGRAPH . '" id="ptagenabled' . $this->getName() . '" onclick="XK_destroyPTag(\'' . $this->getName() . '\')">'; } break; case "outdent": $form .= '<img alt="' . _XK_OUTDENT . '" title="' . _XK_OUTDENT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'outdent\',\'\',\'' . $this->getName() . '\')"/>'; break; case "paste": $form .= '<img alt="' . _XK_PASTE . '" title="' . _XK_PASTE . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'paste\',null,\'' . $this->getName() . '\')"/>'; break; case "pastespecial": $form .= '<img alt="' . _XK_PASTESPECIAL . '" title="' . _XK_PASTESPECIAL . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="document.getElementById(\'iframe' . $this->getName() . '\').contentWindow.focus();openWithSelfMain(\'' . $url . '/dialogs.php?id=' . $this->getName() . '&skin=' . $this->getSkin() . '&dialog=pastespecial&url=' . $this->getUrl() . '\',\'pastespecial\',350,280);"/>'; break; case 'print': $form .= '<img alt="' . _XK_PRINT . '" title="' . _XK_PRINT . '" src="' . $skinUrl . '/print.gif" onmousedown="XK_print(\'' . $this->getName() . '\')"/>'; break; case "quote": $form .= '<img alt="' . _XK_QUOTE . '" title="' . _XK_QUOTE . '" src="' . $skinUrl . '/quote.gif" onmousedown="XK_doTextFormat(\'Quote\',\'\',\'' . $this->getName() . '\')"/>'; break; case "redo": $form .= '<img alt="' . _XK_REDO . '" title="' . _XK_REDO . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'redo\',\'\',\'' . $this->getName() . '\')"/>'; break; case "rtl": $form .= '<img alt="' . _XK_RIGHTTOLEFT . '" title="' . _XK_RIGHTTOLEFT . '" src="' . $skinUrl . '/rtl.gif" onmousedown="XK_textDirection(\'rtl\',\'' . $this->getName() . '\')"/>'; break; case "separator": $form .= '<img alt="|" src="' . $skinUrl . '/separator.gif"/>'; break; case 'spellcheck': $form .= '<img alt="' . _XK_SPELLCHECK . '" title="' . _XK_SPELLCHECK . '" src="' . $skinUrl . '/spellcheck.gif" onmousedown="XK_checkspell()"/>'; break; case "strikethrough": $form .= '<img alt="' . _XK_STRIKETHROUGH . '" title="' . _XK_STRIKETHROUGH . '" src="' . $skinUrl . '/strikethrough.gif" onmousedown="XK_doTextFormat(\'strikethrough\',\'\',\'' . $this->getName() . '\')"/>'; break; case "subscript": $form .= '<img alt="' . _XK_SUBSCRIPT . '" title="' . _XK_SUBSCRIPT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'subscript\',\'\',\'' . $this->getName() . '\')"/>'; break; case "superscript": $form .= '<img alt="' . _XK_SUPERSCRIPT . '" title="' . _XK_SUPERSCRIPT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'superscript\',\'\',\'' . $this->getName() . '\')"/>'; break; case "removeformat": $form .= '<img alt="' . _XK_REMOVEFORMAT . '" title="' . _XK_REMOVEFORMAT . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'removeformat\',\'\',\'' . $this->getName() . '\')"/>'; $form .= '<img alt="' . _XK_REMOVE_DESC . '" title="' . _XK_REMOVE_DESC . '" id="rformatbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_showHideDiv(\'' . $this->getName() . '\',\'rformatbutton\',\'RemoveFormat\')"/>'; $extraDivs .= $this->_renderCleanFormats(); break; case "themecss": $themeCss = true; break; case "tableprops": $form .= '<img alt="' . _XK_TABLEPROPS . '" title="' . _XK_TABLEPROPS . '" src="' . $skinUrl . '/tableprops.gif" onmousedown="XK_TTools(\'' . $this->getName() . '\',\'' . $url . '/dialogs.php?id=' . $this->getName() . '&dialog=tableProps&skin=' . $this->getSkin() . '&url=' . $this->getUrl() . '\',\'table\',400,260)"/>'; $form .= '<img alt="' . _XK_TABLETOOLS . '" title="' . _XK_TABLETOOLS . '" id="tpropbutton' . $this->getName() . '" src="' . $skinUrl . '/popup.gif" onclick="XK_useTableOps(\'TableOps\',\'' . $this->getName() . '\')"/>'; $extraDivs .= $this->_renderTableProps(); break; case "toggleborders": $form .= '<img alt="' . _XK_TABLEBORDERS_TOGGLE . '" title="' . _XK_TABLEBORDERS_TOGGLE . '" src="' . $skinUrl . '/toggletableborders.gif" onmousedown="XK_toggleBorders(\'' . $this->getName() . '\',\'document.body\')"/>'; break; case "togglemode": $toggleMode = true; break; case "underline": $form .= '<img alt="' . _XK_UNDERLINE . '" title="' . _XK_UNDERLINE . '" src="' . $skinUrl . '/underline.gif" onmousedown="XK_doTextFormat(\'underline\',\'\',\'' . $this->getName() . '\')"/>'; break; case "undo": $form .= '<img alt="' . _XK_UNDO . '" title="' . _XK_UNDO . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'undo\',\'\',\'' . $this->getName() . '\')"/>'; break; case "unlink": $form .= '<img alt="' . _XK_UNLINK . '" title="' . _XK_UNLINK . '" src="' . $skinUrl . '/' . $tool . '.gif" onmousedown="XK_doTextFormat(\'unlink\',\'\',\'' . $this->getName() . '\')"/>'; break; default: break; } } $form .= '</div></div> <iframe class="' . $this->getSkin() . 'wIframe" id="iframe' . $this->getName() . '"style="height:' . $this->getHeight() . ';" frameBorder="0"></iframe> <textarea wrap=soft id="' . $this->getName() . '" name="' . $this->getName() . '" rows="1" cols="1" style="display:none; width:' . $this->getWidth() . '; height:' . $this->getHeight() . '">' . $this->getValue() . '</textarea> <div class="' . $this->getSkin() . 'statusBar"> <div class="' . $this->getSkin() . 'smileysBar">' . $this->_renderWysiwygSmileys() . '</div>'; if ($toggleMode) { $form .= '<div class="' . $this->getSkin() . 'htmlBar"><input type="checkbox" alt="' . _XK_TOGLE_MODE . '" title="' . _XK_TOGLE_MODE . '" onclick="XK_doToggleView(\'' . $this->getName() . '\')" />HTML</div>'; } if ($themeCss) { $form .= '<div class="' . $this->getSkin() . 'htmlBar"><input type="checkbox" alt="' . _XK_ENABLECSS_MODE . '" title="' . _XK_ENABLECSS_MODE . '" id="cssEnabled' . $this->getName() . '" onclick="XK_appendXoopsCss(\'' . $this->getName() . '\',\'' . $this->getThemeCSS() . '\')" />CSS </div>'; } $form .= '</div>'; // Render additional DIV'S if ($colorPalette) { include_once XOOPS_ROOT_PATH . '' . $this->getUrl() . '/class/colorpalette.class.php'; $palette = new WysiwygColorPalette('XK_applyColor', $this->getName(), $url, $this->getSkin()); $extraDivs .= $palette->_renderColorPalette(); } $extraDivs .= $this->_renderContextMenu(); $form .= $extraDivs; $form .= '<input type="hidden" value="off" id="borderstoggle' . $this->getName() . '"/>'; $form .= '<img alt="" width="0" height="0" src="' . $url . '/skins/common/blank.gif" onload="XK_init(\'' . $this->getName() . '\',\'' . $isie . '\',\'' . $url . '\',\'' . $this->getDirection() . '\')"/>'; $form .= '</div>'; return $form; }