public function check_user_activity() { //for guest restrict mode - hard mode //file_put_contents("ow_plugins/startpage/xxxxxxx.LOGS", "\n\n------check_user_activity------:\n".print_r($_POST,1)."\n---------------\n".print_r($_GET,1),FILE_APPEND); //echo "afadf";exit; if (OW::getConfig()->getValue('startpage', 'disable_force_imagechache') == "1") { $firce_disable_image_cache = true; } else { $firce_disable_image_cache = false; } $id_user = OW::getUser()->getId(); //citent login user (uwner) $is_user = OW::getUser()->getId(); //citent login user (uwner) $is_admin = OW::getUser()->isAdmin(); //iss admin $curent_url = OW_URL_HOME; //echo OW::getConfig()->getValue('startpage', 'disable_startpage'); if (OW::getConfig()->getValue('startpage', 'disable_startpage') != "0") { return; } //echo "sss";exit; // if (OW::getConfig()->getValue('startpage', 'disable_startpage')=="2") return; //return; /* //======================= echo "START<br>"; $i=rand(88888,99999999); $_POST['acctype']="asdasd".$i; $_POST['uname']="asdasd".$i; $_POST['email']="asdasdasdasd".$i."@asdas.com"; $_POST['pass']="******"; $_POST['pass2']="afsdfwdfsdfsd"; $_POST['ss']=substr(session_id(),3,5); echo $this->register(); echo "<br>END"; exit; //====================== */ //============v1 //---s st if (strpos($_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"], "ow_cron") === true) { return; } if (OW::getRequest()->isPost()) { return; } if (OW::getPluginManager()->isPluginActive('mobille')) { if (OW::getConfig()->getValue('mobille', 'disable_detect_mobile') != "1") { if (MOBILLE_BOL_Service::getInstance()->get_mobile_status()) { return; } } } //print_r($_SESSION); //print_r($_POST); //print_r($_GET); //exit; $pageURL = 'http'; if (isset($_SERVER["HTTPS"]) and $_SERVER["HTTPS"] == "on") { $pageURL .= "s"; } $pageURL .= "://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; $tmp = str_replace(OW_URL_HOME, "", $pageURL); if (substr($tmp, 0, 1) == "/") { $tmp = substr($tmp, 1); } /* if ($tmp=="sign-in?"){ return; } if ($id_user){ return; } */ //http://facejuggle.com/str/sign-in //sign-in //http://test.a6.pl/sign-in //echo $_SERVER["REQUEST_URI"]; //echo $tmp;exit; $v1 = strtolower(substr($tmp, 0, 8)); $v1 = str_replace("/", "", $v1); $v1 = str_replace("\\", "", $v1); $testx_tmp = explode("?", $v1); if (isset($testx_tmp[0])) { $v1 = $testx_tmp[0]; } $v1 = str_replace("?", "", $v1); $v2 = strtolower(substr($tmp, 0, 7)); $v2 = str_replace("/", "", $v2); $v2 = str_replace("\\", "", $v2); $testx_tmp = explode("?", $v2); if (isset($testx_tmp[0])) { $v2 = $testx_tmp[0]; } $v2 = str_replace("?", "", $v2); $testx = $tmp; $testx_tmp = explode("?", $testx); if (isset($testx_tmp[0])) { $testx = $testx_tmp[0]; } //echo $v1."--".$v2; //print_r($_POST);exit; //print_r($_GET);exit; ////sign-in--sign-inArray ( [form_name] => std-sign-in [identity] => aron [password] => Aronx1403 [submit] => Sign In ) if (isset($_POST['form_name']) and $_POST['form_name'] == "sign-in") { return; } else { if ($v1 == "sign-in" or $v2 == "sign-in" and !isset($_POST['form_name'])) { return; } else { if ($testx == "mobille/" or $testx == "/mobille" or $testx == "mobile/" or $testx == "/mobile" or strpos($testx, "mobille") !== false or strpos($testx, "mobile") !== false) { return; } else { if ($testx == "adsense/" or $testx == "/adsense" or strpos($testx, "adsense/show") !== false) { return; } else { if ($testx == "terms-of-use" or $testx == "terms-of-use/" or $testx == "/terms-of-use" or strpos($testx, "terms-of-use") !== false) { return; } else { if ($testx == "privacy-policy" or $testx == "privacy-policy/" or $testx == "/privacy-policy" or strpos($testx, "privacy-policy") !== false) { return; } else { if ($testx == "rss" or $testx == "rss/" or $testx == "/rss" or strpos($testx, "rsss.php") !== false or strpos($testx, "rss/") !== false) { return; } else { if ($testx == "facebook-connect" or $testx == "/facebook-connect" or $testx == "fbconnect_channel.html" or $testx == "/fbconnect_channel.html" or strpos($testx, "facebook-connect") !== false or strpos($testx, "fbconnect_channel.html") !== false) { return; } else { if ($testx == "base/base-document/maintenance" or $testx == "/base/base-document/maintenance" or $testx == "base/base-document/maintenance" or strpos($testx, "base/base-document/maintenance") !== false) { return; } else { if ($testx == "base/captcha" or $testx == "/base/captcha" or $testx == "base/captcha/" or strpos($testx, "base/captcha") !== false) { return; } else { if (OW::getConfig()->getValue('base', 'maintenance') == 1) { return; } else { if ($testx == "contact/" or $testx == "/contact" or $testx == "contact/user/" or $testx == "/contact/user" or strpos($testx, "contact/user/") !== false) { return; } else { if ($testx == "reset-password" or $testx == "reset-password/" or $testx == "/reset-password" or strpos($testx, "reset-password") !== false) { return; } else { if ($testx == "forgot-password" or $testx == "forgot-password/" or $testx == "/forgot-password" or strpos($testx, "forgot-password") !== false) { return; } } } } } } } } } } } } } } //---s en // AND ($id_user>0 OR !$testx OR $testx=="index" OR strpos($testx,"index/")!==false)) { //echo $testx;exit; //return; // if (!OW::getConfig()->getValue('startpage', 'force_for_guest') AND ($testx!="" OR $testx=="index" OR $testx=="index/")) { if (!OW::getConfig()->getValue('startpage', 'force_for_guest') and ($testx != "" and $testx != "startx") and !$id_user) { // if (!OW::getConfig()->getValue('startpage', 'force_for_guest') AND ($testx!="") AND !$id_user) { return; } //============v2 //print_r($_SESSION);exit; //print_r(OW::getSession());exit; if (isset($_SERVER['REQUEST_URI'])) { $test1 = $_SERVER['REQUEST_URI']; } else { $test1 = ""; } //if (strpos($test1,"language_id=")===true) return;//language //echo "fsdfSDF";exit; //echo $test1;exit; $test1_tmp = explode("?", $test1); if (isset($test1_tmp[0])) { $test1 = $test1_tmp[0]; } //echo "--".strpos($_SERVER['REQUEST_URI'],"");exit; if ($test1 == "mobille/" or $test1 == "/mobille" or $test1 == "mobile/" or $test1 == "/mobile" or strpos($_SERVER['REQUEST_URI'], "mobille") !== false) { return; } else { if ($test1 == "rss" or $test1 == "rss/" or $test1 == "/rss" or strpos($test1, "rsss.php") !== false or strpos($test1, "rss/") !== false) { return; } else { if ($test1 == "paypal_ipn" or $test1 == "/paypal_ipn" or strpos($_SERVER['REQUEST_URI'], "paypal_ipn") !== false) { return; } else { if ($test1 == "shopipn" or $test1 == "/shopipn" or $test1 == "shopipn/" or $test1 == "shopipn/back" or $test1 == "/shopipn/back" or $test1 == "/shopipn/back/" or $test1 == "shopipn/back/" or strpos($_SERVER['REQUEST_URI'], "shopipn") !== false) { return; } else { if ($test1 == "cartipn" or $test1 == "/cartipn" or strpos($_SERVER['REQUEST_URI'], "cartipn") !== false) { return; } else { if ($test1 == "paypal_cancel" or $test1 == "/paypal_cancel" or strpos($_SERVER['REQUEST_URI'], "paypal_cancel") !== false) { return; } else { if ($test1 == "paypal_complete" or $test1 == "/paypal_complete" or strpos($_SERVER['REQUEST_URI'], "paypal_complete") !== false) { return; } else { if ($test1 == "facebook-connect" or $test1 == "/facebook-connect" or $test1 == "/facebook-connect/login" or $test1 == "facebook-connect/login" or strpos($_SERVER['REQUEST_URI'], "facebook-connect/login") !== false) { return; } else { if ($test1 == "base/base-document/maintenance" or $test1 == "/base/base-document/maintenance" or $test1 == "base/base-document/maintenance" or strpos($_SERVER['REQUEST_URI'], "base/base-document/maintenance") !== false) { return; } else { if ($test1 == "base/captcha" or $test1 == "/base/captcha" or $test1 == "base/captcha/" or strpos($_SERVER['REQUEST_URI'], "base/captcha") !== false) { return; } else { if (OW::getConfig()->getValue('base', 'maintenance') == 1) { return; } else { if ($test1 == "contact/" or $test1 == "/contact" or $test1 == "contact/user/" or $test1 == "/contact/user" or strpos($test1, "contact/user/") !== false) { return; } else { if (strpos($_SERVER['REQUEST_URI'], "startpage/checkf") !== false) { //----aa start $retconf = array(); $retconf['ss'] = substr(session_id(), 3, 5); // if (isset($_POST['ss']) AND $_POST['ss']==substr(session_id(),3,5)){ $fileElementName = 'fileToUpload'; //print_r($_FILES); //echo isset($_FILES[$fileElementName])."--".$_FILES[$fileElementName]['error']; //echo "---"; /* // if(isset($_FILES[$fileElementName]) AND !empty($_FILES[$fileElementName]['error']) AND $_FILES[$fileElementName]['error']=="0"){ if(isset($_FILES[$fileElementName]) AND $_FILES[$fileElementName]['error']=="0"){ $resultcreate=array(); $resultcreate=$this->upload_av($fileElementName); if ($resultcreate['comm']=="OK"){ $retconf['status']="SUCCES"; $retconf['comm']="OK"; }else{ $retconf=$resultcreate; } }else{ $retconf['status']="ERROR"; $retconf['comm']="ERROR... 2001"; } */ //print_r($_FILES); //echo $_FILES[$fileElementName]['tmp_name']; $fileElementName = 'fileToUpload'; if (isset($_FILES[$fileElementName]) and $_FILES[$fileElementName]['error'] == "0" and !empty($_FILES[$fileElementName]['tmp_name']) and $_FILES[$fileElementName]['tmp_name'] != 'none') { $resultcreate = array(); // $resultcreate=STARTPAGE_BOL_Service::getInstance()->upload_av($fileElementName); // image_copy_resize($file_source="",$file_dest="",$crop=false,$width=800,$height=600) $uploaddir = OW::getPluginManager()->getPlugin('startpage')->getUserFilesDir(); $img_temp = session_id() . ".tmpav.jpg"; //echo $uploaddir.$img_temp;exit; if ($this->image_copy_resize($_FILES[$fileElementName]['tmp_name'], $uploaddir . $img_temp, false, 150, 150)) { //echo $uploaddir.$img_temp;exit; // if ($resultcreate['comm']=="OK"){ $retconf['status'] = "SUCCES"; $retconf['comm'] = "OK"; } else { // $retconf=$resultcreate; $retconf['status'] = "ERROR"; $retconf['comm'] = "ERROR...1002"; } } else { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_select_file') . " 1001"); } // $retconf=$this->upload_av($_FILES); // $retconf['status']="SUCCES"; // $retconf['comm']="OK"; echo json_encode($retconf); exit; } else { if ($test1 == "startpage" or $test1 == "/startpage" or strpos($_SERVER['REQUEST_URI'], "startpage/check") !== false) { //----aa start $retconf = array(); $retconf['ss'] = substr(session_id(), 3, 5); if (isset($_POST['ss']) and $_POST['ss'] == substr(session_id(), 3, 5)) { $resultcreate = 0; $_SESSION['userId'] = $resultcreate; OW::getSession()->set('userId', $resultcreate); $resultcreate = $this->register(); // $resultcreate=STARTPAGE_BOL_Service::getInstance()->register(); if ($resultcreate > 0) { $retconf['status'] = "SUCCES"; $retconf['comm'] = "OK"; $_SESSION['userId'] = $resultcreate; OW::getSession()->set('userId', $resultcreate); } else { if ($resultcreate == -100) { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_email_already_exist') . " [204]"); } else { if ($resultcreate == -200) { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_login_already_exist') . " [203]"); } else { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_create_account_tryagain') . " [202]"); } } } } else { //errror $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_create_account_tryagain') . " [201-ses]"); } echo json_encode($retconf); exit; //----aa end return; } else { if ($test1 == "sign-in" or $test1 == "/sign-in") { return; } else { if ($test1 == "forgot-password" or $test1 == "/forgot-password") { return; } else { if ($test1 == "sign-in" or $test1 == "/sign-in") { return; } else { if ($test1 == "forgot-password" or $test1 == "/forgot-password") { return; } } } } } } } } } } } } } } } } } } //if (OW::getConfig()->getValue('startpage', 'disable_startpage')=="1" AND !$id_user){ //OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_BLANK)); //exit; //echo OW::getRequest()->isPost()."|"; //return; //session_destroy(); //print_r($_POST);print_r($_GET);print_r($_SESSION); //echo $id_user;exit; if ($id_user > 0) { return; } else { if (OW::getRequest()->isPost()) { if (isset($_SERVER['REQUEST_URI']) and strpos($_SERVER['REQUEST_URI'], "base/join/join-form-submit") !== false) { OW::getApplication()->redirect($curent_url . "join"); exit; } else { if (OW::getConfig()->getValue('startpage', 'force_for_guest') == "1" and !$id_user) { } else { return; } } } else { if (!OW::getRequest()->isPost()) { //echo "dfsdf";exit; //print_r($_GET); //print_r($_POST); //print_r($_SESSION);exit; //exit; $test = str_replace($curent_url, "", $_SERVER['REQUEST_URI']); if (strpos($test, "?language_id") !== false) { return; // OW::getApplication()->redirect($curent_url."join"); OW::getApplication()->redirect($curent_url . "start"); exit; } $test2_tmp = explode("?", $test); if (isset($test2_tmp[0])) { $test = $test2_tmp[0]; } $test = str_replace("///", "/", $test); $test = str_replace("//", "/", $test); //echo "-----".$test;exit; if (OW::getConfig()->getValue('startpage', 'force_for_guest') == "1" and !$id_user) { } else { if ($test != "/join" and $test != "/" and $test != "" and $test != "startx" and $test != "/startx" and $test != "startx/") { return; } } // }else if ($test=="/join" AND (strpos($test,"?language_id")===true) ) return; //echo $test;exit; // if (strpos($_GET,"/join" } } } //echo "sfsdF";exit; /* [joinStep] => 1 [join.real_question_list] => Array ( [41123565984518694488af6c] => username [61536939255518694488b0be] => email ) */ /* if (isset($_SESSION['joinStep']) AND isset($_SESSION['join.real_question_list']) AND $_SESSION['joinStep']==1){ $jreal=$_SESSION['join.real_question_list']; foreach($jreal as $language => $value ){ echo "<hr>".$language."--".$value."--".OW::getLanguage()->text('base', 'questions_question_'.$value.'_label'); //OW::getLanguage()->text('base', 'questions_question_'.$language.'_label'); } } */ /* [joinData] => Array ( [accountType] => 290365aadde35a97f11207ca7e4279cc [username] => aaaa [email] => aaaa@aaaa.pl [password] => aaaaaa ) */ //exit; /* echo OW::getRequest()->isPost(); echo "<hr>"; echo $_SERVER['REQUEST_URI']; echo strpos($_SERVER['REQUEST_URI'],"base/join/join-form-submit"); exit; */ /* if (OW::getRequest()->isPost()){ if (isset($_SERVER['REQUEST_URI']) AND strpos($_SERVER['REQUEST_URI'],"base/join/join-form-submit")!==false){ OW::getApplication()->redirect($curent_url."join"); exit; }else{ return; } } else if (OW::getRequest()->isPost()){ return; } */ /* $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } */ //print_r($_SERVER);exit; //$pluginStaticDir $pluginStaticURL =OW::getPluginManager()->getPlugin('shoppro')->getUserFilesUrl(); // $pluginStaticDir =OW::getPluginManager()->getPlugin('startpage')->getUserFilesDir(); // $path_file=$pluginStaticDir."files/"; // $name_file="file_".$value['entityId']."_".$hash.".pack"; // $table .="<table>"; // if (is_file($path_file.$name_file)){ $default_theme = OW::getConfig()->getValue('startpage', 'curent_theme'); if (!$default_theme) { $default_theme = "default"; } $pluginStaticU = OW::getPluginManager()->getPlugin('startpage')->getStaticUrl(); $pluginStaticD = OW::getPluginManager()->getPlugin('startpage')->getStaticDir(); $plname = "startpage"; $source = OW_DIR_PLUGIN . $plname . DS . 'static' . DS; $pluginStaticDir = OW_DIR_STATIC . 'plugins' . DS . $plname . DS; $contentlang = ""; foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $lang) { $pattern = '/^(?P<primarytag>[a-zA-Z]{2,8})' . '(?:-(?P<subtag>[a-zA-Z]{2,8}))?(?:(?:;q=)' . '(?P<quantifier>\\d\\.\\d))?$/'; $splits = array(); // printf("Lang:,,%s''\n", $lang); if (preg_match($pattern, $lang, $splits)) { // print_r($splits); if (isset($splits[0])) { $contentlang = $splits[0]; break; } //echo $splits[0];exit; // } else { // echo "\nno match\n"; } } if (!$contentlang) { // $contentlang="pl-PL"; $contentlang = "en-US"; } $charset = "UTF-8"; //$contentlang="pl-PL"; //$contentlang="en-US"; $title = OW::getConfig()->getValue('startpage', 'theme_seo_title'); $keywords = OW::getConfig()->getValue('startpage', 'theme_seo_keywords'); $descriptio = OW::getConfig()->getValue('startpage', 'theme_seo_desc'); //echo $descriptio;exit; //print_r($params);exit; // if ( empty($userId) ){return;} //echo "0000".OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate('blank'));exit; //echo "0000".OW::getDocument()->getMasterPage();exit; $thenam = OW::getThemeManager()->getSelectedTheme()->getDto()->getName(); //echo "---".str_replace("/","\/",$curent_url);exit; // $th=file_get_contents($curent_url."ow_static/plugins/startpage/join.html"); //----head $th = file_get_contents($pluginStaticD . "join_header.html"); $th = str_replace("[tthemename]", $thenam, $th); $th = str_replace("[tturl]", $curent_url, $th); $th = str_replace("[tturlsl]", str_replace("/", "\\/", $curent_url), $th); if (OW::getConfig()->getValue('startpage', 'after_login_backto') == "index") { $th = str_replace("[after_login_backto]", "index", $th); } else { $th = str_replace("[after_login_backto]", "dashboard", $th); } $th = str_replace("[tctheme]", $default_theme, $th); //curent theme //xx // $theme=OW::getConfig()->getValue('startpage', 'curent_theme'); //if (!$theme) $theme="default"; //$pluginStaticU=OW::getPluginManager()->getPlugin('startpage')->getStaticUrl(); // $img_bckground=$pluginStaticURL2."themes".DS.$default_theme.DS."css.css"; // OW::getDocument()->addStyleSheet($pluginStaticURL2."themes".DS.$default_theme.DS."css.css"); $th = str_replace("[tt_ss]", substr(session_id(), 3, 5), $th); // $th=str_replace("[url_jon_finished]",$curent_url."sign-in",$th); // $th=str_replace("[url_jon_finished]",$curent_url,$th); $th = str_replace("[url_jon_finished]", $curent_url . "profile/edit", $th); $th = str_replace("[url_jon_errror]", $curent_url . "join", $th); $th = str_replace("[ttalertlform]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'enterloginandpasswword')), $th); // $uploaddir = OW::getPluginManager()->getPlugin('startpage')->getUserFilesDir(); $uploadurl = OW::getPluginManager()->getPlugin('startpage')->getUserFilesUrl(); $img_temp = session_id() . ".tmpav.jpg?a="; $th = str_replace("[tt_urlavthimb]", $uploadurl . $img_temp, $th); $img_bckground = $pluginStaticDir . "themes" . DS . $default_theme . DS . OW::getConfig()->getValue('startpage', 'background_image'); $big_bg_image = ""; if (strlen(OW::getConfig()->getValue('startpage', 'background_image')) > 4 and is_file($img_bckground)) { $img_bckground = $pluginStaticU . "themes" . DS . $default_theme . DS . OW::getConfig()->getValue('startpage', 'background_image'); $big_bg_image = $img_bckground; if (OW::getConfig()->getValue('startpage', 'background_image_pos')) { $bpos = "background-position:" . OW::getConfig()->getValue('startpage', 'background_image_pos') . ";"; } else { $bpos = ""; } if (OW::getConfig()->getValue('startpage', 'background_color')) { $bcol = "background-color:" . OW::getConfig()->getValue('startpage', 'background_color') . ";"; } else { $bcol = ""; } // $xbckground=" style=\"background-image:url(".$img_bckground.");".$bpos."background-repeat: no-repeat;".$bcol."overflow:hidden; padding:0;margin:0;height:100%;width:100%;\" "; $xbckground = " style=\"" . $bcol . "min-width: 100%;background-image:none;overflow:hidden; padding:0;margin:0;height:100%;width:100%;\" "; if ($firce_disable_image_cache) { $ran = "?fakecache=" . rand(88888, 999999); } else { $ran = ""; } $xbckgroundim = "<img id=\"bgimg\" src=\"" . $img_bckground . $ran . "\" />"; } else { if (strlen(OW::getConfig()->getValue('startpage', 'background_color')) > 3) { $bcol = "background-color:" . OW::getConfig()->getValue('startpage', 'background_color') . ";"; $xbckground = " style=\"min-width: 100%;background-image:none;" . $bcol . "\" "; $xbckgroundim = ""; } else { $bckground = " style=\"min-width: 100%;background-image:none;background-color:transparent;\""; $xbckgroundim = ""; } } $th = str_replace("[tbckground]", $xbckground, $th); $th = str_replace("[tbckgroundim]", $xbckgroundim, $th); //-------------------------------private css.css starrt //[tbig_background_image] // $th=str_replace("[css_from_theme]","<link rel=\"stylesheet\" type=\"text/css\" href=\"".$pluginStaticU."themes".DS.$default_theme.DS."css.css\" media=\"all\" />",$th); // $th=str_replace("[css_from_theme]","<link rel=\"stylesheet\" type=\"text/css\" href=\"".$pluginStaticU."themes".DS.$default_theme.DS."css.css\" media=\"all\" />",$th); $file_css_private = file_get_contents($pluginStaticD . "themes" . DS . $default_theme . DS . "css.css"); if (!$big_bg_image) { $big_bg_image = $pluginStaticU . "themes" . DS . $default_theme . DS . "img/bg.jpg"; } $file_css_private = str_replace("[tbig_background_image]", $big_bg_image, $file_css_private); //big image backhround //echo $file_css_private;exit; $th = str_replace("[theme_css_private]", $file_css_private, $th); //curent theme //-------------------------------private css.css end if (OW::getPluginManager()->isPluginActive('mobille') and MOBILLE_BOL_Service::getInstance()->is_file_application()) { $pluginStaticUM = OW::getPluginManager()->getPlugin('mobille')->getStaticUrl(); $content_x = "<" . "script type=\"text/javascript\" src=\"" . $pluginStaticUM . "ext" . DS . "qrcode.js\"></script>"; $content_x .= "<script>"; $content_x .= "\$(document).ready(function() {"; $content_x .= "\$('#mobile_qrcode_download').qrcode({width: 96,height: 96,text: '" . $curent_url . "mobile/downloadapplication'});"; $content_x .= "});"; $content_x .= "</script>"; $header_main = str_replace("[custom_script]", $custom_script, $header_main); $th = str_replace("[additional_je_files]", $content_x, $th); //curent theme } else { $th = str_replace("[additional_je_files]", "", $th); //curent theme } //----add header start $addheader = ""; $default_theme = OW::getConfig()->getValue('startpage', 'curent_theme'); if (!$default_theme) { $default_theme = "default"; } $pluginStaticU = OW::getPluginManager()->getPlugin('startpage')->getStaticUrl(); $pluginStaticD = OW::getPluginManager()->getPlugin('startpage')->getStaticDir(); // OW::getDocument()->addScript(OW_URL_HOME.'ow_static/themes/'.$default_theme.'/js.js'); // OW::getDocument()->addStyleSheet(OW_URL_HOME.'ow_static/themes/'.$default_theme.'/css.css'); $addheader .= "<script type=\"text/javascript\" src=\"" . $pluginStaticU . "themes/" . $default_theme . "/js.js\"></script>"; // $addheader .="<link rel=\"stylesheet\" type=\"text/css\" href=\"".$pluginStaticU."themes/".$default_theme."/css.css\" media=\"all\" />";//add abouwe with replace $addheader .= "<script>"; $addheader .= "\$(document).ready(function() {"; $plname = "startpage"; $ct = OW::getConfig()->getValue('startpage', 'curent_theme'); if (!$ct) { $ct = "default"; } if (OW::getConfig()->getValue('startpage', 'content_background_image')) { $addheader .= "\$('#tt_form').css('background-image','url(" . $pluginStaticU . "themes" . DS . $ct . DS . OW::getConfig()->getValue('startpage', 'content_background_image') . ")');"; $addheader .= "\$('#tt_form').css('background-repeat','repeat');"; // $addheader .="$('#tt_form').css('background-size','100%');"; } if (OW::getConfig()->getValue('startpage', 'content_background')) { $addheader .= "\$('#tt_form').css('background-color','" . OW::getConfig()->getValue('startpage', 'content_background') . "');"; } if (OW::getConfig()->getValue('startpage', 'content_text_color')) { $addheader .= "\$('#tt_form').css('color','" . OW::getConfig()->getValue('startpage', 'content_text_color') . "');"; } // $addheader .="$('#tt_form').css('background','url(\'http://mycollegesocial.com/ow_static/plugins/startpage/themes/2column_wlogin/bg1.jpg\') repeat scroll 0% 0% transparent;');"; if (OW::getConfig()->getValue('startpage', 'topbar_background_image')) { $addheader .= "\$('#tt_top_bar').css('background-image','url(" . $pluginStaticU . "themes" . DS . $ct . DS . OW::getConfig()->getValue('startpage', 'topbar_background_image') . ")');"; $addheader .= "\$('#tt_form').css('background-repeat','repeat');"; } if (OW::getConfig()->getValue('startpage', 'topbar_background')) { $addheader .= "\$('#tt_top_bar').css('background-color','" . OW::getConfig()->getValue('startpage', 'topbar_background') . "');"; } if (OW::getConfig()->getValue('startpage', 'topbar_text_color')) { $addheader .= "\$('#tt_top_bar').css('color','" . OW::getConfig()->getValue('startpage', 'topbar_text_color') . "');"; } // $addheader .="$('#tt_top_bar').css('background-image','url(http://mycollegesocial.com/ow_static/plugins/startpage/themes/2column_wlogin/bg1.jpg)');"; $addheader .= "});"; $addheader .= "</script>"; $th = str_replace("[tbaddheader]", $addheader, $th); //----add header end //echo $addheader; //exit; if (OW::getConfig()->getValue('startpage', 'allow_show_captha') == "1") { $th = str_replace("[tusingcaptha]", "true", $th); } else { $th = str_replace("[tusingcaptha]", "false", $th); } if (OW::getConfig()->getValue('startpage', 'show_agree_newsletter') == "1") { $th = str_replace("[tusingtherm]", "true", $th); } else { $th = str_replace("[tusingtherm]", "false", $th); } if (OW::getConfig()->getValue('startpage', 'show_agree_therm_of_use') == "1") { $th = str_replace("[tusingtherm_therm]", "true", $th); } else { $th = str_replace("[tusingtherm_therm]", "false", $th); } $th = str_replace("[tusingcapthaerror]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'tusingcapthaerror')), $th); $bodyclass = "main_body_" . $thenam; $th = str_replace("[bodyclass]", $bodyclass, $th); if (OW::getConfig()->getValue('startpage', 'show_realname') == "1") { $th = str_replace("[show_realname]", "true", $th); } else { $th = str_replace("[show_realname]", "false", $th); } $th = str_replace("[ttcharset]", $charset, $th); $th = str_replace("[tttitle]", $title, $th); $th = str_replace("[ttdescription]", $descriptio, $th); $th = str_replace("[ttkeywords]", $keywords, $th); $th = str_replace("[ttcontentlang]", $contentlang, $th); $th = str_replace("[error_muname]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_muname')), $th); $th = str_replace("[error_uname]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_uname')), $th); $th = str_replace("[error_email]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_email')), $th); $th = str_replace("[error_passwordl]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_passwordl')), $th); $th = str_replace("[error_passretype]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_passretype')), $th); $th = str_replace("[error_passmisma]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_passmisma')), $th); $th = str_replace("[error_agree_newsletter]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_agree_newsletter')), $th); $th = str_replace("[error_agree_therm_of_use]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_agree_therm_of_use')), $th); /* $xx=print_r($_POST,1); $xx=str_replace("\r\n"," ",$xx); $xx=str_replace("\n"," ",$xx); $xx=str_replace("\r"," ",$xx); $xx=str_replace("'","",$xx); */ $th = str_replace("[error_connection]", OW::getLanguage()->text('startpage', 'error_connection'), $th); // $th=str_replace("[error_connection]",OW::getLanguage()->text('startpage', 'error_connection').$xx,$th); $th = str_replace("[error_uploadavatar]", OW::getLanguage()->text('startpage', 'error_uploadavatar'), $th); echo $th; //----body------------------------------------------------------ $imgp = $pluginStaticDir . "themes" . DS . $default_theme . DS . "image.jpg"; $imgl = $pluginStaticDir . "themes" . DS . $default_theme . DS . "logo.jpg"; $imgp_u = $pluginStaticDir . "themes" . DS . $default_theme . DS . OW::getConfig()->getValue('startpage', 'theme_image_cover'); $imgl_u = $pluginStaticDir . "themes" . DS . $default_theme . DS . OW::getConfig()->getValue('startpage', 'theme_image_top'); //echo $pluginStaticU;exit; if (strlen(OW::getConfig()->getValue('startpage', 'theme_image_cover')) > 4 and is_file($imgp_u)) { $imgp = $pluginStaticU . "themes" . DS . $default_theme . DS . OW::getConfig()->getValue('startpage', 'theme_image_cover'); } else { $imgp = $pluginStaticU . "themes" . DS . $default_theme . DS . "image.jpg"; } if (strlen(OW::getConfig()->getValue('startpage', 'theme_image_top')) > 4 and is_file($imgl_u)) { $imgl = $pluginStaticU . "themes" . DS . $default_theme . DS . OW::getConfig()->getValue('startpage', 'theme_image_top'); } else { $imgl = $pluginStaticU . "themes" . DS . $default_theme . DS . "logo.jpg"; } //$imgbuttonlogin=$pluginStaticU."themes".DS.$default_theme.DS."login.jpg"; // $th=file_get_contents($pluginStaticD."join.html"); $th = file_get_contents($pluginStaticD . "themes" . DS . $default_theme . DS . "join.html"); if ($firce_disable_image_cache) { $ran = "?fakecache=" . rand(88888, 999999); } else { $ran = ""; } $th = str_replace("[ttimg]", $imgp . $ran, $th); //aaaaaaaaaaaaaaaaaaaaaaaa $th = str_replace("[tctheme]", $default_theme, $th); //curent theme $th = str_replace("[pathtocurentheme]", $pluginStaticU . "themes" . DS . $default_theme . DS, $th); //path to curent theme if (OW::getConfig()->getValue('startpage', 'theme_header_height')) { $lh = OW::getConfig()->getValue('startpage', 'theme_header_height'); } else { $lh = "64px"; } if (OW::getConfig()->getValue('startpage', 'logo_margin_left') > 0) { $logo_margin_left = "margin-left:" . OW::getConfig()->getValue('startpage', 'logo_margin_left') . "px;"; } else { $logo_margin_left = ""; } if ($firce_disable_image_cache) { $ran = "?fakecache=" . rand(88888, 999999); } else { $ran = ""; } $logo = "<img src=\"" . $imgl . $ran . "\"class=\"ow_left\" style=\"max-height:" . $lh . ";" . $logo_margin_left . "\"/>"; $login = ""; $login2 = ""; //$login="******"".$curent_url."sign-in\"><img src=\"".$imgbuttonlogin."\" class=\"ow_right\" style=\"margin-top:20px;margin-right:150px;border:0;\"/></a>"; //$login .="<div class=\"clearfix\" style=\"margin-top:20px;margin-right:150px;border:0;\"> //if ($default_theme=="default"){ $login .= "<a href=\"" . $curent_url . "sign-in?back-uri=index\">"; if ($default_theme == "default") { // $login .="<div class=\"clearfix\" style=\"margin-right:150px;border:0;max-height: 64px;bottom: 10%;position: absolute;z-index: 5;float: right;right: 0px;\">";//for DE $login .= "<div class=\"clearfix\" style=\"margin-right:150px;border:0;max-height: 64px;bottom: 10%;z-index: 5;float: right;right: 0px;\">"; } else { if ($default_theme == "twocolumn") { // $login .="<div class=\"clearfix\" style=\"margin-right:150px;border:0;max-height: 64px;bottom: 10%;position: absolute;z-index: 5;float: right;right: 0px;\">";//for DE $login .= "<div class=\"clearfix\" style=\"border:0;max-height: 64px;bottom: 10%;z-index: 5;float: right;right: 0px;\">"; } else { // $login .="<div class=\"clearfix\" style=\"border:0;max-height: 64px;bottom: 10%;xposition: absolute;z-index: 5;float: right;right: 0px;\">";//for DE $login .= "<div class=\"clearfix\" style=\"border:0;max-height: 64px;bottom: 10%;xposition: absolute;z-index: 5;float: right;right: 0px;\">"; } } $login .= "<div class=\"ow_right\" style=\"margin-right:10px;\">\n <span class=\"ow_button ow_positive\"><span>"; $login .= "<input type=\"button\" value=\"" . OW::getLanguage()->text('startpage', 'login') . "\" id=\"b_login\" class=\"ow_button ow_ic_submit\" name=\"joinSubmit\">"; $login .= "</span></span>\n </div>"; $login .= "</div>"; $login .= "</a>"; //$login=""; if (!OW::getConfig()->getValue('startpage', 'force_for_guest')) { $login = ""; $login2 .= "<a href=\"" . $curent_url . "sign-in?back-uri=index\">"; $login2 .= "<div class=\"ow_right\" style=\"margin-right:10px;\">\n <span class=\"ow_button ow_positive\"><span>"; $login2 .= "<input type=\"button\" value=\"" . OW::getLanguage()->text('startpage', 'login') . "\" id=\"b_login\" class=\"ow_button ow_ic_submit\" name=\"joinSubmit\">"; $login2 .= "</span></span>\n </div>"; $login2 .= "</a>"; } //$register ="<div class=\"clearfix ow_center\" style=\"\"> // <span class=\"ow_button\"><span class=\" ow_button ow_ic_submit\">"; $register = "<div class=\"clearfix ow_right\" >\n <div class=\"ow_center\" style=\"\">\n <span class=\"ow_button ow_positive\"><span>"; $register .= "<input type=\"submit\" value=\"" . OW::getLanguage()->text('startpage', 'register') . "\" id=\"register\" class=\"ow_button ow_ic_submit\" name=\"joinSubmit\">"; $register .= "</span></span>\n </div>\n</div>"; $indexp = ""; $menup = ""; if (!OW::getConfig()->getValue('startpage', 'force_for_guest') and !OW::getConfig()->getValue('startpage', 'force_hide_homebutton')) { $indexp .= "<a href=\"" . $curent_url . "index\">"; // $indexp .="<div class=\"ow_right\" style=\"margin-right:10px;\">"; $valx = ""; if ($default_theme == "default") { $valx = OW::getLanguage()->text('startpage', 'index'); } else { if ($default_theme == "twocolumn" or $default_theme == "2column_wlogin") { $valx = OW::getLanguage()->text('startpage', 'index_asguest'); // $indexp.="<span class=\"ow_button ow_positive\">"; } else { $valx = OW::getLanguage()->text('startpage', 'index'); } } $indexp .= "<span class=\"ow_button ow_positive\">"; $indexp .= "<span><input type=\"button\" value=\"" . $valx . "\" title=\"" . OW::getLanguage()->text('startpage', 'index') . "\" id=\"b_home\" class=\"ow_button ow_ic_house\" name=\"joinSubmit\"></span>"; $indexp .= "</span>"; if ($default_theme == "default") { // $indexp.="</span>"; } else { if ($default_theme == "twocolumn" or $default_theme == "2column_wlogin") { // $indexp.="</span>"; } } // $indexp .="</div>"; $indexp .= "</a>"; } $sql = "SELECT * FROM " . OW_DB_PREFIX . "base_menu_item WHERE type='bottom' AND (visibleFor='1' OR visibleFor='3') ORDER BY `order` "; $arr = OW::getDbo()->queryForList($sql); $num = 0; foreach ($arr as $value) { $rurl = ""; $target = ""; if ($value['documentKey'] and !$value['externalUrl'] and !$value['routePath']) { /* $sql2 = "SELECT * FROM " . OW_DB_PREFIX. "base_document WHERE `key`='".addslashes($value['documentKey'])."' LIMIT 1"; $arr2 = OW::getDbo()->queryForList($sql2); if (isset($arr2[0])){ $value2=$arr2[0]; */ $namx = OW::getLanguage()->text($value['prefix'], $value['key']); // $rurl=OW::getRouter()->urlForRoute($value2['uri']); $rurl = OW::getRouter()->urlForRoute($value['key']); if ($rurl) { if ($menup) { $menup .= " | "; } $menup .= "<a href=\"" . $rurl . "\" " . $target . ">" . $namx . "</a>"; } // } } else { if ($value['externalUrl']) { $rurl = $value['externalUrl']; } else { if ($value['routePath']) { $rurl = OW::getRouter()->urlForRoute($value['routePath']); } } if ($value['newWindow'] == 1) { $target = " target=\"_blank\""; } $namx = OW::getLanguage()->text($value['prefix'], $value['key']); if ($rurl) { if ($menup) { $menup .= " | "; } $menup .= "<a href=\"" . $rurl . "\" " . $target . ">" . $namx . "</a>"; } } //$this->redirect(OW::getRouter()->urlForRoute('contactus.admin')); } if ($menup) { $menup = "<div class=\"ow_footer_menu\" style=\"width:100%;margin:auto;\">" . $menup . "</div>"; } /* $indexp ="<div class=\"clearfix ow_center\" >"; // $indexp .="<div class=\"ow_right\" style=\"margin-right:10px;\"> $indexp .="<div class=\"ow_left\" style=\"margin-right:10px;\"> <span class=\"ow_button\"><span class=\" ow_button \">"; $indexp .="<a href=\"".$curent_url."index\">"; $indexp .="<input type=\"button\" value=\"".OW::getLanguage()->text('startpage', 'index')."\" id=\"input_79820058\" class=\"ow_button ow_ic_house\" name=\"joinSubmit\">"; $indexp .="</a>"; $indexp .="</span></span> </div> </div>"; */ if (OW::getPluginManager()->isPluginActive('fbconnect') and OW::getConfig()->getValue('fbconnect', 'app_id')) { $fbloginform = ""; //$fbloginform .="<div class=\"ow_left\"><a href=\"javascript:window.open('".$curent_url."facebook-connect/login?backUri=index','facebook','width = 500, height = 350');\" style=\"background:transparent;display:inline-block;width:82px;height:22px;position:absolute;z-index:999999;\"></a> $fbloginform .= "<div class=\"ow_left\"><a href=\"" . $curent_url . "facebook-connect/login?backUri=dashboard\" style=\"background:transparent;display:inline-block;width:82px;height:22px;position:absolute;z-index:78;\"></a>\n<div id=\"fb-root\"></div>\n<script>(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1&appId=" . OW::getConfig()->getValue('fbconnect', 'app_id') . "\";\n fjs.parentNode.insertBefore(js, fjs);\n}(document, 'script', 'facebook-jssdk'));\n</script>\n<div class=\"fb-login-button\" data-show-faces=\"false\" data-width=\"200\" data-max-rows=\"1\"></div>\n</div>"; //$fbloginform .="</a>"; } else { $fbloginform = ""; } $th = str_replace("[fbloginform]", $fbloginform, $th); if (OW::getConfig()->getValue('startpage', 'show_gender') == "1") { $show_gender = "<tr class=\"ow_alt1 ow_tr_last\">\n <td class=\"ow_value\">\n<div class=\"tt_wrapper\">\n<label>" . OW::getLanguage()->text('startpage', 'sex_gender') . ":</label>\n <select class=\"withPlaceholder\" id=\"sex\" name=\"sex\"/>\n <option value=\"1\">" . OW::getLanguage()->text('startpage', 'sex_male') . "</option>\n <option value=\"2\">" . OW::getLanguage()->text('startpage', 'sex_female') . "</option>\n </seclec>\n <label class=\"tt_placeholder\" for=\"sex\">" . OW::getLanguage()->text('startpage', 'sex_gender') . "</label>\n</div>\n <div style=\"height:1px;\"></div>\n <span id=\"input_sex_error\" style=\"display:none;\" class=\"error\"></span>\n </td>\n </tr>"; $th = str_replace("[show_gender]", $show_gender, $th); } else { $th = str_replace("[show_gender]", "", $th); } if (OW::getConfig()->getValue('startpage', 'show_realname') == "1") { $show_realname = "<tr class=\"ow_587953966575186054400185 ow_alt1 \">\n <td class=\"ow_value\">\n<div class=\"tt_wrapper\">\n <input class=\"withPlaceholder sp_require_text\" type=\"text\" id=\"muname\" name=\"f_muname\" />\n <label class=\"tt_placeholder\" for=\"muname\">" . OW::getLanguage()->text('startpage', 'musername') . "</label>\n</div>\n <div style=\"height:1px;\"></div>\n <span id=\"input_musername_error\" style=\"display:none;\" class=\"error\"></span>\n </td>\n </tr>"; $th = str_replace("[show_realname]", $show_realname, $th); } else { $th = str_replace("[show_realname]", "", $th); } if (OW::getConfig()->getValue('startpage', 'show_eage') == "1") { $show_eage = "<tr class=\"ow_587953966575186054400185 ow_alt1 \">\n <td class=\"ow_value\">\n<div class=\"clearfix\">\n<label>" . OW::getLanguage()->text('startpage', 'eage') . ":</label>\n</div>\n\n<div class=\"tt_wrapper\" style=\"float:left;margin-right:10px;\">\n\n <input class=\"withPlaceholder sp_require_text\" type=\"text\" id=\"eage_d\" name=\"eage_d\" style=\"max-width:70px;\"/>\n <label class=\"tt_placeholder\" for=\"eage_d\">" . OW::getLanguage()->text('startpage', 'show_eage_d') . "</label>\n</div>\n\n<div class=\"tt_wrapper\" style=\"float:left;margin-right:10px;\">\n <input class=\"withPlaceholder sp_require_text\" type=\"text\" id=\"eage_m\" name=\"eage_m\" style=\"max-width:70px;\"/>\n <label class=\"tt_placeholder\" for=\"eage_m\">" . OW::getLanguage()->text('startpage', 'show_eage_m') . "</label>\n</div>\n\n<div class=\"tt_wrapper\" style=\"float:left;margin-right:10px;\">\n <input class=\"withPlaceholder sp_require_text\" type=\"text\" id=\"eage_y\" name=\"eage_y\" style=\"max-width:70px;\"/>\n <label class=\"tt_placeholder\" for=\"eage_y\">" . OW::getLanguage()->text('startpage', 'show_eage_y') . "</label>\n</div>\n <div style=\"height:1px;\"></div>\n <span id=\"input_musername_error\" style=\"display:none;\" class=\"error\"></span>\n </td>\n </tr>"; $th = str_replace("[show_eage]", $show_eage, $th); } else { $th = str_replace("[show_eage]", "", $th); } $th = str_replace("[translate_musername]", OW::getLanguage()->text('startpage', 'musername'), $th); $th = str_replace("[translate_username]", OW::getLanguage()->text('startpage', 'username'), $th); $th = str_replace("[translate_email]", OW::getLanguage()->text('startpage', 'email'), $th); $th = str_replace("[translate_password]", OW::getLanguage()->text('startpage', 'password'), $th); $th = str_replace("[translate_password_retype]", OW::getLanguage()->text('startpage', 'password_retype'), $th); $th = str_replace("[translate_registertitle]", OW::getLanguage()->text('startpage', 'register_title'), $th); //$th=str_replace("[translate_accounttype]",OW::getLanguage()->text('startpage', 'account_type'),$th); $th = str_replace("[translate_sex_male]", OW::getLanguage()->text('startpage', 'sex_male'), $th); $th = str_replace("[translate_sex_female]", OW::getLanguage()->text('startpage', 'sex_female'), $th); $th = str_replace("[translate_sex_retype]", OW::getLanguage()->text('startpage', 'sex_gender'), $th); ////echo "AfDSF";exit; // $th=str_replace("[translate_upload_avatar]",OW::getLanguage()->text('startpage', 'select_avatar'),$th); // $th=str_replace("[translate_upload]",OW::getLanguage()->text('startpage', 'upload_avatar'),$th); if (OW::getConfig()->getValue('startpage', 'allow_upload_avatar') == "1") { $upav = "<tr class=\"ow_tr_first\"><th >" . OW::getLanguage()->text('startpage', 'select_avatar') . "</th></tr> \n <tr class=\"ow_alt1 ow_tr_last\">\n <td class=\"ow_value\" style=\"text-align:center;\">\n<div id=\"av_thumn\" uploaded=\"er\" style=\"width:150px;height:150px;border:1px solid #ddd;background-repeat: no-repeat;background-position: center center;display:none;background-color:#fff;position: absolute;z-index:50;margin-left: -160px;margin-top: -91px;\"></div>\n<input id=\"fileToUpload\" type=\"file\" size=\"\" name=\"fileToUpload\" accept=\"image/gif,image/png,image/jpeg,image/x-png\" class=\"input\" style=\"max-width:150px;\">\n<button class=\"button\" id=\"buttonUpload\" onclick=\"return ajaxFileUpload();\">" . OW::getLanguage()->text('startpage', 'upload_avatar') . "</button>\n </td>\n </tr>"; $th = str_replace("[ttuploadav]", $upav, $th); } else { $th = str_replace("[ttuploadav]", "<div id=\"av_thumn\" uploaded=\"yok\"></div>", $th); } $captha = ""; if (OW::getConfig()->getValue('startpage', 'allow_show_captha') == "1") { $captha .= "<tr class=\"ow_tr_first \"><th >" . OW::getLanguage()->text('startpage', 'retype_catcha') . "</th></tr>"; $img_fromtheme = $curent_url . "ow_static/themes/" . OW::getConfig()->getValue('base', 'selectedTheme') . "/images/ic_refresh.png"; // $captha .="<tr><td id=\"captcha_image\" colspan=\"2\" style=\"text-align:center;\"><img id=\"capthaimagex\" src=\"".$curent_url."/base/captcha/index/\"> <a id=\"refreshcapthabutton\" href=\"javascript://\" onclick=\"window.location ='".$curent_url."start';\"><img src=\"".$img_fromtheme."\"></a></td></tr>"; $captha .= "<tr class=\"ow_alt1\"><td id=\"captcha_image\" colspan=\"2\" style=\"text-align:center;\"><a id=\"refreshcapthabutton\" href=\"javascript://\"><img id=\"capthaimagex\" src=\"" . $curent_url . "/base/captcha/index/\"> <img src=\"" . $img_fromtheme . "\"></a></td></tr>"; $captha .= "<tr class=\"ow_alt1 ow_tr_last\"><td id=\"captcha_retype\" class=\"ow_value\" style=\"text-align:center;\" colspan=\"2\" ><input type=\"text\" id=\"captha\" placeholder=\"" . OW::getLanguage()->text('startpage', 'retype_catcha') . "\" name=\"captha\" value=\"\"></td></tr>"; $th = str_replace("[ttcaptha]", $captha, $th); } else { $th = str_replace("[ttcaptha]", "", $th); } $ttagree_nwsletter = ""; if (OW::getConfig()->getValue('startpage', 'show_agree_newsletter') == "1") { $ttagree_nwsletter .= "<tr class=\"ow_tr_first\"><th >" . OW::getLanguage()->text('startpage', 'agree_therm') . "</th></tr> \n <tr class=\"ow_alt1 ow_tr_last\">\n <td id=\"td_agree_newsletter\" class=\"ow_value\" style=\"text-align:left;\">\n<input checked type=\"checkbox\" name=\"agree_newsletter\" id=\"agree_newsletter\" value=\"1\"> " . OW::getLanguage()->text('startpage', 'agree_newsletter') . "\n </td>\n </tr>"; } if (OW::getConfig()->getValue('startpage', 'show_agree_therm_of_use') == "1") { if (OW::getConfig()->getValue('startpage', 'therm_of_use_url')) { $turl = OW::getConfig()->getValue('startpage', 'therm_of_use_url'); } else { $turl = $curent_url . "terms-of-use"; } $ttagree_nwsletter .= "<tr class=\"ow_alt1 ow_tr_last\">\n <td id=\"td_agree_therm_of_use\" class=\"ow_value\" style=\"text-align:left;\">\n<input checked type=\"checkbox\" name=\"agree_therm_of_use\" id=\"agree_therm_of_use\" value=\"1\"> <a href=\"" . $turl . "\" target=\"_blank\">" . OW::getLanguage()->text('startpage', 'agree_therm_of_use') . "</a>\n </td>\n </tr>"; } if ($ttagree_nwsletter) { $th = str_replace("[ttagree_nwsletter]", $ttagree_nwsletter, $th); } else { $th = str_replace("[ttagree_nwsletter]", "", $th); } //if ( /* OW::getConfig()->addConfig('fbconnect', 'api_key', '', 'Facebook Api Key'); OW::getConfig()->addConfig('fbconnect', 'app_id', '', 'Facebook Application ID'); OW::getConfig()->addConfig('fbconnect', 'api_secret', '', 'Facebook Application Secret'); OW::getConfig()->addConfig('fbconnect', 'allow_synchronize', 0, 'Allow synchronization for non-Facebook profiles'); */ /* if ( OW::getPluginManager()->isPluginActive('fbconnect')){ $api_key=OW::getConfig()->getValue('fbconnect', 'api_key'); $app_id=OW::getConfig()->getValue('fbconnect', 'app_id'); $api_secret=OW::getConfig()->getValue('fbconnect', 'api_secret'); $allow_synchronize=OW::getConfig()->getValue('fbconnect', 'allow_synchronize'); $fbc="<div class=\"fb-login-button\" data-show-faces=\"false\" data-width=\"200\" data-max-rows=\"1\" ></div>"; $th=str_replace("[fbconnect]",$fbc,$th); }else{ $th=str_replace("[tturl]","",$th); } */ $loginform = "\n<form id=\"form_login\" method=\"post\" action=\"\" name=\"sign-in\">\n<input name=\"form_name\" id=\"form_login\" value=\"sign-in\" type=\"hidden\">\n<input name=\"ss\" id=\"form_ss\" value=\"" . substr(session_id(), 2, 5) . "\" type=\"hidden\">\n<input name=\"remember\" id=\"form_login_rm\" value=\"on\" type=\"hidden\">\n\n <div class=\"clearfix\" style=\"margin-top:5px;\"\\>\n <div class=\"ow_user_name\" style=\"display: inline-block;\">\n <input name=\"identity\" id=\"identity\" placeholder=\"" . OW::getLanguage()->text('startpage', 'username_email') . "\" value=\"\" class=\"invitation\" type=\"text\">\n </div>\n <div class=\"ow_password\" style=\"display: inline-block;\">\n <input name=\"password\" id=\"password\" placeholder=\"" . OW::getLanguage()->text('startpage', 'password') . "\" value=\"\" class=\"invitation\" type=\"password\">\n </div>\n <div class=\"ow_form_options\" style=\"display: inline-block;\">\n <span class=\"ow_button ow_positive\"><span><input value=\"" . OW::getLanguage()->text('startpage', 'login') . "\" id=\"login_submit\" class=\"ow_positive\" name=\"submit\" type=\"submit\"></span></span>\n </div>\n </div>\n\n</form>\n"; $th = str_replace("[tturl]", $curent_url, $th); $th = str_replace("[tt_ss]", substr(session_id(), 3, 5), $th); $th = str_replace("[tttoplogo]", $logo, $th); $th = str_replace("[ttform]", $loginform, $th); $th = str_replace("[ttalertlform]", STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'enterloginandpasswword')), $th); $th = str_replace("[ttmenu]", $menup, $th); $th = str_replace("[ttindexbutton]", $indexp, $th); $ttforgetpassword = ""; $ttforgetpassword .= "<a href=\"" . $curent_url . "forgot-password\">"; $ttforgetpassword .= "<span class=\"ow_button ow_positive\"><span>"; $ttforgetpassword .= "<input type=\"button\" value=\"" . OW::getLanguage()->text('startpage', 'forgot_password') . "\" title=\"" . OW::getLanguage()->text('startpage', 'forgot_password') . "\" id=\"b_forgot_password\" class=\"ow_button ow_ic_house\" name=\"sdfsdfsdf\">"; $ttforgetpassword .= "</span></span>"; $ttforgetpassword .= "</a>"; // $ttforgetpassword=$indexp; /* $ttforgetpassword=""; $ttforgetpassword .="<span class=\"ow_button\">"; $ttforgetpassword .="<a href=\"".$curent_url."forgot-password\" >"; $ttforgetpassword .="<input type=\"button\" value=\"".OW::getLanguage()->text('startpage', 'forgot_password')."\" id=\"b_forget\" class=\"ow_button ow_ic_submit\" name=\"Forget\">"; // $ttforgetpassword .="<input type=\"button\" value=\"Wejdź jako Gość\" title=\"Start\" id=\"b_home\" class=\"ow_button ow_ic_house\" name=\"joinSubmit\" />"; $ttforgetpassword .="</a>"; $ttforgetpassword .="</span>"; */ $th = str_replace("[ttforgetpassword]", $ttforgetpassword, $th); if ($default_theme == "2column_wlogin") { $th = str_replace("[ttloginbutton]", "", $th); $th = str_replace("[ttloginbutton2]", "", $th); } else { $th = str_replace("[ttloginbutton]", $login, $th); $th = str_replace("[ttloginbutton2]", $login2, $th); } $th = str_replace("[ttregisterbutton]", $register, $th); if (OW::getConfig()->getValue('startpage', 'theme_header_backgroundcolor')) { $th = str_replace("[tt_header_bc]", "background-color:" . OW::getConfig()->getValue('startpage', 'theme_header_backgroundcolor') . ";", $th); } else { $th = str_replace("[tt_header_bc]", "", $th); } if (OW::getConfig()->getValue('startpage', 'theme_center_column')) { $th = str_replace("[tt_center_content]", OW::getConfig()->getValue('startpage', 'theme_center_column'), $th); } else { $th = str_replace("[tt_center_content]", OW::getLanguage()->text('startpage', 'content_center_column'), $th); } if (OW::getConfig()->getValue('startpage', 'theme_slogan')) { $th = str_replace("[tt_slogan]", OW::getConfig()->getValue('startpage', 'theme_slogan'), $th); } else { $th = str_replace("[tt_slogan]", OW::getLanguage()->text('startpage', 'default_slogan'), $th); } if (OW::getConfig()->getValue('startpage', 'theme_slogan_desc')) { $th = str_replace("[tt_slogan_desc]", OW::getConfig()->getValue('startpage', 'theme_slogan_desc'), $th); } else { $th = str_replace("[tt_slogan_desc]", OW::getLanguage()->text('startpage', 'default_slogan_desc'), $th); } if (OW::getConfig()->getValue('startpage', 'theme_header_height')) { $th = str_replace("[tt_header_height]", OW::getConfig()->getValue('startpage', 'theme_header_height'), $th); } else { $th = str_replace("[tt_header_height]", "64px", $th); } if (OW::getConfig()->getValue('startpage', 'theme_header_width')) { $th = str_replace("[tt_header_width]", OW::getConfig()->getValue('startpage', 'theme_header_width'), $th); } else { $th = str_replace("[tt_header_width]", "100%", $th); } if (OW::getPluginManager()->isPluginActive('mobille') and MOBILLE_BOL_Service::getInstance()->is_file_application()) { $content_x = "<div style=\"clearfix\" style=\"font-weigfht:bold;text-align:left;\"><a href=\"" . $curent_url . "mobile/downloadapplication\"><div id=\"mobile_qrcode_download\" style=\"float:left;margin:10px;display:inline-block;\"></div><div style=\"float:left;margin-top:25px;display:inline-block;\">Download for Android OS</div></a></div>"; $th = str_replace("[download_mobile_version]", $content_x, $th); } else { $th = str_replace("[download_mobile_version]", "", $th); } $act = ""; $act_first = ""; $sql = "SELECT * FROM " . OW_DB_PREFIX . "base_question_account_type ORDER BY `sortOrder` "; $arr = OW::getDbo()->queryForList($sql); $num = 0; foreach ($arr as $value) { //ow_base_document // $sql2 = "SELECT * FROM " . OW_DB_PREFIX. "base_language_key WHERE "; // $arr2 = OW::getDbo()->queryForList($sql2); // $act .="<option value=\"".$value['name']."\">".OW::getLanguage()->text('base', 'content_center_column')."</option>"; $act .= "<option value=\"" . $value['name'] . "\">" . OW::getLanguage()->text('base', 'questions_account_type_' . $value['name']) . "</option>"; if (!$act_first) { $act_first = "<input type=\"hidden\" name=\"accountType\" id=\"input_actype\" value=\"" . $value['name'] . "\">"; if (OW::getConfig()->getValue('startpage', 'hide_accouttype')) { break; } } $num = $num + 1; } $act_f = ""; if (OW::getConfig()->getValue('startpage', 'hide_accouttype') and $act_first and $act) { $th = str_replace("[tt_fhiden]", $act_first, $th); } else { if ($act) { $act_f = "<tr class=\"ow_alt1 ow_tr_first ow_tr_last\">\n <td class=\"ow_value ow_center\">\n<div class=\"ow_label\">\n<label for=\"input_30125731\">" . OW::getLanguage()->text('startpage', 'account_type') . "</label>\n</div>\n <select name=\"accountType\" id=\"input_actype\">\n " . $act . "\n </select>\n <div style=\"height:1px;\"></div>\n <span id=\"input_30125731_error\" style=\"display:none;\" class=\"error\"></span>\n </td>\n </tr>"; $th = str_replace("[tt_fhiden]", "", $th); } else { $act_f = "<tr class=\"ow_alt1 ow_tr_first ow_tr_last\">\n <td class=\"ow_value ow_center\">\n<div class=\"ow_label\">\n<label for=\"input_30125731\">" . OW::getLanguage()->text('startpage', 'problem_with_accout_type') . "</label>\n</div>\n <div style=\"height:1px;\"></div>\n <span id=\"input_30125731_error\" style=\"display:none;\" class=\"error\"></span>\n </td>\n </tr>"; $th = str_replace("[tt_fhiden]", "", $th); } } $th = str_replace("[tt_act]", $act_f, $th); //ow_static/plugins/base/css/images/flags/NL.png //---fls $flg = ""; $sql = "SELECT * FROM " . OW_DB_PREFIX . "base_language WHERE status='active' ORDER BY `order` "; //if (OW::getConfig()->getValue('startpage', 'show_small_startpage_list')=="1"){ $arr = OW::getDbo()->queryForList($sql); foreach ($arr as $value) { $fn = ""; $fn_tmp = explode("-", $value['tag']); if (isset($fn_tmp[0])) { $fn_tmp2 = explode("_", $fn_tmp[0]); if (isset($fn_tmp2[0])) { $fn = $fn_tmp2[0]; } else { $fn = $fn_tmp[0]; } } else { $fn = $fn_tmp[0]; } if ($fn) { $fn = strtoupper($fn); if ($fn == "EN") { $fn = "US"; } // $flg .="<a href=\"javascript:void(0);\" onclick=\"location.href='".$curent_url."join?language_id=".$value['id']."';\" title=\"".$value['label']."\">"; $flg .= "<a href=\"javascript:void(0);\" onclick=\"location.href='" . $curent_url . "start?language_id=" . $value['id'] . "';\" title=\"" . $value['label'] . "\">"; $flg .= "<img src=\"" . $curent_url . "ow_static/plugins/base/css/images/flags/" . $fn . ".png\" >"; $flg .= "</a>"; } } $th = str_replace("[tt_flg]", $flg, $th); if (OW::getConfig()->getValue('startpage', 'try_use_mytheme') == "1") { $text_color_style = ""; $text_color_style2 = ""; } else { $text_color_style = "color: #464646;"; $text_color_style2 = "color:#777777;"; } $th = str_replace("[tt_text_color_style]", $text_color_style, $th); $th = str_replace("[tt_text_color_style2]", $text_color_style2, $th); //---fle //$type="pl-PL"; //echo BOL_FlagService::getInstance()->findLangKey($type);exit; echo $th; //if () if (OW::getConfig()->getValue('startpage', 'try_use_mytheme') == "1") { $bg_content_color = ""; $border_content_color = ""; } else { $bg_content_color = "background: #fff;"; $border_content_color = "border: 1px solid #e7e7e7;"; } $add_style = "\n<style>\n#tt_form{\nmargin: 8px;\n/*padding: 40px 40px 22px 40px;*/\npadding: 20px 20px 12px 20px;\n" . $bg_content_color . "\n-moz-border-radius: 5px;\n-webkit-border-radius: 5px;\n-khtml-border-radius: 5px;\nborder-radius: 5px;\n-webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n-moz-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\nbox-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n" . $border_content_color . "\n}\n</style>\n"; echo $add_style; //OW::getDocument()->appendBody($add_style); //----footer $th = file_get_contents($pluginStaticD . "join_footer.html"); echo $th; // echo UTIL_Url::selfUrl(); //OW::getDocument()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(self::TEMPLATE_BLANK)); //OW::getDocument()->setTemplate(OW::getThemeManager()->getMasterPageTemplate('club')); exit; }
function force_login() { //echo $_SERVER["HTTP_REFERER"];exit; // if ($_SERVER["HTTP_REFERER"]) return; if (OW::getUser()->getId() > 0) { return; } STARTPAGE_BOL_Service::getInstance()->check_user_activity_log(); /* $script =""; //$script .= '<script type="text/javascript">'; //$('#console_item_51a239a755e59').click(function(){new OW_FloatBox({ $contents: $('#base_cmp_floatbox_ajax_signin')});}); $script .= " new OW_FloatBox({ \$contents: \$('#base_cmp_floatbox_ajax_signin')}); //(function(_scope) { // new OW_FloatBox({\$contents:\$('#base_cmp_floatbox_ajax_signin')}); //})(window); "; //$script .= "</script>"; //if (!OW::getUser()->getId()){ OW::getDocument()->addOnloadScript($script); //} */ // OW::getDocument()->appendBody($script); }
public function index_ajax_showpage($params) { /* //======================= echo "START<br>"; $i=rand(88888,99999999); $_POST['acctype']="asdasd".$i; $_POST['uname']="asdasd".$i; $_POST['email']="asdasdasdasd".$i."@asdas.com"; $_POST['pass']="******"; $_POST['pass2']="afsdfwdfsdfsd"; $_POST['ss']=substr(session_id(),3,5); echo $this->register(); echo "<br>END"; exit; //====================== */ $retconf = array(); $retconf['ss'] = substr(session_id(), 3, 5); //echo "sfsdF";exit; // echo "sfadfsdfs"; /* 'ss':'[tt_ss]', 'pass': pass , 'uname':uname, 'email':email,'acctype': actype} */ //$retconf['cc']=print_r($_POST,1); //print_r($_POST);exit; /* $retconf['status']="ERROR"; $retconf['comm']="=============".$_POST['ss']."----".substr(session_id(),3,5); echo json_encode($retconf); exit; */ if (isset($_POST['ss']) and $_POST['ss'] == substr(session_id(), 3, 5)) { /* $_SESSION['joinStep'] =2; $_SESSION['joinData']['accountType']=$_POST['acctype']; $_SESSION['joinData']['username']=$_POST['uname']; $_SESSION['joinData']['email']=$_POST['email']; $_SESSION['joinData']['password']=$_POST['pass']; */ $resultcreate = 0; $_SESSION['userId'] = $resultcreate; OW::getSession()->set('userId', $resultcreate); /// $resultcreate=$this->register(); $resultcreate = STARTPAGE_BOL_Service::getInstance()->register(); if ($resultcreate > 0) { $retconf['status'] = "SUCCES"; $retconf['comm'] = "OK"; $_SESSION['userId'] = $resultcreate; OW::getSession()->set('userId', $resultcreate); } else { if ($resultcreate == -100) { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_email_already_exist')); } else { if ($resultcreate == -200) { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_login_already_exist')); } else { $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_create_account_tryagain') . " [102]"); } } } } else { //errror $retconf['status'] = "ERROR"; $retconf['comm'] = STARTPAGE_BOL_Service::getInstance()->corect_for_java(OW::getLanguage()->text('startpage', 'error_create_account_tryagain') . " [101]"); } // $retconf['status']="SUCCES"; // $retconf['comm']="OK"; //$retconf['cc']=print_r($_POST,1); echo json_encode($retconf); exit; }