function import_cpanel_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $done; softheader($l['<title>']); if (!empty($done)) { echo '<div class="sai_success">' . $l['import_done'] . '</div><br /><br />'; } else { echo '<form accept-charset="' . $globals['charset'] . '" name="editsettings" method="post" action="" id="editsettings"> ' . error_handle($error, "100%", 0, 1) . ' <center class="sai_tit"><img src="' . $theme['a_images'] . 'import_cpanel.gif" /> ' . $l['import_cpanel'] . '</center> <table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" > <tr> <td width="35%"> <span class="sai_head">' . $l['r_domain'] . '</span><br /> <span class="sai_exp">' . $l['r_domain_exp'] . '</span> </td> <td> <input type="text" name="r_domain" id="r_domain" size="30" size="30" value="' . POSTval('r_domain', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['r_user'] . '</span><br /> <span class="sai_exp">' . $l['r_user_exp'] . '</span> </td> <td> <input type="text" name="r_user" id="r_user" size="30" size="30" value="' . POSTval('r_user', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['r_pass'] . '</span><br /> <span class="sai_exp">' . $l['r_pass_exp'] . '</span> </td> <td> <input type="password" name="r_pass" id="r_pass" size="30" value="' . POSTval('r_pass', '') . '" /> </td> </tr> <tr> <td colspan="2"> <p align="center"> <input type="hidden" name="create_acc" value="1" /> <input type="submit" style="cursor:pointer" value="' . $l['submit_button'] . '" name="create_acc" class="sai_graybluebut" id="submitftp" /> </p> </td> </tr> <tr> <td colspan="2"> <p align="center">' . $l['note'] . '</p> </td> </tr> </table> </form>'; } softfooter(); }
function licensekey_theme() { global $theme, $globals, $user, $l, $langs, $skins, $error, $licsubmit; softheader($l['<title>']); echo '<center class="sai_heading"> ' . $l['license_key'] . '</center> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br />'; error_handle($error); if (!empty($licsubmit)) { echo '<br /><div class="sai_notice"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['license_success'] . '</div><br />'; } else { echo '<form accept-charset="' . $globals['charset'] . '" name="licensekey" method="post" action=""> <br /><br /> <table width="100%" cellpadding="5" cellspacing="1" class="sai_reviewform" border="0" style="padding-left:15px; padding-top:15px margin:0px auto;" align="center"> <tr> <td valign="top"> <span class="sai_head">' . $l['enter_license_key'] . '</span><br /> <span class="sai_exp2">' . $l['exp_license_key'] . '</span> </td> <td> <input type="text" name="enter_license" id="enter_license" size="30" value="' . POSTval('enter_license') . '" autocomplete=off /> </td> </tr> <tr> <td valign="top"> <span class="sai_head">' . $l['enter_email'] . '</span><br /> <span class="sai_exp2">' . $l['exp_enter_email'] . '</span> </td> <td> <input type="text" name="enter_email" id="enter_email" size="30" value="' . POSTval('enter_email') . '" autocomplete=on /> </td> </tr> <tr> <td colspan="2"> <p align="center"><input type="submit" name="submit_license" value="' . $l['submit_license'] . '" class="sai_graybluebut" /></p> </td> </tr> </table> </form><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />'; } softfooter(); }
function ftpadd_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $done; // For adding FTP User if (optGET('ajaxftp')) { if (!empty($error)) { echo '0' . current($error); return false; } // Creating new table for display new DB if (!empty($done)) { echo '1' . $l['change_final']; return true; } } softheader($l['<title>']); echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'addftp.gif" />' . $l['ftp'] . '</center> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br />'; error_handle($error, '100%'); echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var message_box = function(){ return { show_message: function(title, body , image) { var okbutton = \'<input style="width:75px" class="sai_submit" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); $(document).ready(function(){ // For creating FTP accounts $("#submitftp").click(function(){ $("#createftp").css("display", ""); var login = ($("#login").val()); var newpass = ($("#newpass").val()); var conf = ($("#conf").val()); var dir = ($("#dir").val()); $.ajax({ type: "POST", url: window.location+"&create_acc=1&ajaxftp=1", data: "login="******"&newpass="******"&conf="+conf+"&dir="+dir, // Checking for error success: function(data){ $("#createftp").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ $_("login").value=""; $_("newpass").value=""; $_("conf").value=""; $_("dir").value=""; var msg = data.substring(1); message_box.show_message( "Done ",msg,2); } if(result == "0"){ $("#createmx").css("display", "none"); var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); }); var dir = false; function suggestdompath(domval){ if(dir){ return true; } $_("dir").value = "' . cleanpath($softpanel->user['homedir']) . '/www/"+$_("login").value; } // ]]></script> <form accept-charset="' . $globals['charset'] . '" action="" method="post" name="ftp_account"> <table border="0" cellpadding="8" cellspacing="8" width="100%"> <tr> <td width="35%"> <span class="sai_head">' . $l['loginname'] . '</span><br /> </td> <td> <input type="text" name="login" id="login" size="30" onkeyup="suggestdompath(this);" size="30" value="' . POSTval('login', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['new_pass'] . '</span><br /> </td> <td> <input type="password" name="newpass" id="newpass" size="30" value="" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['retype_pass'] . '</span><br /> </td> <td> <input type="password" name="conf" id="conf" size="30" value="" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['directory'] . '</span><br /><span class="sai_exp">' . $l['path'] . '</span> </td> <td> <input type="text" name="dir" id="dir" size="30" value="' . stripslashes(POSTval('dir', cleanpath($softpanel->path) . '/www/')) . '" onfocus="" /> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ //Add an event handler $_("dir").onkeydown = function(){ dir = true; } // ]]></script> </td> </tr> </table> <table border="0" width="100%"> <td align="left" width="40%"><a href="http://' . $_SERVER['HTTP_HOST'] . '/ampps/index.php?act=ftpmanage">' . $l['lbl_ftp_manage'] . '</a></td> <td align="left"><input type="button" style="cursor:pointer" value="' . $l['submit_button'] . '" name="create_acc" class="sai_submit" id="submitftp" /> <img id="createftp" src="' . $theme['images'] . 'progress.gif" style="display:none"></td></table> </form>'; softfooter(); }
function restore_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $_insid, $dbexist, $restored, $datadir, $wwwdir; global $backups, $deleted, $soft, $backupinfo; // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } softheader($l['<title>']); echo ' <div id="install_win">'; if (!empty($restored)) { echo ' <div class="bg"><br /> <div class="alert alert-warning"> <center><img src="' . $theme['images'] . 'notice.gif" /> ' . $l['restore'] . ' <center><b><a href="' . script_link($soft) . '&highlight=' . $backupinfo['insid'] . '&postact=restore"></a></b></center></center> </div> <br /> <center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /><br /> </div> <!--PROC_DONE-->'; } else { echo ' <div id="fadeout_div"> <form accept-charset="' . $globals['charset'] . '" name="restore" method="post" action="" onsubmit="return checkform();" id="restore"> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(dosubmit){ var conf = confirm(\'' . $l['confirm_restore'] . '\'); if(conf){ $_("restorebtn").disabled = true; if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! } return true; }else{ return false; } } var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#restore", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); $.ajax({ url: window.location+"&jsnohf=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); new_theme_funcs_init(); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } // ]]></script> <div class="bg"><br /> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-5 col-xs-5" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-restore fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-7 col-xs-7" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['prog_restoring'] . $iscripts[$soft]['name'] . '</div> </div> <hr><br />'; echo error_handle($error, "100%", 0, 1); echo ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['restore_dir'] . '</label><br /> <span class="sai_exp2">' . $l['restore_dir_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="restore_dir" ' . POSTchecked('restore_dir', true) . ' /> </div> </div><br />'; // Web directory ? if (!empty($wwwdir)) { echo ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['restore_wwwdir'] . '</label><br /> <span class="sai_exp2">' . $l['restore_wwwdir_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="restore_wwwdir" ' . POSTchecked('restore_wwwdir', true) . ' /> </div> </div><br />'; } // Data directory ? if (!empty($datadir)) { echo ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['restore_datadir'] . '</label><br /> <span class="sai_exp2">' . $l['restore_datadir_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="restore_datadir" ' . POSTchecked('restore_datadir', true) . ' /> </div> </div><br />'; } if (!empty($dbexist)) { echo ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['restore_db'] . '</label><br /> <span class="sai_exp2">' . $l['restore_db_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="restore_db" ' . POSTchecked('restore_db', true) . ' /> </div> </div><br />'; } echo '<br /><br /> <p align="center"> <input type="hidden" name="restore_ins" value="1" /> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> <input type="submit" name="restorebtn" class="flat-butt" id="restorebtn" value="' . $l['restore_ins'] . '" /> </p> <br /><br /> <center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /><br /> </div><br /><!--end of bg class--> </form> </div> <div id="progress_bar" style="display: none; width: 100%;"> <br /> <div class="bg"> <center> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-5 col-xs-5" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-restore fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-7 col-xs-7" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['prog_restoring'] . $iscripts[$soft]['name'] . '</div> </div><br /> <center> <font size="4" color="#222222" id="progress_txt" style="width: 100%;">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444; width: 100%;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; width: 50%;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> <br /><center>' . $l['wait_note'] . '</center><br /> <center><b><a href="' . script_link($soft) . '">' . $l['return'] . '</a></b></center><br /><br /> </div> </div><br /><br />'; } echo ' </div>'; softfooter(); }
function no_autoupgrade_theme() { global $theme, $globals, $user, $l, $langs, $skins, $error, $saved, $categories, $iscripts, $scripts, $top, $no_autoupgrade, $noautoupgrade_catwise, $noautoupgrade_scripts; softheader($l['<title>']); echo '<div class="sai_heading" align="center">' . $l['show_top_scripts'] . '</div> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br /><br />'; error_handle($error); if (!empty($saved)) { echo '<br /><div class="sai_success"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['settings_saved'] . '</div><br />'; } echo '<form accept-charset="' . $globals['charset'] . '" name="reordercat" method="post" action=""> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ ids1 = new Array(' . implode(', ', array_keys($noautoupgrade_scripts)) . '); function checkallsoftware(checker){ for(x in ids1){ $_("scripts_"+ids1[x]).checked = checker.checked; //change td background color changebg(ids1[x],"scripts_"); } }; function selectchkbox(id,type){ if($_(type+id).checked){ $_(type+id).checked = false; }else{ $_(type+id).checked = true; } //change td background color changebg(id,type); } function changebg(id,type){ try{ if($_(type+id).checked){ $("#td_"+id).css({ backgroundColor: "#C5EAFF" }); $("#td_"+id).css({boxShadow: "0 0 4px #3EA0DC"}); }else{ $_("td_"+id).style.background = "#ffffff"; $("#td_"+id).css({boxShadow: "0 0 4px #FFF"}); } }catch(e){} }; function checkall(){ // for scripts for(x in ids1){ changebg(ids1[x],"scripts_"); } }; addonload("checkall();"); // ]]></script>'; /* $reseller $user*/ echo '<link href="' . $globals['mirror_images'] . 'sprites/20.css" rel="stylesheet" type="text/css" /> <table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_reviewform"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['planhead'] . '</b></font> </td> </tr> </table> </td> </tr> <tr> <td> <span class="sai_head">' . $l['disable_autoupgrade'] . '</span><br /> <span class="sai_exp2">' . $l['disable_autoupgrade_exp'] . '</span> </td> <td valign="top"> <input type="checkbox" name="disable_autoupgrade" size="30" ' . POSTchecked('disable_autoupgrade', @$no_autoupgrade['disable_autoupgrade']) . ' /> </td> </tr> <tr> <td width="50%"> <span class="sai_head">' . $l['uptime'] . '</span><br /> <span class="sai_exp2">' . $l['exp_uptime'] . '</span> </td> <td valign="top"> <input type="text" name="uptime" size="40" value="' . POSTval('uptime', $no_autoupgrade['uptime']) . '"> </td> </tr> <tr> <td colspan="2"> <div class="notebox" style="width:95%"> <font class="bboxtxt"><b>' . $l['script_note'] . '</b> : <br />' . $l['script_note_exp'] . '</font> </div> </td> </tr>'; echo '</table><br /><br />'; echo ' <table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_divroundshad"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['scriptselect'] . '</b></div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <span>' . $l['exp_scriptselect'] . '</span><br /><br /> <span class="sai_exp2">' . $l['select_all'] . '<input type="checkbox" onclick="checkallsoftware(this);" /></span> </td> </tr> <tr> <td colspan="2"> <table width="100%" cellpadding="5" cellspacing="1" border="0">'; //r_print($noautoupgrade_catwise); //Showing All scripts Category wise foreach ($noautoupgrade_catwise as $ak => $av) { echo '<tr> <td colspan="4"><center class="sai_ribbonhead"><b>' . strtoupper($ak) . ' Apps</b></center></td> </tr>'; foreach ($av as $kk => $vv) { if (empty($av[$kk])) { continue; } echo '<tr> <td colspan="2"> <div class="sai_ribbonhead">' . $l['cat_' . $ak . '_' . $kk] . '</div> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /> </td> </tr>'; $i = 0; foreach ($vv as $k => $v) { if (is_int($i / 4)) { echo '<tr>'; } echo '<td width="20%"> <table border="0" id="td_' . $k . '"> <tr> <td width="10%"> <input type="checkbox" id="scripts_' . $k . '" name="scripts_' . $k . '" ' . POSTchecked('scripts_' . $k, $no_autoupgrade['scripts'][$k]) . ' onclick="changebg(\'' . $k . '\',\'scripts_\');"/> </td> <td width="10%"> <div class="sp20_' . $v['softname'] . '"></div> </td> <td> <a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\'' . $k . '\',\'scripts_\');" ><font class="bboxtxt">' . $v['name'] . '</font></a> </td> </tr> </table> </td>'; $i++; if (is_int($i / 4)) { echo '</tr>'; } } } } echo '</table></td> </tr> </table> <p align="center"><input type="submit" name="save" value="' . $l['save'] . '" class="sai_graybluebut" ></p> </form>'; softfooter(); }
function dbmanage_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $dbname, $dbuser, $pri_list, $dbdone, $db_list, $db_list_size, $db_with_user_list, $db_user_list; //Ajax part for add DB if (optGET('ajaxdb')) { if (!empty($error)) { echo '0' . current($error); return false; } // Creating new table for display new DB if (!empty($dbdone)) { echo '1' . $l['db_create']; showdb(); return true; } } // Ajax part for add user if (optGET('ajax')) { if (!empty($error)) { echo '0' . current($error); return false; } // Creating new table for display new user if (!empty($dbdone)) { echo '1' . $l['user_added']; showuser(); return true; } } // Ajax part for update privaliges if (optGET('ajaxpri')) { if (!empty($error)) { echo '0 ' . current($error); return false; } if (!empty($dbdone)) { echo '1' . $l['db_pri_updated']; showdb(); return true; } } // Ajax part for delete user if (optGET('ajaxdeluser')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($dbdone)) { echo '1' . $l['db_user_del']; showdb(); return true; } } // Ajax part for delete DB if (optGET('ajaxdeldb')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($dbdone)) { echo '1' . $l['db_db_del']; showdb(); return true; } } if (optGET('editdb_user')) { $db_list = $softpanel->listdbs(); $db_user_list = $softpanel->listdbusers(); echo '<center><div class="sai_tit" style=" width:100%;"><img src="' . $theme['a_images'] . 'adddb.gif" alt="" /> ' . $l['user_db_add_label'] . '</div></center>'; if (count($db_list) > 0 && count($db_user_list) > 0) { echo '<form accept-charset="' . $globals['charset'] . '" name="importsoftware" method="post" action="" > <br /> <table border="0" cellpadding="8" cellspacing="8" width="90%" align="center" class="sai_divroundshad" sstyle="padding-left:15px; padding-top:15px;" > <tr> <td> <span class="sai_head">' . $l['user_label'] . '</span> </td> <td valign="top"> <select name="sel_user" id="sel_user">'; foreach ($db_user_list as $k => $v) { echo '<option value="' . $k . '" ' . (!empty($_POST['sel_user']) && $_POST['sel_user'] == $k ? 'selected="selected"' : '') . '>' . $v . '</option>'; } echo '</select> </td> </tr> <tr> <td> <span class="sai_head">' . $l['db_set_label'] . '</span> </td> <td valign="top"> <select name="sel_db" id="sel_db">'; foreach ($db_list as $k => $v) { echo '<option value="' . $k . '" ' . (!empty($_POST['sel_db']) && $_POST['sel_db'] == $k ? 'selected="selected"' : '') . '>' . $v . '</option>'; } echo '</select> </td> </tr> <tr> <td colspan="2"> <p align="center"><input type="button" class="sai_graybluebut" id="submit1" style="cursor:pointer" name="submitselectuser" value="' . $l['submitselectuser'] . '" /></p> </td> </tr> </table> </form> <script language="javascript" type="text/javascript" ><!-- // --><![CDATA[ // For popup $("#submit1").click(function() { var dbname = ($("#sel_db").val()); var dbuser = ($("#sel_user").val()); show_popup(dbname,dbuser); }); // ]]></script>'; echo '<div class="sai_popup" ></div>'; } else { echo '<center><h2>' . $l['err_nodata'] . '</h2></center>'; } return true; } // Privaliges page for popup if (optGET('editpri')) { $dbname = POST('dbname'); $dbuser = POST('dbuser'); // Get user db privileges $db_pri = $softpanel->getDbPrivileges($dbname, $dbuser); echo '<script language="javascript" type="text/javascript" ><!-- // --><![CDATA[ $(document).ready(function(){ $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); $("#submitpri").click(function() { $("#comsg").css("display", "none"); $("#ermsg").css("display", "none"); var prilist = Array() ids = new Array("' . implode('", "', $pri_list) . '"); for(x in ids){ if($_("pri["+ids[x]+"]").checked){ prilist[x] = ids[x]; } } var host = ($("#selecttype").val()); if(host == "Use text field"){ host =($("#hname").val()); } var w_l = window.location.toString(); if(w_l.indexOf("#") > 0){ w_l = w_l.substring(0, w_l.indexOf("#")); } $.ajax({ type: "POST", url: w_l+"&submitpri=1&ajaxpri=1 ", data: "dbname=' . $dbname . '&dbuser='******'&host=" +host+"&prilist=" +prilist, // checking for error success: function(data){ var result = data.substring(0,1); if(result == "1"){ var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); $("#comsg").css("display", ""); $("#comsg").html(msg); $("#showdbtab").html(output); } if(result == "0"){ var msg = data.substring(1); $("#ermsg").css("display", ""); $("#ermsg").html(msg); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); $("#chk_table tr").click(function(e){ var $checkbox = $(this).find(":checkbox"); $("#chk_table:checkbox").not($checkbox).removeAttr("checked"); if (e.target.type == "checkbox") { $checkbox.attr("checked"); }else{ $checkbox.attr("checked", !$checkbox.attr("checked")); $(this).filter(":has(:checkbox)").toggleClass("selected", $checkbox.attr("checked")); } }); }); // ]]></script>'; echo '<div class="ui_titlebar" style="width:95%" > <a title="Close" class="close"><img src="' . $theme['images'] . 'remove.gif" style="cursor:pointer; float:right;" alt="close" height="20" width="20" onclick="popup_close();" /></a> <center class="sai_tit"><img src="' . $theme['images'] . 'mysql_1.gif" /> ' . $l['db_headling_pri'] . ' For Database ' . $dbname . ' To User ' . $dbuser . '</center> <center id="comsg" style="display:none" class="sai_notice"></center> <center id="ermsg" style="display:none; background-color: #FF9999;" class="sai_notice" ></center> <form accept-charset="' . $globals['charset'] . '" name="importsoftware" method="post" action="" ></div> <table border="0" cellpadding="0" cellspacing="0" width="99%" class="sai_altrowstable"> <tr> <th align="center" class="sai_summaryTitle" colspan="1">' . $l['db_pri'] . '</th> <th align="center" class="sai_summaryTitle" colspan="1">' . $l['pri_option'] . '<input type="checkbox" onclick="checkall(this);" /></th> </tr>'; foreach ($pri_list as $key => $value) { $k = ucfirst(strtolower($value)) . '_priv'; $check[$key] = isset($db_pri[$k]) && $db_pri[$k] == 'Y' ? 'checked="checked"' : ''; $label[$key] = ucfirst(str_replace('_', ' ', strtolower($value))); } echo '<tr> <td width="50%"> <table border="0" cellpadding="8" cellspacing="0" width="100%" class="sai_altrowstable" id="chk_table">'; for ($j = 0; $j <= count($pri_list) / 2 - 1; $j++) { echo '<tr class="' . ($j % 2 == 0 ? "sai_evenrowcolor" : "sai_oddrowcolor") . '" height="40px"> <td width="70%">' . $label[$j] . '</td> <td align="center" width="25%"><input ' . $check[$j] . ' type="checkbox" name="pri[' . $pri_list[$j] . ']" id="pri[' . $pri_list[$j] . ']" value="Y" /></td> </tr>'; } echo '</table> </td> <td width="50%"> <table border="0" cellpadding="8" cellspacing="0" width="100%" class="sai_altrowstable" id="chk_table">'; for ($j = count($pri_list) / 2; $j <= count($pri_list) - 1; $j++) { echo '<tr class="' . ($j % 2 == 0 ? "sai_evenrowcolor" : "sai_oddrowcolor") . '" height="40px"> <td width="70%" >' . $label[$j] . '</td> <td align="center" width="25%"><input ' . $check[$j] . ' type="checkbox" name="pri[' . $pri_list[$j] . ']" id="pri[' . $pri_list[$j] . ']" value="Y" /></td> </tr>'; } echo ' </table> </td> </tr> </table>'; echo '<table> <tr> <td width="25%"> <span class="sai_head">' . $l['select_host'] . '</span> <td> <td width="25%"> <select class="input" name="selecttype" id="selecttype" onchange="disp_type(this.value)"> <option value="' . $l['local'] . '" ' . ($db_pri['Host'] == $l['local'] ? 'selected=selected' : '') . '>' . $l['local'] . '</option> <option value="' . $l['anyhost'] . '" ' . ($db_pri['Host'] == '%' ? 'selected=selected' : '') . '>' . $l['anyhost'] . '</option> <option value="' . $l['text'] . '" ' . ($db_pri['Host'] != $l['local'] && $db_pri['Host'] != '%' && $db_pri['Host'] != '' ? 'selected=selected' : '') . '>' . $l['text'] . '</option> </select> </td> <td width ="50%"> <input type="text" id="hname" name="hname" id="address" size="30" ' . ($db_pri['Host'] != $l['local'] && $db_pri['Host'] != '%' && $db_pri['Host'] != '' ? 'value=' . $db_pri['Host'] . '' : 'style="display:none" ') . ' /> </td> </tr> </table> <p align="center"><input type="button" class="sai_graybluebut" id="submitpri" style="cursor:pointer" name="submitpri" value="' . $l['submitpri'] . '" /></p> </form> '; return true; } softheader($l['<title>']); echo '<script language="javascript" src="' . js_url('js/jquery.scrollTo.js') . '" type="text/javascript"></script>'; $db_prefix = $softpanel->user['name'] . '_'; echo '<style type="text/css"> .ui_titlebar { padding: 0.4em 1em; background-color: #CCCCCC; border: 1px solid #AAAAAA; color: #222222; font-weight: bold; border-radius: 4px; } .sai_popup { position:absolute; background:#FFFFFF; border:#666 1px solid; display:none; z-index:10000; min-height:200px; margin:0 auto; padding:5px; } .sai_popup_add { position:absolute; background:#FFFFFF; border:#666 1px solid; display:none; z-index:10000; min-height:200px; margin:0 auto; padding:5px; } .close { float:right; position:relative; z-index:99999; margin:3px 6px 0; } #scroller-body { width=100%; padding-bottom:30px; height: 100%; } #mask { width:700px; overflow:hidden; margin:0 auto; height: 100%; } #panel div { float:left; } a.selected { border-radius: 5px; border :2px solid #B8B8B8; background: #EFEFEF; padding: 8px; font-size:18px; color:#333333; margin-top:20px; margin-bottom:5px; font-family: "Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,Verdana,sans-serif; } .heading_a{ border-radius: 5px; border :2px solid #FFFFFF; background: #FFFFFF; padding: 8px; font-size:18px; color:#333333; margin-top:20px; margin-bottom:5px; font-family: "Lucida Grande","Lucida Sans Unicode",Helvetica,Arial,Verdana,sans-serif; } </style>'; echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var message_box = function() { return { show_message: function(title, body , image) { var okbutton = \'<input style="width:75px" class="sai_graybluebut" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, delete_message: function(title, body ,delact) { var yesbutton = \'<input type="button" style="width:75px" onclick="message_box.yes_close_message(\\\'\'+delact+\'\\\');" value="YES" class="sai_graybluebut"/>\'; var nobutton = \'<input type="button" style="width:75px" onclick="message_box.no_close_message();" value="NO" class="sai_graybluebut" />\'; var img = \'<img src="' . $theme['images'] . 'remove_big.gif" />\'; if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr ><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \' \' + nobutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message = \' <table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \' \' + nobutton + \'</td></tr></table>\' jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); }, yes_close_message: function(delact) { delaction = delact.substr(0,3) delrecord = delact.substr(3); if(delaction == "did"){ $(\'#did\'+delrecord).attr("src","' . $theme['images'] . 'progress.gif"); url = "&delete_db=" +delrecord+"&ajaxdeldb=1"; }else{ $(\'#uid\'+delrecord).attr("src","' . $theme['images'] . 'progress.gif"); url = "&delete_dbuser="******"&ajaxdeluser=1"; } jQuery(\'.sai_message_box\').hide(\'fast\'); var w_l = window.location.toString(); if(w_l.indexOf("#") > 0){ w_l = w_l.substring(0, w_l.indexOf("#")); } $.ajax({ type: "POST", url: w_l+url, success: function(data){ var result = data.substring(0,1); var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); if(result == "1"){ message_box.show_message("Delete",msg,2); if(delaction == "did"){ $("#tr"+trim(delrecord)).fadeOut(2000); }else{ $("#ur"+trim(delrecord)).fadeOut(2000); } $("#showdbtab").html(output); } if(result == "0"){ message_box.show_message("Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }, no_close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); // for deleting db or user function deleterecord(delact){ delaction = delact.substr(0,3) if(delaction == "did"){ message_box.delete_message (\'Warning\',\'' . $l['db_del_conf'] . '\', delact); }else{ message_box.delete_message (\'Warning\',\'' . $l['dbuser_del_conf'] . '\', delact); } }; // Function for checkbox check all ids = new Array("' . implode('", "', $pri_list) . '"); function checkall(checker){ for(x in ids){ $_("pri["+ids[x]+"]").checked = checker.checked; } }; // Function for show host function disp_type(str){ if(str == "Use text field"){ $("#hname").css("display", ""); }else{ $("#hname").css("display", "none"); } } ; // Function for close popup function popup_close(){ $(".sai_popup").fadeOut(1000); $(".sai_popup_add").fadeOut(1000); $("#comsg").css("display", "none"); $("#ermsg").css("display", "none"); }; // Function for show popup function show_popup(dbname, dbuser,div_id) { var height = $("#scroller-body").height(); var width = $("#scroller-body").width(); var spanHeight = 50; var spanWidth = 50; var w_l = window.location.toString(); if(w_l.indexOf("#") > 0){ w_l = w_l.substring(0, w_l.indexOf("#")); } $.ajax({ type: "POST", url: w_l+"&editpri=1", data: "dbname="+dbname+"&dbuser="******".sai_popup_add").html(data); }else{ $(".sai_popup_add").html(data); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); if(div_id ==1){ $(".sai_popup_add") .css({ "top" : height/3 - spanHeight/3 }) .css({ "left" : width/2 - spanWidth/2}) .css({ "width" : width/2 + 50}) .fadeIn(500); }else{ $(".sai_popup_add") .css({ "top" : height/3 - spanHeight/3 }) .css({ "left" : width/2 - spanWidth/2}) .css({ "width" : width/2 + 50}) .fadeIn(500); } }; function mod_escape(value) { value = escape(value); return value.replace(/\\+/g, \'%2B\'); } $(document).ready(function(){ $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); // For selecting tab try{ var select_tab = window.location.hash; if(select_tab.length > 0){ $(select_tab+"_a").addClass("selected"); }else{ $("#currentdb_a").addClass("selected"); } }catch(e){} // for adding db $("#submitdb").click(function() { $("#createdb").css("display", ""); var db = ($("#db").val()); var w_l = window.location.toString(); if(w_l.indexOf("#") > 0){ w_l = w_l.substring(0, w_l.indexOf("#")); } $.ajax({ type: "POST", url: w_l+"&submitdb=1&ajaxdb=1", data: "db="+db, // checking for error success: function(data){ $("#createdb").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ $_("db").value=""; var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Done ",msg,2); $("#showdbtab").html(output); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); } if(result == "0"){ $("#createdb").css("display", "none"); var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); // for adding user $("#submituser").click(function() { $("#createuser").css("display", ""); var dbuser = ($("#dbuser").val()); var userpass = ($("#dbpassword").val()); userpass = mod_escape(userpass); var w_l = window.location.toString(); if(w_l.indexOf("#") > 0){ w_l = w_l.substring(0, w_l.indexOf("#")); } $.ajax({ type: "POST", url: w_l+"&submituserdb=1&ajax=1", data: "dbuser="******"&dbpassword="******"#createuser").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ $_("dbuser").value=""; $_("dbpassword").value=""; var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Done ",msg,2); var height = $("#mask").height(); $("#mask").css({ "height" : height + 50 }); chkdbvalue(); $("#showusertab").html(output); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); } if(result == "0"){ $("#createuser").css("display", "none"); var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); //Get the height of the first item $("#mask").css({"height":"100%"}); //Calculate the total width - sum of all sub-panels width //Width is generated according to the width of #mask * total of sub-panels $("#panel").width(parseInt($("#mask").width() * $("#panel div").length)); //Set the sub-panel width according to the #mask width (width of #mask and sub-panel must be same) $("#panel div").width($("#mask").width()); //Get all the links with rel as panel $("a[rel=panel]").click(function () { //Get the height of the sub-panel var panelheight = $($(this).attr("href")).height()+200; //Set class for the selected item $("a[rel=panel]").removeClass("selected"); $(this).addClass("selected"); //Resize the height $("#mask").animate({"height":panelheight},{queue:false, duration:500}); //Scroll to the correct panel, the panel id is grabbed from the href attribute of the anchor $("#mask").scrollTo($(this).attr("href"), 800); //Discard the link default behavior return false; }); }); function chkdbvalue(){ var w_l = window.location.toString(); if(w_l.indexOf("#") > 0){ w_l = w_l.substring(0, w_l.indexOf("#")); } $.ajax({ type: "POST", url: w_l+"&editdb_user=1", success: function(data){ $("#dbtouser_disp").css("display", ""); $("#dbtouser_disp").html(data); }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); } // ]]></script> <center> <div id="scroller-header"> <br /> <a href="#currentdb" rel="panel" class="heading_a" style="text-decoration:none" id="currentdb_a">' . $l['db_headling'] . '</a> <a href="#adddb" rel="panel" class="heading_a" style="text-decoration:none" id="adddb_a">' . $l['db_add_label'] . '</a> <a href="#currentuser" rel="panel" class="heading_a" style="text-decoration:none" id="currentuser_a">' . $l['db_user_add_label'] . '</a> <a href="#dbtouser" rel="panel" class="heading_a" style="text-decoration:none" onclick="chkdbvalue();" id="dbtouser_a">' . $l['user_db_add_label'] . '</a> </div> </center> <br /> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /></br></br>'; echo '<div id="scroller-body" > <div id="mask"> <div id="panel"> <div id="currentdb" height="100%" width="700px"> <center class="sai_tit"><img src="' . $theme['a_images'] . 'database.gif" /> ' . $l['db_headling'] . '</center> <div class="sai_popup_add"></div> <div id="showdbtab">'; showdb(); echo '</div> </div> <div id="adddb" height="100%" width="700px">'; echo '<form accept-charset="' . $globals['charset'] . '" name="importsoftware" method="post" action="" > <center><div class="sai_tit"><img src="' . $theme['a_images'] . 'adddb.gif" alt="" /> ' . $l['db_add_label'] . '</div></center> <br /> <table border="0" cellpadding="8" cellspacing="8" width="90%" align="center" class="sai_divroundshad" sstyle="padding-left:15px; padding-top:15px;" > <tr> <td> <span class="sai_head">' . $l['db_label'] . '</span> </td> <td valign="top"> ' . $db_prefix . '<input type="text" name="db" id="db" size="30" value="' . POSTval('db', '') . '" /> </td> </tr> <tr> <td colspan="2"> <p align="center"><input type="button" class="sai_graybluebut" id="submitdb" style="cursor:pointer" name="submitdb" value="' . $l['submitdb'] . '" /> <img id="createdb" src="' . $theme['images'] . 'progress.gif" style="display:none"></p> </td> </tr> </table> </form></br></br></br> </div>'; echo '<div id="currentuser" width="700px" >'; echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'database.gif" /> ' . $l['db_user_headling'] . '</center> <div id="showusertab">'; showuser(); echo '</div> </div> <div id="dbtouser" width="700px" style="height:800px"> '; echo '<form accept-charset="' . $globals['charset'] . '" name="importsoftware" method="post" action="" > <center><div class="sai_tit"><img src="' . $theme['a_images'] . 'adddb.gif" alt="" /> ' . $l['db_user_create_label'] . '</div></center> <br /> <table border="0" cellpadding="8" cellspacing="8" width="90%" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" > <tr> <td> <span class="sai_head">' . $l['db_user_label'] . '</span> </td> <td valign="top"> ' . $db_prefix . '<input type="text" name="dbuser" id="dbuser" size="23" value="" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['db_user_password'] . '</span> </td> <td valign="top"> <input type="text" name="dbpassword" id="dbpassword" size="30" value="" /> <a href="javascript: void(0);" onclick="$_(\'dbpassword\').value=randstr(8);return false;" title="' . $l['randpass'] . '"><img src="' . $theme['images'] . 'randpass.gif" /></a> </td> </tr> <tr> <td colspan="2"> <p align="center"><input type="button" class="sai_graybluebut" id="submituser" style="cursor:pointer" name="submituserdb" value="' . $l['submituserdb'] . '" /> <img id="createuser" src="' . $theme['images'] . 'progress.gif" style="display:none"></p> </td> </tr> </table> </form> <div id="dbtouser_disp"></div> </div> </div> </div> </div>'; softfooter(); }
function adddomain_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error; global $saved, $aefer; softheader($l['<title>']); echo '<div class="bg"><br />'; echo '<form accept-charset="' . $globals['charset'] . '" name="addadomain" method="post" action="" class="form-horizontal"> <div class="sai_main_head" style="width:100%;" align="center">' . $l['add_domain'] . '</div><hr>'; error_handle($error, '100%'); if (!empty($saved)) { echo '<div class="alert alert-warning"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <center><img src="' . $theme['images'] . 'notice.gif" /> ' . $l['settings_saved'] . '</center> </div>'; } echo '<div class="row"> <div class="col-sm-5"> <label for="domain" class="sai_head">' . $l['domain'] . '</label><br /> <span class="sai_exp2">' . $l['domain_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="domain" id="domain" class="form-control" value="' . POSTval('domain', '') . '" /> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="server_host" class="sai_head">' . $l['server_host'] . '</label> <span class="sai_exp">' . $l['server_host_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="server_host" id="server_host" class="form-control" value="' . POSTval('server_host', '') . '" /> </div> </div><br />'; if (empty($globals['custom_handler'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="protocol" class="sai_head">' . $l['protocol'] . '</label> <span class="sai_exp">' . $l['protocol_exp'] . '</span> </div> <div class="col-sm-7"> <select name="protocol" class="form-control" id="protocol"> <option value="ftp" ' . (isset($_POST['protocol']) && $_POST['protocol'] == 'ftp' ? 'selected="selected"' : '') . '>FTP</option> <option value="ftps" ' . (isset($_POST['protocol']) && $_POST['protocol'] == 'ftps' ? 'selected="selected"' : '') . '>FTPS</option> <option value="sftp" ' . (isset($_POST['protocol']) && $_POST['protocol'] == 'sftp' ? 'selected="selected"' : '') . '>SFTP</option> </select> </div> </div><br />'; } echo ' <div class="row"> <div class="col-sm-5"> <label for="port" class="sai_head">' . $l['port'] . '</label> <span class="sai_exp">' . $l['port_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="port" id="port" class="form-control" value="' . POSTval('port', '') . '" /> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="ftp_user" class="sai_head">' . $l['ftp_user'] . '</label> <span class="sai_exp">' . $l['ftp_user_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="ftp_user" id="ftp_user" class="form-control" value="' . POSTval('ftp_user', '') . '" /> </div> </div><br /> <div class="row" id="ftp_pass"> <div class="col-sm-5"> <label for="ftp_pass" class="sai_head">' . $l['ftp_pass'] . '</label> <span class="sai_exp">' . $l['ftp_pass_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="ftp_pass" id="ftp_pass" class="form-control" value="' . POSTval('ftp_pass', '') . '" /><br /> </div> </div> <div class="row" id="trauthpass"> <div class="col-sm-5"> <label for="auth_password" class="sai_head">' . $l['auth_password'] . '</label> <span class="sai_exp">' . $l['auth_password_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="auth_password" id="auth_password" ' . POSTchecked('auth_password', true) . ' /><br /><br /> </div> </div> <div class="row" id="pub"> <div class="col-sm-5"> <label for="public_key" class="sai_head">' . $l['public_key'] . '</label> <span class="sai_exp">' . $l['public_key_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="public_key" id="public_key" class="form-control" value="' . POSTval('public_key', '') . '" /><br /> </div> </div> <div class="row" id="pri"> <div class="col-sm-5"> <label for="private_key" class="sai_head">' . $l['private_key'] . '</label> <span class="sai_exp">' . $l['private_key_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="private_key" id="private_key" class="form-control" value="' . POSTval('private_key', '') . '" /><br /> </div> </div> <div class="row" id="passphrase"> <div class="col-sm-5"> <label for="passphrase" class="sai_head">' . $l['passphrase'] . '</label> <span class="sai_exp">' . $l['passphrase_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="passphrase" id="passphrase" class="form-control" value="' . POSTval('passphrase', '') . '" /><br /> </div> </div> <div class="row"> <div class="col-sm-5"> <label for="ftp_path" class="sai_head">' . $l['ftp_path'] . '</label><br /> <span class="sai_exp2">' . $l['ftp_path_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="ftp_path" id="ftp_path" class="form-control" value="' . POSTval('ftp_path', '') . '" /> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="backup_path" class="sai_head">' . $l['backup_path'] . '</label><br /> <span class="sai_exp2">' . $l['backup_path_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="backup_path" id="backup_path" class="form-control" value="' . POSTval('backup_path', '') . '" /> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="data_dir" class="sai_head">' . $l['data_dir'] . '</label><br /> <span class="sai_exp2">' . $l['data_dir_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="data_dir" id="data_dir" class="form-control" value="' . POSTval('data_dir', '') . '" /> </div> </div><br /> <br /><br /> <p align="center"> <input class="flat-butt" type="submit" name="add_domain" value="' . $l['submit_add'] . '" /> <br /><br /><br /><br /> <b><a class="sai_head" href="' . $globals['ind'] . 'act=domains">' . $l['show_all_dom'] . '</a></b> </p> </form> </div>'; echo ' <br /><br /> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ $(document).ready(function(){ checkprotocol(); $(\'#auth_password\').change(function(){ if($(this).is(":checked")) { hide_pubkey(); }else{ show_pubkey(); } }); $(\'#protocol\').change(function(){ checkprotocol(); }); }); function checkprotocol(){ if($(\'#protocol\').val() == \'ftp\'){ if($(\'#port\').val() == ""){ $(\'#port\').val(\'21\'); } $(\'#trauthpass\').hide(); hide_pubkey(); ftppath(); } if($(\'#protocol\').val() == \'ftps\'){ if($(\'#port\').val() == ""){ $(\'#port\').val(\'21\'); } $(\'#trauthpass\').hide(); hide_pubkey(); ftppath(); } if($(\'#protocol\').val() == \'sftp\'){ if($(\'#port\').val() == ""){ $(\'#port\').val(\'22\'); } $(\'#trauthpass\').show(); if($(\'#auth_password\').is(":checked")){ hide_pubkey(); }else{ show_pubkey(); } sftppath(); } } function hide_pubkey(){ $(\'#public_key\').prop(\'disabled\', true); $(\'#private_key\').prop(\'disabled\', true); $(\'#pub\').hide(); $(\'#pri\').hide(); $(\'#passphrase\').hide(); $(\'#ftp_pass\').show(); } function show_pubkey(){ $(\'#public_key\').prop(\'disabled\', false); $(\'#private_key\').prop(\'disabled\', false); $(\'#pub\').show(); $(\'#pri\').show(); $(\'#passphrase\').show(); $(\'#ftp_pass\').hide(); } function ftppath(){ $(\'#ftp_path\').html("' . $l['ftp_path'] . '"); $(\'#ftp_path_exp\').html("' . $l['ftp_path_exp'] . '"); $(\'#backup_path_exp\').html("' . $l['backup_path_exp'] . '"); } function sftppath(){ $(\'#ftp_path\').html("' . $l['sftp_path'] . '"); $(\'#ftp_path_exp\').html("' . $l['sftp_path_exp'] . '"); $(\'#backup_path_exp\').html("' . $l['sbackup_path_exp'] . '"); } // ]]></script> <!--<center> <h2>How to Add a Domain</h2> <object width="450" height="345" align="center"> <param name="movie" value="Add Domain"> <embed src="../theme/videos/add_domain/video.swf" width="450" height="345"> </embed> </object> </center>-->'; softfooter(); }
function bandwidth_theme() { global $theme, $globals, $kernel, $user, $l, $bandwidth, $month, $band, $done, $error; // For ajax bandwidth set if (optGET('ajaxband')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { echo '1' . $l['save']; show_band(); return true; } } // For ajax bandwidth Reset if (optGET('ajaxreset')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { echo '1' . $l['reset']; show_band(); return true; } } softheader($l['<title>']); echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'bandwidth.gif" /> ' . $l['heading'] . '</center><br /> <form accept-charset="' . $globals['charset'] . '" action="" method="post" name="bandwidthedit" id="bandwidthedit"> <table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px; "> <tr> <td> <span class="sai_head">' . $l['bandwidth_up_limit'] . '</span><br /> <span class="sai_exp">' . $l['bandwidth_up_limit_exp'] . '</span> </td> <td valign="top"> <input type="text" id="bandwidth_up_limit" name="bandwidth_up_limit" size="30" value="' . POSTval('bandwidth_up_limit', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['bandwidth_limit'] . '</span><br /> <span class="sai_exp">' . $l['bandwidth_limit_exp'] . '</span> </td> <td valign="top"> <input type="text" id="bandwidth_limit" name="bandwidth_limit" size="30" value="' . POSTval('bandwidth_limit', '') . '" /> </td> </tr> <tr> <td colspan="2" align="center"> <input type="hidden" name="bandwidth_record" value="1" /> <input type="submit" style="cursor:pointer" value="' . $l['submit_button'] . '" name="create_record" class="sai_graybluebut" id="submitbandwidth"/> <input type="button" style="cursor:pointer" value="' . $l['reset_button'] . '" name="resetbandwidth" class="sai_graybluebut" id="resetbandwidth"/> <img id="reset_bandwidth" src="' . $theme['images'] . 'progress.gif" style="display:none"> </td> </tr> </table> </from><br ><br > <div id="showband">'; show_band(); echo '</div> <script type="text/javascript" charset="utf-8"><!-- // --><![CDATA[ var message_box = function() { return { show_message: function(title, body , image) { var okbutton = \'<input style="width:75px" class="sai_graybluebut" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); $(document).ready(function(){ // For Setting record $("#submitbandwidth").click(function(){ $("#reset_bandwidth").css("display", ""); var band_alert =$("#bandwidth_limit").val(); $.ajax({ type: "POST", url: window.location+"&ajaxband=1", data: $("#bandwidthedit").serialize(), // Checking for error success: function(data){ $("#reset_bandwidth").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ $_("bandwidth_up_limit").value=""; $_("bandwidth_limit").value=""; var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Done ",msg,2); $("#showband").html(output); if(band_alert){ $("#alert_limit").html(band_alert+" GB"); } server_graph_data(); } if(result == "0"){ var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); return false; }); // For Setting record $("#resetbandwidth").click(function(){ $("#reset_bandwidth").css("display", ""); $.ajax({ type: "POST", url: window.location+"&ajaxreset=1&bandwidth_reset=1", // Checking for error success: function(data){ $("#reset_bandwidth").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Done ",msg,2); $("#showband").html(output); $("#alert_limit").html("' . $l['na'] . '"); server_graph_data(); } if(result == "0"){ var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); return false; }); }); // ]]></script>'; softfooter(); }
function upgrade_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts; global $software, $soft, $info, $settings, $softins, $dbtype, $dbs, $upgraded, $__settings, $setupcontinue, $installations, $notes, $upgradableto; // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } softheader($l['<title>'] . $software['name']); echo ' <div id="install_win">'; //First add the installation info if (empty($upgraded)) { if (!empty($GLOBALS['alreadyupdated'])) { echo ' <form accept-charset="' . $globals['charset'] . '" method="post" name="uprec" id="uprec" action=""> <input type="hidden" name="updaterecord" value="1" /> <div class="alert alert-warning"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <center><a href="javascript:$_(\'uprec\').submit();" style="text-decoration:none;"><img src="' . $theme['images'] . 'notice.gif" /> ' . lang_vars($l['alreadyupdated'], array($GLOBALS['alreadyupdated'], $softins['ver'])) . '</a></center> </div> </form><br />'; } // You may not need an upgrade anymore. if (!empty($GLOBALS['no_update_required'])) { echo ' <div class="alert alert-warning"> <center><img src="' . $theme['images'] . 'notice.gif" /> ' . $l['no_update_required'] . '<center> </div> <br />'; } else { echo ' <div id="fadeout_div"> <form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware"> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(dosubmit){ try{ if(!formcheck() || !checkdbname(\'softdb\', true)){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if(dosubmit == 1){ $_("installsoftware").submit(); } show_msg("' . $l['upgrading'] . '"); } return true; }; var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#installsoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); try{ var sid = 0; sid = $_("softbranch").value; }catch(e){ var sid = 0; } $.ajax({ url: window.location+"&jsnohf=1&softbranch="+sid, type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); //alert(responseText); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); new_theme_funcs_init(); }).delay(50).animate({opacity: 1}, 500,function(){ if($("#setupcontinue_url").length > 0){ $(".third_url").css({"border": "2px solid #FBDB0C", "width":"55%", "padding":"5px"}); alert("' . $l['setup_partial'] . '"); $(".third_url").css({"border-color": "#fff", "transition":"60s"}); } }); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Use the Progress Bar ? var useprog = 1; softemail = new Array(); function softmail(){ try{ var sofdom = "softdomain"; for(x in softemail){ if(softemail[x] == true) continue; var temp = $_(x).value.split("@"); $_(x).value = temp[0] + "@" + $_(sofdom).value; } }catch(e){ return false; } }; ' . (!empty($_POST) ? '' : 'addonload(\'softmail();\');'); echo ' // ]]></script>'; $array_keys = array_keys($upgradableto); echo ' <div class="bg"><br /> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-5 col-xs-5" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-sync fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-7 col-xs-7" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['prog_upgrading'] . $scripts[$array_keys[0]]['name'] . '</div> </div><hr>'; if (empty($globals['lictype']) && !empty($scripts[$soft]['force_scripts'])) { echo '<br /> <div class="alert alert-warning"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <center>' . lang_vars($l['not_in_free'], array($software['name'])) . (!webuzo() ? ' ' . $l['notify_admin'] : '') . '</center> </div>'; } echo error_handle($error, "100%", 0, 1); echo ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['softins_url'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info"><a href="' . $softins['softurl'] . '" target="_blank">' . $softins['softurl'] . '</a></span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['softins_path'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $softins['softpath'] . '</span> </div> </div><br />'; if (!empty($scripts[$softins['sid']]['parent']) && count($array_keys) >= 2) { echo ' <div class="row"> <div class="col-sm-5"> <label for="softbranch" class="sai_head">' . $l['select_version'] . '</label> </div> <div class="col-sm-7"> <select name="softbranch" id="softbranch" class="form-control" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($upgradableto as $uk => $uv) { echo '<option value=' . $uk . '>' . $uv . '</option>'; } echo ' </select> </div> </div>'; } if (empty($globals['disable_backup_upgrade'])) { echo ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['create_backup'] . '</label> <span class="sai_exp2">' . $l['create_backup_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="create_backup" id="create_backup" ' . POSTchecked('create_backup') . ' /> </div> </div>'; } if (!empty($settings)) { if (file_exists($software['path'] . '/upgrade.js')) { echo '<script language="javascript" type="text/javascript"><!--// --><![CDATA['; echo @parselanguages(str_replace('$(', '$_(', implode('', file($software['path'] . '/upgrade.js')))); echo '// ]]></script>'; } foreach ($settings as $group => $sets) { if ($group == 'hidden') { continue; } echo '<br /><br /> <div class="bg"> <div class="sai_sub_head">' . $group . '</div><hr>'; foreach ($sets as $sk => $sv) { // Add class form-control if (preg_match('/type="text"/is', $sv['tag'])) { $sv['tag'] = preg_replace('/>/is', ' class="form-control">', $sv['tag']); } if (preg_match('/<select/is', $sv['tag'])) { $sv['tag'] = preg_replace('/<select/is', '<select class="form-control"', $sv['tag']); } echo ' <div class="row"> <div class="col-sm-5"> <label for="dbusername" class="sai_head">' . $sv['head'] . '</label> ' . (empty($sv['exp']) ? '' : '<br /><span class="sai_exp">' . $sv['exp'] . '</span>') . ' </div> <div class="col-sm-7"> ' . $sv['tag'] . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : '') . ' </div> </div>'; } echo ' </div><br /><!---end of bg class--->'; } //The Hidden groups if (!empty($settings['hidden'])) { foreach ($settings['hidden'] as $sk => $sv) { echo $sv['tag'] . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : ''); } } } //End of if($settings) //Is it a SOFTCOPY, then Leave a NOTE if (!empty($setupcontinue)) { echo '<br /><br /> <div class="row" style="padding-left:15px;"> <span class="sai_info">' . $l['softcopy_note'] . '</span> </div><br />'; } echo ' <div class="row" style="padding-left:15px;"> <span class="sai_info">' . lang_vars($l['note_backup'], array($softins['insid'])) . '</span> </div><br />'; if (count($array_keys) < 2) { echo ' <div class="row" style="padding-left:15px;"> <span class="sai_info">' . $l['upgrading_to'] . '<b>' . (!empty($scripts[$array_keys[0]]['name']) ? $scripts[$array_keys[0]]['name'] : $iscripts[$array_keys[0]]['name']) . '</b>, ' . $l['version'] . ' : <b>' . (!empty($scripts[$array_keys[0]]['version']) ? $scripts[$array_keys[0]]['version'] : $iscripts[$array_keys[0]]['ver']) . '</b></span> </div><br />'; } echo ' <p align="center"> <input type="hidden" name="softsubmit" id="softsubmit" value="' . $l['softsubmit'] . '" /> <input type="submit" name="softsubmitbut" class="flat-butt" id="softsubmitbut" value="' . $l['softsubmit'] . '" /><span id="show_txt" style="display:none;"></span> </p><br /><br /> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> <center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /><br /> </div><br /><!--end of bg class--> </form> </div> <div id="progress_bar" style="display: none; width: 100%;"> <br /> <div class="bg"> <center> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-5 col-xs-5" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-sync fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-7 col-xs-7" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['prog_upgrading'] . $scripts[$array_keys[0]]['name'] . '</div> </div> <br /> <font size="4" color="#222222" id="progress_txt" style="width: 100%;">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444; width: 100%;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;background-color:#efefef; width: 50%;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> <br /><center>' . $l['wait_note'] . '</center> <br /><br /> </div><!--end of bg class--> </div><br /><br />'; } } elseif (!empty($upgraded)) { $tmp_admiurl = $__settings['softurl'] . '/' . (!empty($softins['admin_folder']) ? $softins['admin_folder'] : $software['adminurl']); echo ' <div class="bg"> <div class="third_url"><h4>' . (!empty($setupcontinue) ? $l['setup_partial'] . '</h4><div id="setupcontinue_url" style="display:none;"></div> ' . $l['finish_update'] . '<br /> <a href="' . $__settings['softurl'] . '/' . $setupcontinue . '" target="_blank">' . $__settings['softurl'] . '/' . $setupcontinue . '</a></div><br />' : $l['congrats'] . '</h4>') . '<br /> ' . (!empty($setupcontinue) ? lang_vars($l['finish_up_sucess'], array($software['name'])) : $software['name'] . ' ' . $l['succesful']) . ' : <br /> <a href="' . $__settings['softurl'] . '" target="_blank">' . $__settings['softurl'] . '</a> ' . (!empty($software['adminurl']) ? '<br />' . $l['admin_url'] . ' : <a href="' . $tmp_admiurl . '" target="_blank">' . $tmp_admiurl . '</a>' : '') . '<br /><br /> ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['upgrade_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $softins['insid'] . '&postact=upgrade">' . $l['return'] . '</a></b></center><br /><br />'; if (empty($globals['upgrade_tweet_off']) || empty($globals['lictype'])) { echo ' <form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <div class="panel panel-info" style="width:55%; margin:0 auto;"> <div class="panel-heading" style="padding:5px;"> <font size="+1"><b>' . $l['upgrade_tweet_sub'] . ' :</b></font> </div> <div class="panel-body"> <div class="row"> <div class="col-sm-10"> <textarea name="text" cols="80" row="3" style="resize:none; width:100%;">' . loadtweetdata('upgrade_tweet', $l['upgrade_tweet']) . '</textarea> </div> <div class="col-sm-2 col-xs-2"> <input type="submit" value="Tweet!" class="btn btn-info" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/> </div> </div> </div> </div> </form>'; } echo ' </div><!--end of bg class--><!--PROC_DONE--> <br /><br /><br /><br />'; } echo ' </div>'; softfooter(); }
function publish_theme() { global $theme, $globals, $softpanel, $user, $l, $error, $iscripts, $scripts, $insid, $software, $p, $configure, $_chmod, $done, $soft; // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); if (is_array($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } softheader($l['<title>']); echo '<center class="sai_tit"><img src="' . $theme['images'] . 'publish_dp.gif" /> ' . $l['header'] . '</center> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br /> <div id="entire_win">'; if (!empty($done)) { echo '<div class="sai_notice"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['done'] . '</div><br /> ' . lang_vars($l['succesful'], array($software['name'])) . ' : <br /> <a href="' . $p->settings['new_softurl'] . '" target="_blank">' . $p->settings['new_softurl'] . '</a> ' . (!empty($software['adminurl']) ? '<br />' . $l['admin_url'] . ' : <a href="' . $p->settings['new_softurl'] . '/' . $software['adminurl'] . '" target="_blank">' . $p->settings['new_softurl'] . '/' . $software['adminurl'] . '</a>' : '') . '<br /><br /> ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['publish_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<!--PROC_DONE-->'; } else { echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(dosubmit){ $_("softsubmitbut").disabled = true; //return true; // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted directly return false; }; var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#entire_win", progress_div: "#progress_bar", formid: "#publishins", frequency: 3000, current: function(){ try{ return Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(3, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); $.ajax({ url: window.location+"&jsnohf=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; // ]]></script> <div id="progress_bar" style="height:125px; display: none;"> <br /><br /> <center> <font size="4" color="#222222" id="progress_txt">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> </div> <div id="fadeout_div">'; error_handle($error, '100%'); echo '<form accept-charset="' . $globals['charset'] . '" name="publishins" id="publishins" method="post" action="" onsubmit="return checkform();"> <table border="0" cellpadding="8" cellspacing="0" width="100%"> <tr> <td width="40%"> <span class="sai_head">' . $l['choose_account'] . '</span><br /> <span class="sai_exp">' . $l['choose_account_exp'] . '</span> </td> <td> <select name="remid" id="remid">'; foreach ($user['remote'] as $k => $v) { echo '<option value="' . $k . '" ' . POSTselect('remid', $k) . '>' . $v['domain_name'] . '</option>'; } echo '</select> </td> </tr>'; $defaultdir = basename($user['ins'][$insid]['softpath']); // Is it the home folder of a domain ? foreach ($softpanel->domainroots as $k => $v) { if (strtolower(cleanpath($user['ins'][$insid]['softpath'])) == strtolower(cleanpath($v))) { $defaultdir = ''; } } echo '<tr> <td> <span class="sai_head">' . $l['dir'] . '</span><br /> <span class="sai_exp">' . $l['dir_exp'] . '</span> </td> <td> <input type="text" name="dir" id="dir" size="30" value="' . POSTval('dir', $defaultdir) . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['password'] . '</span><br /> <span class="sai_exp">' . $l['password_exp'] . '</span> </td> <td> <input type="password" name="password" id="password" size="30" value="' . POSTval('password', '') . '" /> </td> </tr> </table> <p align="center"> <input type="hidden" name="publishins" id="publishins" value="' . $l['publishins'] . '" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" value="' . $l['publishins'] . '" class="sai_graybluebut" /> </p> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> </form> </div>'; } echo '</div> <br /><br /><br /> <center><b><a href="' . script_link($soft) . '">' . $l['return'] . '</a></b></center>'; softfooter(); }
function email_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $saved; // For email settings if (optGET('ajax_email')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($saved)) { echo '1' . $l['settings_saved']; return true; } } softheader($l['<title>']); echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var message_box = function(){ return { show_message: function(title, body , image) { var okbutton = \'<input style="width:75px; margin-top:5px; background:#00A0D2; color:#FFF;" class="sai_submit" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="30%" > \'+ img + \'</td><td width="70%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="30%">\'+ img + \'</td><td widt="70%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); $(document).ready(function(){ // For email settings $("#editform").submit(function(){ $("#create_email").css("display", ""); $.ajax({ type: "POST", url: window.location+"&ajax_email=1", data: $("#editform").serialize(), // Checking for error success: function(data){ $("#create_email").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ var msg = data.substring(1); message_box.show_message( "Done ",msg,2); } if(result == "0"){ var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error", "Oops ... the connection was lost", 1); } }); return false; }); }); // ]]></script>'; echo '<form accept-charset="' . $globals['charset'] . '" name="editemailsettings" method="post" action="" id="editform" class="form-horizontal"> <div class="bg"><br /> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-6 col-xs-5" style="padding:0px 10px 0 0; text-align:right;"> <i class="fa sai-mail fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-6 col-xs-7" style="padding-top:5px; padding-left:0px; text-align:left;">' . $l['emailsettings'] . '</div> </div><hr>'; error_handle($error); if (!empty($saved)) { echo '<div class="alert alert-success">' . $l['settings_saved'] . '</div>'; } echo ' <div class="row"> <div class="col-sm-5"> <label for="email" class="sai_head">' . $l['email_address'] . '</label> <span class="sai_exp">' . $l['email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" id="email" name="email" class="form-control" size="30" value="' . POSTval('email', $user['email']) . '" softmail="true"> </div> </div><br /><!---row end--->'; // If admin has disabled installation email than dont show. if (empty($globals['off_install_mail'])) { echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['ins_email'] . '</label> <span class="sai_exp">' . $l['ins_email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="ins_email" name="ins_email" ' . POSTchecked('ins_email', $user['ins_email']) . ' /> </div> </div><br />'; } // If admin has disabled remove email than dont show. if (empty($globals['off_remove_mail'])) { echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['rem_email'] . '</label> <span class="sai_exp">' . $l['rem_email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="rem_email" name="rem_email" ' . POSTchecked('rem_email', $user['rem_email']) . ' /> </div> </div><br />'; } // If admin has disabled edit email than dont show. if (empty($globals['off_edit_mail'])) { echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['editdetail_email'] . '</label> <span class="sai_exp">' . $l['editdetail_email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="editdetail_email" name="editdetail_email" ' . POSTchecked('editdetail_email', $user['editdetail_email']) . ' /> </div> </div><br />'; } // If admin has disabled backup email than dont show. if (empty($globals['off_backup_mail']) && empty($globals['disable_backup_restore'])) { echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['backup_email'] . '</label> <span class="sai_exp">' . $l['backup_email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="backup_email" name="backup_email" ' . POSTchecked('backup_email', $user['backup_email']) . ' /> </div> </div><br />'; } // Restore email settings if (empty($globals['off_restore_mail'])) { echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['restore_email'] . '</label> <span class="sai_exp">' . $l['restore_email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="restore_email" name="restore_email" ' . POSTchecked('restore_email', empty($user['disable_restore_email']) ? 1 : 0) . ' /> </div> </div><br />'; } // Clone email settings if (empty($globals['off_clone_mail'])) { echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['clone_email'] . '</label> <span class="sai_exp">' . $l['clone_email_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="clone_email" name="clone_email" ' . POSTchecked('clone_email', empty($user['disable_clone_email']) ? 1 : 0) . ' /> </div> </div><br />'; } echo '<div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['disable_all_notify_update'] . '</label> <span class="sai_exp">' . $l['disable_all_notify_update_exp'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" id="disable_all_notify_update" name="disable_all_notify_update" ' . POSTchecked('disable_all_notify_update', $user['disable_all_notify_update']) . ' /> </div> </div><br /> <p align="center"> <input type="hidden" name="editemailsettings" value="1" /> <input type="submit" name="editsubmit" value="' . $l['edit_settings'] . '" class="flat-butt" /> <br /><img id="create_email" src="' . $theme['images'] . 'progress.gif" style="display:none"> </p> </form> </div><br /><!--end of bg class-->'; softfooter(); }
function import_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts; global $software, $soft, $info, $settings, $softins, $dbtype, $dbs, $imported, $__settings, $setupcontinue, $installations, $notes, $protocols, $ajaxhttpsexists, $ajaxhttps; if (!empty($ajaxhttps)) { echo $ajaxhttpsexists; return true; } softheader($l['<title>'] . $software['name']); //First add the installation info if (empty($imported)) { echo ' <link rel="stylesheet" type="text/css" href="' . $theme['url'] . '/spectrum.css?' . $GLOBALS['globals']['version'] . '" /> <form accept-charset="' . $globals['charset'] . '" name="importsoftware" method="post" action="" onsubmit="return checkform();" class="form-horizontal"> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkhttps(proto_id, softdomain_id, alrt){ try{ var id = $_(proto_id); var proto = id.options[id.selectedIndex].text; $("#checkhttps_wait").css("display","inline-block"); if(proto.indexOf("https") !== -1){ $.ajax({ type: "POST", url: "' . $globals['index'] . 'act=import&soft=' . $soft . '&checkhttps="+encodeURIComponent(proto+$_(softdomain_id).value), timeout:10000, // Checking for error success: function(data){ $("#checkhttps_wait").css("display","none"); is_https(data); }, error: function(jqXHR, status, e) { $("#checkhttps_wait").css("display","none"); is_https(e); return false; } }); //AJAX("' . $globals['index'] . 'act=import&soft=' . $soft . '&checkhttps="+id.options[id.selectedIndex].text+$_(softdomain_id).value, "is_https(re)"); }else{ $("#checkhttps_wait").css("display","none"); is_https("true"); } if(alrt == true){ alert(proto+$_(softdomain_id).value); } }catch(e){ // } return true; }; function is_https(re){ try{ httpserror = ""; //Check if it exists if(re !== "true"){ httpserror = "' . $l['no_https'] . '"; } if(httpserror != ""){ $_("httpserror").style.display = "block"; $_("httpserror").innerHTML = httpserror; return false; }else{ $_("httpserror").style.display = "none"; } }catch(e){ // } return true; }; // ]]></script> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(){ try{ if(!formcheck() || !checkdbname(\'softdb\', true)){ return false; } }catch(e){ //Do nothing } return true; };'; echo ' // ]]></script>'; echo ' <div class="bg"><br /> <center><div class="sai_main_head" style="width:100%;"><img src="' . $globals['mirror_images'] . 'top15/48/' . $scripts[$soft]['softname'] . '.png" > ' . $l['import_soft'] . ' - ' . $software['name'] . '</div></center><hr>'; error_handle($error, "100%"); if (empty($softpanel->noprotocol) && empty($globals['hide_protocol'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="softproto" class="sai_head">' . $l['choose_protocol'] . '</label> <span class="sai_exp">' . $l['choose_protocol_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softproto" id="softproto" class="form-control" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($protocols as $k => $v) { echo '<option value="' . $k . '" ' . (optPOST('softproto') == $k || $globals['default_protocol'] == $k && empty($_POST['softproto']) ? 'selected="selected"' : '') . '>' . $v . '</option>'; } echo ' </select> <div style="display:none;" id="checkhttps_wait"> <img src="' . $theme['images'] . 'progress.gif" alt="please wait.."></div><br /> <div class="row"> <div class="col-sm-12"> <span id="httpserror" style="display:none; font-size:12px; padding:10px;" class="alert alert-danger"></span> </div> </div> </div> </div>'; } echo ' <div class="row"> <div class="col-sm-5"> <label for="softdomain" class="sai_head">' . $l['choose_domain'] . '</label> <span class="sai_exp">' . $l['choose_domain_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softdomain" id="softdomain" class="form-control" onchange="softmail();" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($softpanel->domainroots as $domain => $dompath) { echo '<option value="' . $domain . '" ' . (!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain ? 'selected="selected"' : '') . '>' . $domain . '</option>'; } // For PERL Append /cgi-bin/ in front of textbox $perl = $iscripts[$soft]['type'] == 'perl' ? empty($softpanel->user['cgi-bin']) ? '' : $softpanel->user['cgi-bin'] : ''; echo ' </select> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="softdirectory" class="sai_head">' . $l['in_directory'] . '</label><br /> <span class="sai_exp2">' . $l['in_directory_exp'] . '</span> </div> <div class="col-sm-7"> <span style="font-size: 14px; color: #555;">' . (!empty($perl) ? $perl . '/' : '') . '</span><input type="text" name="softdirectory" id="softdirectory" class="form-control" size="30" value="' . POSTval('softdirectory', '') . '" /> </div> </div><br /> <p align="center"> <input type="submit" class="flat-butt" name="softsubmit" value="' . $l['softsubmit'] . '"/><br /><img id="waiting" src="' . $theme['images'] . 'progress.gif" style="display:none"> </p><br /> <center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /> </div><!--end of bg class--><br /> </form><br /><br />'; } elseif (!empty($imported)) { // Does the user have custom admin url for their installation $software['adminurl'] = !empty($__settings['admin_folder']) ? $__settings['admin_folder'] : @$software['adminurl']; echo ' <div class="bg"><h4>' . $l['congrats'] . '</h4><br /> ' . $software['name'] . ' ' . $l['succesful'] . ' : <br /> <a href="' . $__settings['softurl'] . '" target="_blank">' . $__settings['softurl'] . '</a> ' . (!empty($software['adminurl']) ? '<br />' . $l['admin_url'] . ' : <a href="' . $__settings['softurl'] . '/' . $software['adminurl'] . '" target="_blank">' . $__settings['softurl'] . '/' . $software['adminurl'] . '</a>' : '') . '<br /><br /> ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['import_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . ' <br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $__settings['insid'] . '&postact=import" class="sai_head">' . $l['return'] . '</a></b></center> </div><!--end of bg class-->'; } softfooter(); }
function software_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $allcatwise; global $software, $soft, $info, $settings, $init_tab, $dbtype, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $cron, $datadir, $ajaxdb, $ajaxdbexists, $overwrite_option, $protocols, $nopackage, $can_publish, $not_default, $child, $install_option, $multi_ver, $child_sids, $installation_keys, $no_autoupgrade, $ajaxhttpsexists, $ajaxhttps, $new_insid, $pfx_error, $owned_themes; if (optGET('notify')) { get_softaculous_file('http://www.softaculous.com/notifyversion.php?softid="' . $soft . '"'); echo 1; return true; } if (optGET('ajaxdownload') && !empty($nopackage)) { // Try to download the package if (method_exists($softpanel, 'updatesoftwares')) { $softpanel->updatesoftwares($soft, 0, 0, 1); echo 1; return true; } // False call echo 0; return false; } // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } // If generate order call if (optGET('generate_order')) { $order_id = get_softaculous_file($globals['apipfx'] . 'fetch.php?apikey=' . $user['pfxapi_key'] . '&email=' . $user['email'] . '&pid=' . optGET('theme_id') . '&giveinfo=generate_order&index=' . rawurlencode($globals['index'])); echo json_encode($order_id); return true; } if (!empty($ajaxdb)) { echo $ajaxdbexists; return true; } if (!empty($ajaxhttps)) { echo $ajaxhttpsexists; return true; } // Auto Installation responses if (isset($_GET['autoinstall'])) { // Installed successfully if (!empty($installed)) { echo 'installed'; return true; } // Are there errors if (!empty($error)) { echo serialize($error); return false; } } $multi_ver = optGET('multi_ver'); if (!empty($multi_ver)) { $init_tab = "install"; } //First add the installation info if (empty($installed)) { $random_username = true; // This is to see if a script has predefined username and cannot be changed foreach ($settings as $ik => $iv) { if ($ik == 'hidden') { continue; } foreach ($iv as $ikk => $ivv) { if ($ikk == 'admin_username' && preg_match('/disabled=\\"disabled\\"/ie', $ivv['tag'])) { $random_username = false; } } } $info['install'] = '<div id="fadeout_div"><form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware" class="form-horizontal">'; if (empty($globals['lictype']) && !empty($scripts[$soft]['force_scripts'])) { $info['install'] .= '<center class="alert alert-warning">' . lang_vars($l['not_in_free'], array($software['name'])) . (!webuzo() ? ' ' . $l['notify_admin'] : '') . '</center>'; } $info['install'] .= error_handle($error, "100%", 0, 1) . '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function selectversion(){ var v = 0; v = $_("softbranch").value; $("#multiver_wait").css("display",""); $.ajax({ type: "POST", url: "' . $globals['index'] . 'act=software&soft="+v+"&tab=install&multi_ver=1&jsnohf=1", // Checking for error success: function(data){ $("#multiver_wait").css("display","none"); var $response=$(data); //query the jq object for the values var output = $response.find("#install_win").html(); $("#install_win").html(output); softmail(); show_backup(); check_pass_strength(); ' . (!empty($globals['random_pass']) ? '$("#admin_pass").val(randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . '));check_pass_strength();' : '') . (!empty($globals['random_username']) && !empty($random_username) ? '$("#admin_username").val(randstr(5));' : '') . (!empty($globals['empty_username']) && !empty($random_username) ? '$("#admin_username").val("");' : '') . (!empty($globals['admin_prefix']) && !empty($random_username) && empty($globals['random_username']) && empty($globals['empty_username']) ? 'prepend_prefix(\'' . $globals['admin_prefix'] . '\');' : '') . (!empty($globals['empty_pass']) ? '$("#admin_pass").val("");check_pass_strength();' : '') . ' }, error: function(data) { //alert(data.description); return false; } }); } function toggle_advoptions(ele){ //alert("#"+ele); if ($("#"+ele).is(":hidden")){ $("#"+ele).slideDown("slow"); $("#"+ele+"_toggle_plus").attr("src", "' . $theme['images'] . 'minus_new.gif"); } else{ $("#"+ele).slideUp("slow"); $("#"+ele+"_toggle_plus").attr("src", "' . $theme['images'] . 'plus_new.gif"); } } function plus_onmouseover(ele){ $("#"+ele.id+"_plus").attr("src", "' . $theme['images'] . 'plus_hover.gif"); } function plus_onmouseout(ele){ $("#"+ele.id+"_plus").attr("src", "' . $theme['images'] . 'plus.gif"); } function display_pass_strength(score, per){ var lang; //disp_per = $("#pass-strength-hidden").val(); if(typeof per == "undefined") per = 0; if(score == "bad") lang = "' . $l['bad'] . '"; if(score == "good") lang = "' . $l['good'] . '"; if(score == "strong") lang = "' . $l['strong'] . '"; if(score == "short") lang = "' . $l['short'] . '"; if(score == "strength_indicator") lang = "' . $l['strength_indicator'] . '"; $("#pass-strength-result").addClass(score).html( lang+" ("+per+"/100)" ); } function checkform(dosubmit){ // If admin has set the password strength than only we will check for it. ' . (!empty($globals['pass_strength']) ? ' //alert($("#pass-strength-hidden").val()); if(parseInt($("#pass-strength-hidden").val()) < ' . $globals['pass_strength'] . '){ alert("' . $l['err_pass_strength'] . '"+' . $globals['pass_strength'] . '); return false; }' : '') . ' try{ if(!formcheck()){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(!get_package()){ return false; } if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if(dosubmit == 1){ $_("installsoftware").submit(); } show_msg("' . $l['installing'] . '"); } return true; }; var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#installsoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); try{ var sid = $_("softbranch").value; }catch(e){ var sid = ' . $soft . ' } $.ajax({ url: window.location+"&jsnohf=1&soft="+sid+"&multi_ver=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); show_backup(); check_pass_strength(); new_theme_funcs_init(); if($("#theme_div").length != 0){ theme_init(); } }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Is the package there ? var nopackage = ' . (empty($nopackage) ? 0 : 1) . '; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } function get_package(){ if(nopackage){ show_msg("' . $l['downloading'] . '"); try{ AJAX("' . $globals['index'] . 'act=software&soft=' . $soft . '&ajaxdownload=1&random="+Math.random(), "get_package_handle(re)"); }catch(e){ } return false; }else{ $_("show_txt").style.display = "none"; return true; } }; function get_package_handle(resp){ nopackage = 0; show_msg("' . $l['installing'] . '"); checkform(1); }; softemail = new Object(); function softmail(){ try{ var sofdom = "softdomain"; for(x in softemail){ if(softemail[x] == true) continue; var temp = $_(x).value.split("@"); if($_(sofdom).value.indexOf("/") > 0){ var dom_value = $_(sofdom).value.substring(0, $_(sofdom).value.indexOf("/")); }else{ var dom_value = $_(sofdom).value; } $_(x).value = temp[0] + "@" + dom_value; } }catch(e){ return false; } }; function checkhttps(proto_id, softdomain_id, alrt){ try{ var id = $_(proto_id); var proto = id.options[id.selectedIndex].text; $("#checkhttps_wait").css("display","inline-block"); if(proto.indexOf("https") !== -1){ $.ajax({ type: "POST", url: "' . $globals['index'] . 'act=software&soft=' . $soft . '&checkhttps="+encodeURIComponent(proto+$_(softdomain_id).value), timeout:10000, // Checking for error success: function(data){ $("#checkhttps_wait").css("display","none"); is_https(data); }, error: function(jqXHR, status, e) { $("#checkhttps_wait").css("display","none"); is_https(e); return false; } }); //AJAX("' . $globals['index'] . 'act=software&soft=' . $soft . '&checkhttps="+id.options[id.selectedIndex].text+$_(softdomain_id).value, "is_https(re)"); }else{ $("#checkhttps_wait").css("display","none"); is_https("true"); } if(alrt == true){ alert(proto+$_(softdomain_id).value); } }catch(e){ // } return true; }; function is_https(re){ try{ httpserror = ""; //Check if it exists if(re !== "true"){ httpserror = "' . $l['no_https'] . '"; } if(httpserror != ""){ $_("httpserror").style.display = "block"; $_("httpserror").innerHTML = httpserror; return false; }else{ $_("httpserror").style.display = "none"; } }catch(e){ // } return true; }; function prepend_prefix(prefix){ // Decide prefix USERNAME, DOMAIN OR USER DEFINED if(prefix != "" && prefix == "username") prefix = "' . $softpanel->user['name'] . '"; if(prefix != "" && prefix == "domain") prefix = "' . current(array_keys($softpanel->domainroots)) . '"; if(prefix != "" && prefix != "domain" && prefix != "username"); // APPEND OLD USERNAME OR DEFAULT USERNAME var old = $_("admin_username").value temp = $_("admin_username").value.split("-"); if (typeof temp[1] == \'string\' || temp[1] instanceof String){ $_("admin_username").value = prefix+"-"+temp[1]; }else{ $_("admin_username").value = prefix+"-"+old; } } function change_admin_prefix(domain){ var admin_prefix = \'' . $globals['admin_prefix'] . '\'; var random_username = \'' . (!empty($random_username) ? 'true' : '') . '\'; var empty_username = \'' . (empty($globals['empty_username']) ? 'true' : '') . '\'; var gl_random_username = \'' . (empty($globals['random_username']) ? 'true' : '') . '\'; if(admin_prefix == "domain" && random_username == "true" && empty_username == "true" && gl_random_username == "true"){ prepend_prefix(domain); } } // show/hide backup options function show_backup(){ var auto_backup = $("#auto_backup").val(); if(auto_backup == 0){ $("#auto_backup_rotation").attr("disabled", true); }else{ $("#auto_backup_rotation").attr("disabled", false); } return true; }; ' . (!empty($_POST) ? '' : 'addonload(\'softmail();show_backup();\');'); if (!empty($dbtype)) { $info['install'] .= 'function checkdbname(id, alrt){ try{ AJAX("' . $globals['index'] . 'act=software&soft=' . $soft . '&checkdbexists="+$_(id).value, "dbexists(\'"+id+"\', "+alrt+", re)"); }catch(e){ // } return true; }; function dbexists(id, alrt, re){ try{ dberror = ""; //Is the length fine if($_(id).value.length > ' . (empty($softpanel->maxdblen) ? 7 : $softpanel->maxdblen) . '){ dberror = "' . $l['db_name_long'] . '"; } //There should be only alphanumeric characters if(/[^a-zA-Z0-9]/.test($_(id).value) && !' . aefer() . '0){ dberror = "' . $l['db_alpha_num'] . '"; } //Check if it exists if(re == "true"){ dberror = "' . $l['database_exists'] . '"; } if(dberror != ""){ $_(id+"error").style.display = "block"; $_(id+"error").innerHTML = dberror; if(alrt == true){ alert(dberror); } return false; }else{ $_(id+"error").style.display = "none"; } }catch(e){ // } return true; };'; } //End of if($dbtype) $info['install'] .= '// ]]></script>'; $info['install'] .= ' <div class="bg"> <div class="sai_sub_head">' . $l['setup'] . '</div><hr>'; if (count($software['branch']) > 1) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="softbranch" class="sai_head">' . $l['choose_version'] . '</label><br /> <span class="sai_exp2">' . $l['choose_version_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softbranch" class="form-control" id="softbranch" onchange="selectversion()" style="display:inline-block;">'; foreach ($software['branch'] as $ck => $cv) { $info['install'] .= '<option value=' . $ck . ' ' . ($cv['ver'] == $software['ver'] ? 'selected="selected"' : '') . '>' . $cv['ver'] . '</option>'; } $info['install'] .= ' </select><div style="display:none;" id="multiver_wait"><img src="' . $theme['images'] . 'progress.gif" alt="please wait.."></div> </div> </div><br />'; } if (empty($softpanel->noprotocol) && empty($globals['hide_protocol'])) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="softproto" class="sai_head">' . $l['choose_protocol'] . '</label><br /> <span class="sai_exp2">' . $l['choose_protocol_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softproto" class="form-control" id="softproto" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($protocols as $k => $v) { $info['install'] .= '<option value="' . $k . '" ' . (optPOST('softproto') == $k || $globals['default_protocol'] == $k && empty($_POST['softproto']) ? 'selected="selected"' : '') . '>' . $v . '</option>'; } $info['install'] .= '</select><div style="display:none;" id="checkhttps_wait"> <img src="' . $theme['images'] . 'progress.gif" alt="please wait.."></div><br /> <div class="row"> <span id="httpserror" style="display:none; padding:10px;" class="alert alert-danger"></span> </div> </div> </div>'; } $info['install'] .= ' <div class="row"> <div class="col-sm-5">'; $info['install'] .= ' <label for="softdomain" class="sai_head">' . $l['choose_domain'] . '</label><br /> <span class="sai_exp2">' . $l['choose_domain_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softdomain" class="form-control" id="softdomain" onchange="softmail();change_admin_prefix(this.value);" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; if (!empty($globals['blank_domain'])) { $info['install'] .= '<option value="" ' . (empty($_POST['softdomain']) ? 'selected="selected"' : '') . '>(' . $l['select_domain'] . ')</option>'; } foreach ($softpanel->domainroots as $domain => $dompath) { $info['install'] .= '<option value="' . $domain . '" ' . (!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain ? 'selected="selected"' : '') . '>' . $domain . '</option>'; } $info['install'] .= ' </select> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="softdirectory" class="sai_head">' . $l['in_directory'] . '</label><br /> <span class="sai_exp2">' . $l['in_directory_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="softdirectory" class="form-control" id="softdirectory" size="30" value="' . POSTval('softdirectory', !empty($globals['no_prefill']) ? '' : $software['softname']) . '" /> </div> </div><br />'; if (!empty($datadir)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="datadir" class="sai_head">' . $l['datadir'] . '</label><br /> <span class="sai_exp2">' . $l['datadir_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="datadir" class="form-control" id="datadir" size="30" value="' . POSTval('datadir', $datadir) . '" /> </div> </div><br />'; } if (!empty($dbtype)) { $dbname = mysqldbname($software['softname']); if (method_exists($softpanel, 'mysqldbname')) { $dbname = $softpanel->mysqldbname(); } // This is default $dbhost = 'localhost'; // Don't prefill database details if (!empty($globals['no_prefill_db'])) { $dbname = ''; $dbhost = ''; } if (aefer()) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="softdb" class="sai_head">' . $l['database_name'] . '</label><br /> <span class="sai_exp2">' . $l['database_name_exp_aefer'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="softdb" class="form-control" id="softdb" size="30" value="' . POSTval('softdb', $dbname) . '" onblur="checkdbname(\'softdb\', false)" /> <span id="softdberror" style="background: #FDB3B3; display:none; width:200px;"></span> </div> </div><br />'; } if (!empty($softpanel->no_db_create)) { // Database Username $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['dbusername'] . '</label><br /> <span class="sai_exp2">' . $l['dbusername_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="dbusername" class="form-control" id="dbusername" size="30" value="' . POSTval('dbusername', '') . '" /> </div> </div><br />'; // Database Password $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['dbuserpass'] . '</label><br /> <span class="sai_exp2">' . $l['dbuserpass_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="dbuserpass" class="form-control" id="dbuserpass" size="30" value="' . POSTval('dbuserpass', '') . '" /> </div> </div><br />'; //Database Host Name $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="hostname" class="sai_head">' . $l['hostname'] . '</label><br /> <span class="sai_exp2">' . $l['hostname_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="hostname" class="form-control" id="hostname" size="30" value="' . POSTval('hostname', $dbhost) . '" /> </div> </div><br /> '; } } // Are there any cron jobs if (!empty($cron)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <span class="sai_head">' . $l['cron_job'] . '</span><br /> <span class="sai_exp2">' . $l['cron_job_exp'] . '</span> </div> <div class="col-sm-7"> <div class="row"> <div class="col-sm-2"> <span>' . $l['cron_min'] . '</span> <input type="text" class="form-control" name="cron_min" id="cron_min" size="2" value="' . POSTval('cron_min', $cron['min']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_hour'] . '</span> <input type="text" class="form-control" name="cron_hour" id="cron_hour" size="2" value="' . POSTval('cron_hour', $cron['hour']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_day'] . '</span> <input type="text" class="form-control" name="cron_day" id="cron_day" size="2" value="' . POSTval('cron_day', $cron['day']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_month'] . '</span> <input type="text" class="form-control" name="cron_month" id="cron_month" size="2" value="' . POSTval('cron_month', $cron['month']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_weekday'] . '</span> <input type="text" class="form-control" name="cron_weekday" id="cron_weekday" size="2" value="' . POSTval('cron_weekday', $cron['weekday']) . '" /> </div> </div> </div> </div><br />'; } if (!empty($overwrite_option)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <span class="sai_head">' . $l['overwrite'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="overwrite_existing" id="overwrite_existing" /> </div> </div>'; } $info['install'] .= '</div><br /><!--end of bg class-->'; if (!empty($settings)) { if (file_exists($software['path'] . '/install.js')) { $info['install'] .= '<script language="javascript" type="text/javascript"><!--// --><![CDATA['; $info['install'] .= @parselanguages(str_replace('$(', '$_(', implode('', file($software['path'] . '/install.js')))); $info['install'] .= '// ]]></script>'; } foreach ($settings as $group => $sets) { if ($group == 'hidden' || empty($sets)) { continue; } $info['install'] .= ' <div class="bg"> <div class="sai_sub_head">' . $group . '</div><hr>'; foreach ($sets as $sk => $sv) { //Adding class to input if (preg_match('/type="text"/is', $sv['tag'])) { $sv['tag'] = preg_replace('/>/is', ' class="form-control">', $sv['tag']); } if (preg_match('/<select/is', $sv['tag'])) { $sv['tag'] = preg_replace('/<select/is', '<select class="form-control"', $sv['tag']); } $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for=' . $sk . ' class="sai_head" id="sai_head">' . $sv['head'] . '</label> ' . (empty($sv['exp']) ? '' : '<span class="sai_exp">' . $sv['exp'] . '</span>') . ' </div> ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? preg_replace('/>|\\/>/is', ' onkeyup="check_pass_strength();" >', ' <div class="col-sm-6">' . $sv['tag'] . '<div id="pass-strength-result" style="border-radius:3px;">' . $l['strength_indicator'] . '</div></div>') : '<div class="col-sm-7 ">' . $sv['tag'] . '</div>') . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? ' <div class="col-sm-1"> <a href="javascript: void(0);" onclick="$_(\'' . $sk . '\').value=randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . ');check_pass_strength();return false;" title="' . $l['randpass'] . '"><img src="' . $theme['images'] . 'randpass.gif" /></a> </div> <div class="clearfix"></div> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && (!empty($softpanel->securepass) || !empty($globals['random_pass'])) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . ');check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && !empty($globals['empty_pass']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/dbprefix/is', $sv['tag']) && !empty($globals['random_dbprefix']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(3)+"_";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['random_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(5);\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['empty_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['admin_prefix']) && empty($globals['empty_username']) && empty($globals['random_username']) && !empty($random_username) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'prepend_prefix("' . $globals['admin_prefix'] . '");\'); // ]]></script> ' : '') . ' </div><br />'; } $info['install'] .= ' </div><br /><!--end of bg class-->'; } //The Hidden groups if (!empty($settings['hidden'])) { foreach ($settings['hidden'] as $sk => $sv) { $info['install'] .= $sv['tag'] . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : ''); } } } //End of if($settings) //Is it a SOFTCOPY, then Leave a NOTE if (!empty($setupcontinue)) { $info['install'] .= ' ' . $l['softcopy_note'] . ' '; } // Advance option $info['install'] .= ' <div class="bg"> <div class="sai_sub_head" id="advoptions_toggle" onclick="toggle_advoptions(\'advoptions\');" style="cursor:pointer"><img id="advoptions_toggle_plus" src="' . $theme['images'] . 'plus_new.gif" style="margin-top:-4px;"/> ' . $l['adv_option'] . '</div> <div id="advoptions" style="display:none;"><hr> ' . (empty($dbtype) || aefer() ? "" : '<div class="row"> <div class="col-sm-5"> <label for="softdb" class="sai_head">' . $l['database_name'] . '</label><br /> <span class="sai_exp2">' . $l['database_name_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="softdb" class="form-control" id="softdb" size="30" value="' . POSTval('softdb', $dbname) . '" onblur="checkdbname(\'softdb\', false)" /><br /> <span id="softdberror" style="background: #FDB3B3; display:none; width:200px;"></span> </div> </div>') . ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['disable_notify_update'] . '</label> <span class="sai_exp">' . $l['exp_disable_notify_update'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="disable_notify_update" id="disable_notify_update" ' . POSTchecked('disable_notify_update') . ' /> </div> </div><br />'; // Auto upgrade is not available in AMPPS if ($globals['softpanel'] != 'ampps' && !empty($scripts[$soft]['auto_upgrade']) && empty($no_autoupgrade['disable_autoupgrade']) && empty($no_autoupgrade['scripts'][$soft])) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['eu_auto_upgrade'] . '</label> <span class="sai_exp">' . $l['exp_eu_auto_upgrade'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="eu_auto_upgrade" id="eu_auto_upgrade" ' . POSTchecked('eu_auto_upgrade', $globals['enable_auto_upgrade']) . (!empty($globals['force_auto_upgrade']) ? ' checked="checked" disabled' : '') . '/> </div> </div><br />'; } // Auto upgrade plugins if (empty($globals['off_upgrade_plugins']) && !empty($software['update_plugins'])) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . lang_vars($l['auto_upgrade_plugins'], array($software['name'])) . '</label> <span class="sai_exp">' . lang_vars($l['exp_auto_upgrade_plugins'], array($software['name'])) . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="auto_upgrade_plugins" id="auto_upgrade_plugins" ' . POSTchecked('auto_upgrade_plugins') . ' /> </div> </div><br />'; } // Auto upgrade themes if (empty($globals['off_upgrade_themes']) && !empty($software['update_themes'])) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . lang_vars($l['auto_upgrade_themes'], array($software['name'])) . '</label> <span class="sai_exp">' . lang_vars($l['exp_auto_upgrade_themes'], array($software['name'])) . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="auto_upgrade_themes" id="auto_upgrade_themes" ' . POSTchecked('auto_upgrade_themes') . ' /> </div> </div><br />'; } // Auto backups option only if backups is not disabled and panel is not remote if (empty($globals['disable_backup_restore']) && empty($globals['disable_auto_backup']) && !aefer() && empty($softpanel->disable_auto_backup)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="auto_backup" class="sai_head">' . $l['auto_backup'] . '</label> <span class="sai_exp">' . $l['exp_auto_backup'] . '</span> </div> <div class="col-sm-7"> <select name="auto_backup" class="form-control" id="auto_backup" onchange="show_backup();"> <option value="0" ' . POSTselect('auto_backup', '0', 1) . '>' . $l['no_backup'] . '</option>' . (empty($globals['disable_auto_backup_daily']) ? '<option value="daily" ' . POSTselect('auto_backup', 'daily') . '>' . $l['daily'] . '</option>' : '') . (empty($globals['disable_auto_backup_weekly']) ? '<option value="weekly" ' . POSTselect('auto_backup', 'weekly') . '>' . $l['weekly'] . '</option>' : '') . (empty($globals['disable_auto_backup_monthly']) ? '<option value="monthly" ' . POSTselect('auto_backup', 'monthly') . '>' . $l['monthly'] . '</option>' : '') . ' </select> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['auto_backup_rotation'] . '</label> <span class="sai_exp">' . $l['exp_auto_backup_rotation'] . '</span> </div> <div class="col-sm-7"> <select name="auto_backup_rotation" class="form-control" id="auto_backup_rotation">'; for ($i = 0; $i <= 10; $i++) { // Do we have a limit from admin ? if (!empty($globals['auto_backup_limit']) && ($i > $globals['auto_backup_limit'] || $i == 0) || !empty($globals['max_backups']) && ($i > $globals['max_backups'] || $i == 0)) { continue; } $info['install'] .= '<option value="' . $i . '" ' . POSTselect('auto_backup_rotation', $i, $i == 4 ? '1' : '0') . '>' . (empty($i) ? $l['unlimited'] : $i) . '</option>'; } $info['install'] .= '</select> </div> </div><br />'; } $info['install'] .= ' </div> </div><br /><!--end of bg-->'; // Do we have to display the theme if (!empty($globals['eu_enable_themes']) && !empty($software['has_theme'])) { $info['install'] .= ' <div class="bg"> <div id="pfx_div" style="display:none"></div> </div><br /><!--end of bg class--> <script id="paypal_js" language="javascript" type="text/javascript"></script> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var pfx_div = \'' . str_replace(array("\n", "'"), array('', "\\'"), '<style> @import url(https://fonts.googleapis.com/css?family=Open+Sans:300light,400light,700light,400,400,700); </style> <div id="themesearch" class="sai_popupc" style="display:none;"> <div class="sai_themesearch_div sai_popuptitle" align="center" style="padding-left:20px;"> <fieldset class="sai_inputs"> <div class="row"> <input type="text" name="themesearchstring" class="col-sm-10" id="themesearchstring" class="sai_inputs" autofocus placeholder="Search Themes" autocomplete="off"> <div class="col-sm-6" style="text-align:right; margin-top:8px;"> <a href="javascript:void(0);" class="sai_popupclose b-close">Close</a> </div> </div> <div class="row"> <h4 id="results-text" style="display:none;">Showing results for: <b id="search-string"></b></h4> <ul id="results"></ul><br /> </div> </fieldset> </div> <div id="searchsuggestions"></div> </div> <div class="sai_sub_head" id="theme_toggle" onclick="toggle_advoptions(\'theme\');" class="sai_heading_full" style="cursor:pointer"><img id="theme_toggle_plus" src="' . $theme['images'] . 'minus_new.gif" /> ' . $l['choose_theme'] . '</div> <div class="row"> <div id="theme" style="display:block;" class="col-sm-12"><hr> <div id="theme_div" style="display:block;"> <div class="row"> <div class="col-sm-2"> <a class="btn btn-default" id="search_theme">' . $l['search'] . '</a> </div> <div class="col-sm-8"> <center>' . $l['theme_is_optional'] . '</center> </div> <div class="col-sm-2"> <a class="btn btn-default pull-right" id="refresh_theme">' . $l['refresh'] . '</a> <div id="sloading" style="display:none;"> <center><img src="' . $theme['images'] . 'loading.gif" alt="Loading..." /></center> </div> </div> </div><br /> <div class="row"> <div style="height:280;"> <div id="loading" style="display:block;z-index:99;"> <center><img src="' . $theme['images'] . 'loading.gif" alt="Loading..." /></center> </div> <center><div id="display_theme" style="height:auto;"></div></center> </div> </div> <div class="row"> <div class="col-sm-1"> <span id="prevBtn"><a href="javascript:void(0);"></a></span> </div> <div class="col-sm-10"> <center><div id="clear_theme" name="clear_theme" class="sai_searchbox_button" onclick="clear_theme();" style="display:none;">' . $l['clear_theme'] . '</div></center> </div> <div class="col-sm-1"> <span id="nextBtn"><a href="javascript:void(0);"></a></span> </div> </div> </div> </div> </div>') . '\'; var length; var deduct; var payment_timer; var dg; ' . (!empty($owned_themes) ? 'owned_theme = new Array("' . implode('", "', array_values($owned_themes)) . '");' : 'var owned_theme = new Array();') . ' var screen_width = $(window).width(); if(screen_width < 1282 && screen_width > 982){ length = 3; deduct = 3; }else if(screen_width < 982 && screen_width >802){ length = 2; deduct = 2; }else if(screen_width < 802 && screen_width >770){ length = 1; deduct = 1; }else if(screen_width < 770 && screen_width > 362){ length = 2; deduct = 2; }else if(screen_width < 363 && screen_width > 200){ length = 1; deduct = 1; }else{ length = 4; deduct = 4; } ' . (!empty($softpanel->pheader) ? 'length = 2;deduct = 2;' : '') . ' ' . (empty($user['pfxapi_key']) ? 'var api_key = 0;' : 'var api_key = 1;') . ' ' . (empty($globals['eu_themes_premium']) ? 'var premium = 0;' : 'var premium = "' . $globals['eu_themes_premium'] . '";') . ' function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i < 1e7; i++) { if ((new Date().getTime() - start) > milliseconds){ break; } } } if(api_key == 0){ $.ajax({ type: "POST", data: "generate_apikey=1&ajax=1", url: "' . $globals['index'] . 'act=my_themes&jsnohf=1", // Checking for error success: function(data){ // Do nothing :) } }); } function show_pfx_div(){ var current_html = $("#pfx_div").html(); if(current_html == ""){ $("#pfx_div").html(pfx_div); $("#pfx_div").show(); theme_init(); } } function show_pay(){ //alert(arguments[0] +" -- "+arguments[1]+" -- "+arguments[2]+" -- "+arguments[3]); //alert($("#paypal_js").attr("src")) $("#display_theme").fadeOut(100); $("#loading").show(); // We will have to create an order now $.ajax({ type: "GET", url: window.location+"&generate_order=1&ajax=1&jsnohf=1&theme_id="+arguments[1], success: function(data){ //alert(data) var order_id = $.parseJSON(data); $("#custom").val(order_id); $("#loading").hide(); $("#display_theme").fadeIn(100); //$("#pfxpay").bPopup(); } }); $.getScript("https://www.paypalobjects.com/js/external/dg.js", function( data, textStatus, jqxhr ) { //alert(data +" -- "+textStatus+" -- "+jqxhr) if(textStatus == "success"){ dg = new PAYPAL.apps.DGFlow({ // HTML ID of form submit buttons that call setEC trigger:"submit_pay", expType:"instant" }); } }); // Now set the variable for sending the data $("#item_name").val(arguments[0]); $("#item_number").val(arguments[1]); $("#amount").val(arguments[2]); $("#item_price").html(arguments[2]); select_theme(arguments[3]); $("#submit_pay").click(function(){ /*var timer = setInterval(function() { if(dg.isOpen() !== true) { clearInterval(timer); alert("closed"); } }, 30000);*/ $("#pfxpay").bPopup().close(); }); $(".b-close").click(function(){ }); } function show_selected_theme(){ var th_name = $("#theme_name").val(); var th_id = $("#theme_id").val(); //alert("' . $globals['s2api_pfx'] . 'theme_search.php?in=json&cversion=' . $software['ver'] . '&cat=' . (!is_int($software['has_theme']) ? $software['has_theme'] : $iscripts[$soft]['name']) . '&q="+th_name+"&start=0&length=1&premium="+premium+"&callback=?") $.getJSON("' . $globals['s2api_pfx'] . 'theme_search.php?in=json&cversion=' . $software['ver'] . '&cat=' . (!is_int($software['has_theme']) ? $software['has_theme'] : $iscripts[$soft]['name']) . '&q="+th_name+"&start=0&length=1&premium="+premium+"&callback=?", function (data) { var soft_themes = \'<div id="slider"><div class="row">\'; var new_li = 0; $.each(data.data, function (i, item) { if(item.name != undefined){ soft_themes += \'<div class="row"><div class="sai_image_container" id="img_\'+new_li+\'" onmouseover="onthemeover(\'+new_li+\');" onmouseout="onthemeout(\'+new_li+\');" value="\'+item.pid+\'" theme_name="\'+item.softname+\'"><div class="sai_theme_header">\'+item.name+\'</div><img src="\'+data.img_url+item.pid+\'/\'+item.pid+\'_200.png" width="100%" height="100" class="img-responsive"><div class="sai_navigation" id="nav_\'+new_li+\'" style="display:none;"><span class="sai_demo"><a href="\'+item.demo_url+\'" target="_blank">' . addslashes($l['demo']) . '</a></span></div></div></div>\'; soft_themes += \'</div><div class="row"><input type="hidden" name="theme_id" id="theme_id" value="\'+item.pid+\'"><input type="hidden" name="theme_name" id="theme_name" value="\'+item.softname+\'"></div></div>\'; } new_li += 1; });// end of each loop $("#display_theme").html(soft_themes); $(".sai_image_container").removeClass("sai_theme_selected"); $(".sai_image_container").addClass("sai_theme_selected"); $(function(){ $(".sai_image_container, #select_this_theme").click(function(){ $(".sai_image_container").removeClass("sai_theme_selected"); if(this.id == "select_this_theme"){ $("#"+$(this).attr("val")).addClass("sai_theme_selected"); $("#theme_id").val($("#"+$(this).attr("val")).attr("value")); $("#theme_name").val($("#"+$(this).attr("val")).attr("theme_name")); }else{ $(this).addClass("sai_theme_selected"); $("#theme_id").val($(this).attr("value")); $("#theme_name").val($(this).attr("theme_name")); } }) }); $("#themesearch").bPopup().close(); }); } function clear_theme(){ $(".sai_image_container").removeClass("sai_theme_selected"); $("#theme_id").val(""); $("#theme_name").val(""); $("#clear_theme").hide(); show_list($("#prevBtn").val(), length); } function onthemeover(id_no){ $("#nav_"+id_no).show(); } function onthemeout(id_no){ $("#nav_"+id_no).hide(); } var startpt; function search() { var query_value = $("input#themesearchstring").val(); $("b#search-string").html(query_value); if(startpt == undefined || startpt == ""){ startpt = 0; } var top = 0; if(query_value === ""){ top = 1; } $.getJSON("' . $globals['s2api_pfx'] . 'theme_search.php?in=json&cversion=' . $software['ver'] . '&cat=' . (!is_int($software['has_theme']) ? $software['has_theme'] : $iscripts[$soft]['name']) . '&start="+startpt+"&length=20&q="+query_value+"&top="+top+"&premium="+premium+"&callback=?", function (data) { var search_themes = \'<div id="slider"><table border="0" width="100%" height="200" cellspacing="5" cellpadding="3">\'; var new_li = 0; $.each(data.data, function (i, item) { var you_own = ""; if(item.name != undefined){ var params = new Array(); params[0] = "\'"+item.name+" - "+item.desc+"\'"; params[1] = item.pid; params[2] = item.price; params[3] = "\'simg_"+new_li+"\'"; //alert(item.pid+" -- "+ owned_theme+ " -- "+ $.inArray(item.pid, owned_theme) + " -- "+val_count(owned_theme, item.pid)) if($.inArray(item.pid, owned_theme) !== -1){ you_own = \'<img src="' . $theme['images'] . 'success.png" class="someclass" title="' . addslashes($l['your_purchased']) . '(\'+val_count(owned_theme, item.pid)+\')' . addslashes($l['your_purchased_times']) . '" alt="" height="22" width="22">\'; }else{ you_own = " "; } if(item.price > 0){ var price_lable = \'<td align="center" width="200"><table border="0" width="100%" cellpadding="0" cellspacing="0"><tr><td width="30%"><div class="sai_searchbox_button" onclick="show_pay(\'+params+\');"><span style="margin-right:20px">\'+you_own+\'</span><a href="javascript:void(0);" >' . addslashes($l['purchase']) . ' $\'+item.price+\'</a></div></td></tr></table></td>\'; }else{ var price_lable = \'<td align="center" width="20"> </td>\'; } search_themes += \'<tr class="sai_tr_color"><td align="center" style="padding-left:10px;"><table border="0" width="100%" cellspacing="0" cellpadding="3"><tr><td width="180"><div class="sai_image_container" id="simg_\'+new_li+\'" value="\'+item.pid+\'" theme_name="\'+item.softname+\'" style="width:160px;height:175px;"><img src="\'+data.img_url+item.pid+\'/\'+item.pid+\'_200.png" width="150" height="150" ><div class="sai_navigation" id="snav_\'+new_li+\'" style="display:none;"><span class="sai_demo"><a href="\'+item.demo_url+\'" target="_blank">' . addslashes($l['demo']) . '</a></span></div></div></td><td><table border="0" cellpadding="5" cellspacing="0" width="100%"><tr><td colspan="3"><b>\'+item.name+\'</b></td></tr><tr><td colspan="3" class="sai_search_description">\'+item.desc+\'</td></tr><tr><td colspan="3" class="sai_search_description">\'+item.overview+\'</td></tr><tr><td width="200"><div class="sai_searchbox_button" id="select_this_theme" val="simg_\'+new_li+\'">' . addslashes($l['use_this_theme']) . '</div></td><td width="200"><a href="\'+item.demo_url+\'" target="_blank" style="text-decoration:none;"><div class="sai_searchbox_button">' . addslashes($l['demo']) . '</div></a></td>\'+price_lable+\'</tr></table></td><td></td></tr><br /></table></td></tr>\'; } new_li += 1; });// end of each loop search_themes += \'<tr><td><input type="hidden" name="theme_id" id="theme_id"><input type="hidden" name="theme_name" id="theme_name"></td></tr></table></div>\'; $("#searchsuggestions").animate(0, "", function(){ $("#searchsuggestions").html(search_themes); $(function(){ $(".sai_image_container, #select_this_theme").click(function(){ $(".sai_image_container").removeClass("sai_theme_selected"); if(this.id == "select_this_theme"){ $("#"+$(this).attr("val")).addClass("sai_theme_selected"); $("#theme_id").val($("#"+$(this).attr("val")).attr("value")); $("#theme_name").val($("#"+$(this).attr("val")).attr("theme_name")); show_selected_theme(); $("#clear_theme").css("display", "block"); }else{ $(this).addClass("sai_theme_selected"); $("#theme_id").val($(this).attr("value")); $("#theme_name").val($(this).attr("theme_name")); } }) }); }).delay(0).animate({opacity: 1}, 300); }); // End of getJSON } var search_timer; $("#themesearchstring").live("keyup", function(e) { //clearTimeout($.data(this, "timer")); var search_string = $(this).val(); clearTimeout(search_timer); if (search_string == "") { $("ul#results").fadeOut(); $("h4#results-text").fadeOut(); $("#searchsuggestions").html(""); }else{ $("ul#results").fadeIn(); $("h4#results-text").fadeIn(); search_timer = setTimeout("search();", 200); }; }); function in_array(val, array){ for (i=0; i <= array.length; i++){ if (array[i] == val) { return true; // {alert(i +" -- "+ids[i]+" -- "+val);return i;} } } return false; } //function to display list of Themes function show_list(start, length){ //alert("' . $globals['s2api_pfx'] . 'category.php?in=json&cversion=' . $software['ver'] . '&cat=' . (!is_int($software['has_theme']) ? $software['has_theme'] : $iscripts[$soft]['name']) . '&start="+start+"&length="+length+"&premium="+premium+"&callback=?"); $.getJSON("' . $globals['s2api_pfx'] . 'category.php?in=json&cversion=' . $software['ver'] . '&cat=' . (!is_int($software['has_theme']) ? $software['has_theme'] : $iscripts[$soft]['name']) . '&start="+start+"&length="+length+"&premium="+premium+"&callback=?", function (data) { if (typeof(data.data)!="object" || typeof data.data == "undefined"){ $("#display_theme").html("<center><span class=\'sai_newhead\'>' . $l['classes_con_failed'] . '</span></center>"); $("#loading").hide(); $("#display_theme").fadeIn(300); $("#nextBtn").css("display", "none"); $("#prevBtn").css("display", "none"); } $("#clear_theme").css("display", "none"); $("#nextBtn").css("display", "block"); $("#prevBtn").css("display", "block"); var soft_themes = \'<div id="slider"><table border="0" width="100%" height="200" cellspacing="0" cellpadding="3"><tr>\'; var new_li = 0; $.each(data.data, function (i, item) { soft_themes += \'<td align="center"><div class="sai_image_container" id="img_\'+new_li+\'" onmouseover="onthemeover(\'+new_li+\');" onmouseout="onthemeout(\'+new_li+\');" value="\'+item.pid+\'" theme_name="\'+item.softname+\'"><div class="sai_theme_header">\'+item.name+\'</div><img src="\'+data.img_url+item.pid+\'/\'+item.pid+\'_200.png" width="230" height="200" ><div class="sai_navigation" id="nav_\'+new_li+\'" style="display:none;"><span class="sai_demo"><a href="\'+item.demo_url+\'" target="_blank">' . addslashes($l['demo']) . '</a></span></div></div></td>\'; new_li += 1; });// end of each loop soft_themes += \'</tr><tr>\'; var new_li = 0; $.each(data.data, function (i, item) { var you_own = ""; if(item.name != undefined){ var params = new Array(); params[0] = "\'"+item.name+" - "+item.desc+"\'"; params[1] = item.pid; params[2] = item.price; params[3] = "\'img_"+new_li+"\'"; //alert(item.pid+" -- "+ owned_theme+ " -- "+ $.inArray(item.pid, owned_theme) + " -- "+val_count(owned_theme, item.pid)) if($.inArray(item.pid, owned_theme) !== -1){ you_own = \'<img src="' . $theme['images'] . 'success.png" class="someclass" title="' . addslashes($l['your_purchased']) . '(\'+val_count(owned_theme, item.pid)+\')' . addslashes($l['your_purchased_times']) . '" alt="" height="24" width="24">\'; }else{ you_own = " "; } if(item.price > 0){ soft_themes += \'<td align="center"><div class="sai_purchased blue" onclick="show_pay(\'+params+\');" data-toggle="modal" data-target="#pfxpay"><table border="0" width="95%"><tr><td width="25%">\'+you_own+\'</td><td width="60%"><a href="javascript:void(0);" >' . addslashes($l['purchase']) . ' $\'+item.price+\'</a></td></tr></table></div><br /></td>\'; }else{ soft_themes += \'<td align="center"><div class="sai_purchased blue"><table border="0" width="95%"><tr><td align="center" onclick="select_theme(\\\'img_\'+new_li+\'\\\');"><a href="javascript:void(0);" id="select_theme">' . (!empty($globals['eu_themes_premium']) ? addslashes($l['free']) : addslashes($l['select'])) . '</a></td></tr></table></div><br /></td>\'; } } new_li += 1; });// end of each loop soft_themes += \'</tr><tr><td><input type="hidden" name="theme_id" id="theme_id"><input type="hidden" name="theme_name" id="theme_name"></td></tr></table></div>\'; $("#loading").hide(); $("#display_theme").animate(0, "", function(){ $("#display_theme").html(soft_themes); $(function(){ $(".sai_image_container").click(function(){ $(".sai_image_container").removeClass("sai_theme_selected"); $(this).addClass("sai_theme_selected"); $("#theme_id").val($(this).attr("value")); $("#theme_name").val($(this).attr("theme_name")); $("#clear_theme").css("display", "block"); }) }); }).delay(0).animate({opacity: 1}, 300); $("#prevBtn").val(start); start = parseInt(start) + length; $("#nextBtn").val(start); if($("#prevBtn").val() <= 0){ $("#prevBtn").css("display", "none"); }else{ $("#prevBtn").css("display", "block"); } if(start == (data.count)){ $("#nextBtn").css("display", "none"); } // If we get the last data if(data.is_last == 1){ $("#nextBtn").css("display", "none"); $("#nextBtn").hide(); } $("#display_theme").fadeIn(300); }); // end of get json function // If we dont get the api key for this user we will generate one ! if(api_key == 0){ /* $.ajax({ type: "POST", data: "generate_apikey=1", url: "' . $globals['index'] . 'act=my_themes&jsnohf=1", // Checking for error success: function(data){ // At the moment nothing to do ! } });*/ } }//end of show list function get_purchased(){ $("#refresh_theme").hide(); $("#sloading").show(); $.ajax({ type: "POST", data: "get_owned_theme=1&ajax=1", url: "' . $globals['index'] . 'act=my_themes&jsnohf=1", // Checking for error success: function(data){ owned_theme = data.split(","); //alert(owned_theme) $("#sloading").hide(); $("#refresh_theme").show(); show_list(0, length); } }); } function select_theme(id){ $(".sai_image_container").removeClass("sai_theme_selected"); $("#"+id).addClass("sai_theme_selected"); $("#theme_id").val($("#"+id).attr("value")); $("#theme_name").val($("#"+id).attr("theme_name")); $("#clear_theme").css("display", "block"); } function theme_init(){ //get_purchased(); show_list(0, length); $("#prevBtn").click(function(){ var tmp = parseInt($("#prevBtn").val()); $("#nextBtn").val(tmp); tmp = tmp - deduct; $("#prevBtn").val(tmp); $("#display_theme").fadeOut(100); $("#loading").show(); show_list($("#prevBtn").val(), length); }); $("#nextBtn").click(function(){ var tmp = parseInt($("#nextBtn").val()); $("#prevBtn").val(tmp); tmp = tmp + deduct; $("#nextBtn").val(tmp); $("#display_theme").fadeOut(100); $("#loading").show(); show_list($("#prevBtn").val(), length); }); $("#search_theme").click(function(){ $("#themesearch").bPopup(); search(); }); $(".b-close").click(function(){ $("#themesearchstring").val(""); }); $("#refresh_theme").click(function(){ get_purchased(); }); $(".someclass").tipTip(); } $(document).ready(function(){ if($("#install_win").is(":visible")){ show_pfx_div(); } }); $("#install").click(function(){ show_pfx_div(); }); // ]]></script> '; } $info['install'] .= ' <p align="center"> <input type="hidden" name="softsubmit" id="softsubmit" value="' . $l['softsubmit'] . '" /> <input type="hidden" name="pass-strength-hidden" id="pass-strength-hidden" value="" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" value="' . $l['softsubmit'] . '" class="flat-butt" /><span id="show_txt" style="display:none;"></span> <br /><br /><br /> ' . (empty($globals['off_email_link']) && empty($globals['off_install_mail']) ? '<span class="sai_head">' . $l['ins_emailto'] . '</span> : <input type="text" name="emailto" id="emailto" size="20" value="' . POSTval('emailto', '') . '" />' : '') . ' </p> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> </form></div> '; if (!empty($globals['eu_enable_themes']) && !empty($software['has_theme'])) { $info['install'] .= ' <div class="modal fade" id="pfxpay" role="dialog"> <div class="modal-dialog modal-sm"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">' . $l['payment_heading'] . '</h4> </div> <div class="modal-body" align="middle"> <form action="' . $globals['paypal_url'] . '" method="post" name="pay" id="pay"> ' . $l['payment_redirect'] . '$<span id="item_price"></span><br /><br /> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" id="business" value="' . $globals['paypal_business'] . '"> <input type="hidden" name="return" id="return" value="' . $globals['paypal_return'] . '"> <input type="hidden" name="cancel_return" id="cancel_return" value="' . $globals['paypal_return'] . '"> <input type="hidden" name="notify_url" id="notify_url" value="' . $globals['paypal_return'] . '"> <input type="hidden" name="item_name" id="item_name" value=""> <input type="hidden" name="item_number" id="item_number" value=""> <input type="hidden" name="amount" id="amount" value=""> <input type="hidden" name="custom" id="custom" value=""> <input type="hidden" name="paymentaction" id="paymentaction" value="sale"> <!--<input type="submit" class="tiny radius button" value="Buy now">--> <button type="submit" name="submit" style="border: 0; background: transparent; cursor:pointer" id="submit_pay"> <img src="https://www.paypal.com/en_US/i/bnr/horizontal_solution_PPeCheck.gif" border="0" alt="Accepted Cards" style="width:100%;"> </button> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div>'; } $info['install'] .= ' <div id="progress_bar" style="height:125px; width:100%; display: none;"> <br /> <center> <font size="4" color="#222222" id="progress_txt" style="width:100%;">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444; width:100%;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; width:50%"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table><br /> <center>' . $l['wait_note'] . '</center> </div> <br /><br /><br />'; } elseif (!empty($installed)) { $info['install'] = ' <div class="bg2"> <h4>' . $l['congrats'] . '</h4><br /> ' . $software['name'] . ' ' . $l['succesful'] . ' : <br /> <a href="' . $__settings['softurl'] . '" target="_blank">' . $__settings['softurl'] . '</a> ' . (!empty($software['adminurl']) ? '<br />' . $l['admin_url'] . ' : <a href="' . $__settings['softurl'] . '/' . $software['adminurl'] . '" target="_blank">' . $__settings['softurl'] . '/' . $software['adminurl'] . '</a>' : '') . '<br /><br /> ' . (!empty($setupcontinue) ? $l['setup_continue'] . ' : <br /> <a href="' . $__settings['softurl'] . '/' . $setupcontinue . '" target="_blank">' . $__settings['softurl'] . '/' . $setupcontinue . '</a><br /><br />' : '') . ' ' . $l['enjoy'] . '<br /><br /> ' . (!empty($pfx_error) ? error_handle($pfx_error, "100%", 0, 1) : '') . (!empty($notes) ? $l['install_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . (!empty($globals['ampps_enabled']) && empty($globals['no_ampps']) && $globals['softpanel'] != 'ampps' ? lang_vars($l['ampps_download'], array($software['name'])) . '<br /><br />' : '') . ' ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $new_insid . '&postact=install">' . $l['return'] . '</a></b></center><br /><br />'; if (empty($globals['install_tweet_off']) || empty($globals['lictype'])) { $info['install'] .= '<form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <div class="panel panel-info" style="width:55%; margin:0 auto;"> <div class="panel-heading" style="padding:5px; font-size:15px;"> <font><b>' . $l['install_tweet_sub'] . ' :</b></font> </div> <div class="panel-body"> <div class="row"> <div class="col-sm-10"> <textarea name="text" cols="80" row="3" style="resize:none; width:100%;">' . loadtweetdata('install_tweet', $l['install_tweet_classes']) . '</textarea> </div> <div class="col-sm-2"> <input type="submit" value="Tweet!" class="btn btn-info" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/> </div> </div> </div> </div> </form>'; } $info['install'] .= '<br /></div><!--end of bg2 class--><!--PROC_DONE--> <br /><br />'; } softheader($l['<title>'] . $software['name']); $loadedinfo = array('install', 'overview', 'features', 'reviews', 'screenshots', 'ratings'); ?> <script language="JavaScript" src="<?php echo $theme['url'] . '/js/tabber.js'; ?> " type="text/javascript"> </script> <script language="JavaScript" id="ratings_js_file" type="text/javascript"></script> <script language="JavaScript" id="review_js_file" type="text/javascript"></script> <script language="JavaScript" id="reviews_js_file" type="text/javascript"></script> <script type="text/javascript"> tabs = new tabber; tabs.tabs = new Array('<?php echo implode('\', \'', $loadedinfo); ?> '); tabs.tabwindows = new Array('<?php echo implode('_win\', \'', $loadedinfo); ?> _win'); tabs.inittab = <?php echo '\'' . $init_tab . '\';'; ?> addonload('tabs.init();loadraterev();check_pass_strength();'); function loadraterev(){ <?php if (empty($globals['off_rating_link']) && $soft < 10000) { echo '$_(\'ratings_js_file\').src = "https://www.softaculous.com/ratings.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } if (empty($globals['off_review_link']) && $soft < 10000) { echo '$_(\'review_js_file\').src = "https://www.softaculous.com/review.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; echo '$_(\'reviews_js_file\').src = "https://www.softaculous.com/reviews.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } ?> }; function notifyversion(){ if(AJAX(window.location+"¬ify=true", "notified(re)")){ return false; }else{ return true; } }; function notified(re){ if(re == 1){ alert('<?php echo $l['notifyversion']; ?> '); } }; function loadScreenshots(){ $_('screenshots_iframe').src = '<?php echo 'https://www.softaculous.com/screenshots/screenshots1.php?sid=' . $soft; ?> '; }; </script> <?php $tmp_ver1 = array(); // Just to show the multiple versions if a script have any branch. if (!empty($software['branch'])) { foreach ($software['branch'] as $kver => $vver) { $tmp_ver1[] = $vver['ver']; } $tmp_ver = implode(', ', $tmp_ver1); } $url = $theme['images']; $ratings = array(); $deduct = 1; $r = $scripts[$soft]['ratings']; for ($i_r = 1; $i_r <= 5; $i_r++) { if ($r >= 1) { $ratings[$i_r] = '<img src="' . $url . 'star.png' . '" alt="(' . number_format($scripts[$soft]['ratings'], 2) . ' out of 5)" />'; } elseif ($r > 0) { $ratings[$i_r] = '<img src="' . $url . 'halfstar.png' . '" alt="(' . number_format($scripts[$soft]['ratings'], 2) . ' out of 5)" />'; } else { $ratings[$i_r] = '<img src="' . $url . 'nostar.png' . '" alt="(' . number_format($scripts[$soft]['ratings'], 2) . ' out of 5)" />'; } $r = $r - $deduct; } // For custom themes if ($soft > 10000) { if (file_exists($globals['euthemes'] . '/' . $globals['theme_folder'] . '/images/topscripts/48/' . $iscripts[$soft]['softname'] . '.png')) { $custom_48 = $theme['images'] . 'topscripts/48/' . $iscripts[$soft]['softname'] . '.png'; } else { $custom_48 = $theme['images'] . '/custom.png'; } } echo '<div class="bg"> <div id="currentrating" style="display:none"></div> <div class="row" style="margin-left:10px;"> ' . (!empty($custom_48) ? '<img src="' . $custom_48 . '" alt="">' : '<img src="' . $globals['mirror_images'] . 'top15/48/' . $scripts[$soft]['softname'] . '.png" >') . ' <span class="sai_process_heading" style="margin-left:20px;">' . $software['name'] . '</span> </div><br /> <div class="row"> <div class="col-sm-2"> ' . ($soft > 10000 ? '' : '<div class="someclass" title="' . $scripts[$soft]['ratings'] . '">' . implode('', $ratings) . '</div>') . ' </div> <div class="col-sm-5 ver_style"> ' . $l['software_ver'] . ' : <font size="2"><b>' . (!empty($tmp_ver) ? $tmp_ver : $software['ver']) . '</b></font> <a href="javascript" onclick="notifyversion(); return false;" ><img src="' . $theme['images'] . 'notify.gif" name="notifyver" title="' . $l['notify_ver'] . '" alt="' . $l['notify_ver'] . '"></a> </div> <div class="col-sm-3 release_style"> ' . (!empty($info['release_date']) ? $l['release_date'] . ' : <font size="1"><b>' . $info['release_date'] . '</b></font>' : '') . ' </div> <div class="col-sm-2 change_style"> ' . (!empty($info['changelog']) ? ' <a href="javascript" data-toggle="modal" data-target="#changelog_div" class="sai_changelogbut pull-right" style="text-decoration:none;">' . $l['changelog'] . '</a>' : '') . ' </div> </div><br /> <script type=text/javascript>'; if (!empty($softpanel->pheader)) { if (substr_count($_SERVER['REQUEST_URI'], 'x3') > 0) { echo ' $(document).ready(function(){ $(".ver_style").css("margin-left","0px"); $(".release_style").css("margin-left","0px"); $(".change_style").css({"margin-left":"0px", "margin-top":"-15px"}); });'; } else { echo ' $(document).ready(function(){ $(".ver_style").css("margin-left","0px"); $(".release_style").css("margin-left","0px"); $(".change_style").css({"margin-left":"0px", "margin-top":"-10px"}); });'; } } echo ' </script> <div class="old_tab"> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sai_tabs"> <tr> <td><a href="javascript:tabs.tab(\'install\')" id="install" class="sai_insbut">' . $l['install'] . '</a></td> <td><a href="javascript:tabs.tab(\'overview\')" class="sai_tab" id="overview">' . $l['overview'] . '</a></td> <td><a href="javascript:tabs.tab(\'features\')" class="sai_tab" id="features">' . $l['features'] . '</a></td> ' . (empty($globals['off_screenshot_link']) ? '<td><a href="javascript:tabs.tab(\'screenshots\'); loadScreenshots();" class="sai_tab" id="screenshots">' . $l['screenshots'] . '</a></td>' : '') . ' ' . (empty($globals['off_demo_link']) ? '<td><a href="' . ($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'] . 'act=demos&soft=' . $soft) . '" class="sai_tab" id="demo" target="_blank">' . $l['demo'] . '</a></td>' : '') . ' ' . (empty($globals['off_rating_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'ratings\')" class="sai_tab" id="ratings">' . $l['ratings'] . '</a></td>' : '') . ' ' . (empty($globals['off_review_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'reviews\')" class="sai_tab" id="reviews">' . $l['reviews'] . '</a></td>' : '') . (empty($info['import']) ? '' : '<td><a href="' . $globals['ind'] . 'act=import&soft=' . $soft . '" class="sai_tab" id="ratings">' . $l['import'] . '</a></td>') . ' </tr> </table><br /> </div> <div class="new_tab"> <nav class="navbar navbar-default"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <ul class="nav"> <li class="active" style="width:80px;"><a href="javascript:tabs.tab(\'install\')" id="install" class="sai_tab2" style="text-decoration:none; height:40px; top:5px;" data-toggle="collapse" data-target="#myNavbar">' . $l['install'] . '</a></li> </ul> </div> <div class="collapse navbar-collapse" id="myNavbar" style="position:absolute; z-index:1000; width:100%; background:#F8F8F8;"> <ul class="nav navbar-nav"> <li><a href="javascript:tabs.tab(\'overview\')" id="overview" class="sai_tab2" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['overview'] . '</a></li> <li><a href="javascript:tabs.tab(\'features\')" id="features" class="sai_tab2" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['features'] . '</a></li> <li>' . (empty($globals['off_screenshot_link']) ? '<a href="javascript:tabs.tab(\'screenshots\'); loadScreenshots();" class="sai_tab2" id="screenshots" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['screenshots'] . '</a>' : '') . '</li> <li>' . (empty($globals['off_demo_link']) ? '<a href="' . ($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'] . 'act=demos&soft=' . $soft) . '" class="sai_tab2" id="demo" target="_blank" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['demo'] . '</a>' : '') . '</li> <li>' . (empty($globals['off_rating_link']) && $soft < 10000 ? '<a href="javascript:tabs.tab(\'ratings\')" class="sai_tab2" id="ratings" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['ratings'] . '</a>' : '') . '</li> <li>' . (empty($globals['off_review_link']) && $soft < 10000 ? '<a href="javascript:tabs.tab(\'reviews\')" class="sai_tab2" id="reviews" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['reviews'] . '</a>' : '') . '</li> <li>' . (empty($info['import']) ? '' : '<a href="' . $globals['ind'] . 'act=import&soft=' . $soft . '" class="sai_tab2" id="ratings" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['import'] . '</a>') . '</li> </ul> </div> </nav> </div> <script type="text/javascript"> $_(tabs.inittab).className = tabs.tabbedclass; var softid = ' . $soft . ' tabs.override = function(id){ if(id == \'install\'){ $_(\'install\').className = \'sai_insbutclicked\'; }else{ $_(\'install\').className = \'sai_insbut\'; } }; </script>'; //Parse and take care of images $info['overview'] = (!empty($info['changelog']) ? ' <div class="modal fade" id="changelog_div" role="dialog"> <div class="modal-dialog modal-lg" style="margin-top:80px;"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background:#F0F0F0;"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Changelog</h4> </div> <div class="modal-body" style="height: 350px; overflow-y: auto;"> ' . $info['changelog'] . ' </div> <div class="modal-footer" style="padding-top:10px; height:50px;"> <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Close</button> </div> </div> </div> </div>' : '') . ' <div class="bg2"> <div class="row"> ' . (!empty($scripts[$soft]['screenshots']) && empty($globals['panel_hf']) ? ' <div class="col-sm-6"> <div id="overview_img" style="padding:10px;" style="width:100%;"> <img src="' . $globals['mirror_images'] . 'softimages/screenshots/' . $soft . '_screenshot1.gif" class="img-responsive" alt=""> </div> </div> <div class="col-sm-6 col-xs-6">' : '<div class="col-sm-12 col-xs-12">') . ' ' . softparse($info['overview'], $soft) . '<br /><br /> <div class="row"> <div class="col-sm-1 col-xs-1"><font color="#447edf"><i class="fa sai-disk fa-3x"></i></font></div> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['space_req'] . '</span><br /> <span class="sai_exp2">' . $l['available_space'] . ' : ' . (is_numeric($softpanel->spaceremain) ? number_format($softpanel->spaceremain / 1024 / 1024, 2) : $softpanel->spaceremain) . ' ' . $l['mb'] . '<br /> ' . $l['req_space'] . ' : ' . number_format($software['spacereq'] / 1024 / 1024, 2) . ' ' . $l['mb'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-1 col-xs-1"><a href="' . $info['support'] . '"><font color="#447edf"><i class="fa sai-question fa-3x"></i></font></a></div> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['software_support'] . '</span><br /> <span class="sai_exp2"><a href="' . $info['support'] . '" target="_blank">' . $l['support_link'] . '</a><br /> ' . $l['support_note'] . '</span> </div> </div> </div> </div><br /> </div><!--end of bg2 class-->'; if (!empty($installations[$soft]) || array_intersect(array_keys($installations), array_keys($software['branch']))) { $info['overview'] .= '<br /><br /> <center> <span class="sai_newhead">' . $l['current_ins'] . '</span><br /> </center><hr>'; $info['overview'] .= ' <div class="bg2"> <table class="table table-hover"> <thead style="background:#EFEFEF;" class="sai_head2"> <tr> <th>' . $l['link'] . '</th> <th>' . $l['admin'] . '</th> <th>' . $l['ins_time'] . '</th> <th>' . $l['version'] . '</th> <th width="50" colspan="5" style="text-align:center;">' . $l['options'] . '</th> <th><input type="checkbox" id="check_all"></th> </tr> </thead>'; $i = 1; $highlight = optGET('highlight'); $action = optGET('postact'); //r_print($software['branch']); //r_print($no_autoupgrade); foreach ($software['branch'] as $csid => $cver) { $is_cloneable = is_cloneable($csid); // We use this count to create empty <td> for features not available for this app $ccount = 0; if (empty($is_cloneable)) { $ccount++; } if (!empty($globals['disable_backup_restore'])) { $ccount++; } if (!asperapp(0, 0, 1) || empty($can_publish)) { $ccount++; } //Child List of Installations foreach ($installations[$csid] as $ik => $iv) { $is_upgradable = is_upgradable($ik); $info['overview'] .= '<tr id="trid' . $ik . '"> <td class="endurl"><a href="' . $iv['softurl'] . '" target="_blank" id="insurl' . $ik . '">' . $iv['softurl'] . '</a>' . ($highlight == $ik && !empty($action) ? '<span id="highlight"> <b class="sai_highlight">' . $l['act_' . $action] . '</b></span>' : '') . '</td> <td><a href="' . $iv['softurl'] . '/' . (!empty($iv['admin_folder']) ? $iv['admin_folder'] : admin_folder($iv['sid'])) . '" target="_blank"><img src="' . $theme['images'] . '/admin.gif" /></a></td> <td>' . datify($iv['itime']) . '</td> <td>' . $iv['ver'] . ($software['ver'] != $iv['ver'] && $is_upgradable ? ' <a href="' . $globals['ind'] . 'act=upgrade&insid=' . $ik . '"><img src="' . $theme['images'] . 'updates.gif" alt="' . $l['upd_to'] . ' ' . implode(' or ', $is_upgradable) . '" title="' . $l['upd_to'] . ' ' . implode(' or ', $is_upgradable) . '" class="someclass"/></a>' : '') . (!empty($iv['eu_auto_upgrade']) && empty($no_autoupgrade['disable_autoupgrade']) && empty($no_autoupgrade['scripts'][$csid]) ? '<img src="' . $theme['images'] . 'auto_upgrade.png" title="' . $l['auto_upgrade_enabled'] . '" style="cursor:pointer"/>' : '') . '</td>' . (!empty($is_cloneable) ? '<td width="25" class="someclass" title="' . $l['clone'] . '"><a href="' . $globals['ind'] . 'act=sclone&insid=' . $ik . '" ><img src="' . $theme['images'] . 'clone.gif" /></td></a> ' : '') . (empty($globals['disable_backup_restore']) ? '<td width="25" title="' . $l['backup'] . '" class="someclass"><a href="' . $globals['ind'] . 'act=backup&insid=' . $ik . '"><img src="' . $theme['images'] . 'backup.gif" /></td></a>' : '') . ' <td width="25" title="' . $l['editdetail'] . '" class="someclass"><a href="' . $globals['ind'] . 'act=editdetail&insid=' . $ik . '"><img src="' . $theme['images'] . 'editdetail.gif" /></td></a> ' . (asperapp(0, 0, 1) && !empty($can_publish) ? ' <td><a href="' . $globals['ind'] . 'act=publish&insid=' . $ik . '" title="' . $l['publish'] . '"><img src="' . $theme['images'] . 'publish.gif" /></td></a>' : '') . ' <td width="25" title="' . $l['remove'] . '" class="someclass"><a href="' . $globals['ind'] . 'act=remove&insid=' . $ik . '"><img src="' . $theme['images'] . 'remove.gif" /></a></td>' . (!empty($ccount) ? '<td colspan="' . $ccount . '"></td>' : '') . ' <td width="25"> <input type="checkbox" name="insids[]" id="' . $iv['softurl'] . '" value="' . $ik . '" class="soft_inslist"> </td> </tr>'; $i++; } } $info['overview'] .= '</table><br /> <p align="right" style="width:100%;"> <span class="sai_head">' . $l['with_selected'] . ':</span> <select name="multi_options" id="multi_options"> <option name="todo" id="todo" value="0">---</option> <option name="todo" id="todo" value="mult_rem">' . $l['remove'] . '</option> </select> <input type="button" value="' . $l['go'] . '" onclick="show_confirm()" class="sai_graybluebut"> <br /> </p> <div id="rem_div"></div> </div><!--end of bg2 class--> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ insids = new Array(); removed = new Object(); function show_confirm(){ insids = new Array(); removed = new Object(); if($_("multi_options").value != "mult_rem"){ return false; } // Build the list of Installations to remove var field = document.getElementsByName(\'insids[]\'); insids = new Array(); var c = 0; for(i = 0; i < field.length; i++){ if(field[i].checked == true){ insids[c] = field[i].value; c++; } } //alert(insids); if(c == 0){ alert("' . $l['no_sel_inst'] . '"); return false; } var r = confirm("' . $l['del_insid'] . '"); if(r != true){ return false; } remove_by_id(insids[0], "", 0); } function remove_by_id(insid, re, oldinsid){ removed[insid] = false; if(re.length > 0 && oldinsid > 0){ if(re == "removed"){ removed[insid] = true; } } nextinsid = 0; // Find the next INSTALLATION to remove for(i = 0; i < insids.length; i++){ if(typeof(removed[insids[i]]) != "undefined"){ continue; } nextinsid = insids[i]; break; } // If there is something left to be removed if(insid != 0){ try{ AJAX("' . $globals['index'] . 'act=remove&insid="+insid+"&ajax=1&ssk="+randomstring(32)+"&random="+Math.random(), "remove_by_id(\'"+nextinsid+"\', re, \'"+insid+"\')"); $_("rem_div").innerHTML = "<br /><br /><p align=\\"center\\"><img src=\\"' . $theme['images'] . 'ajax_remove.gif\\"> <br />' . $l['rem_inst_id'] . ' ID: " +insid+ ", URL: " + $_("insurl"+insid)+"<br /></p>"; return true; }catch(e){ return false; } } $_("rem_div").innerHTML = ""; alert("' . $l['inst_remvd'] . '"); location.reload(true); return true; } $(document).ready(function(){ $("#check_all").on("click", function(event){ if(this.checked == true){ $(".soft_inslist").prop("checked", true); }else{ $(".soft_inslist").prop("checked", false); } }); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); if(old_class == "nohover") return; //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); });'; // If we get anything in $highlight than only we have to call this JS function other wise it will cause the JS error. if (!empty($highlight)) { $info['overview'] .= 'goto_id("insurl' . $highlight . '"); $("#highlight").fadeOut(10000);'; } $info['overview'] .= '}); // ]]></script>'; } if (count($allcatwise[$software['type']][$software['cat']]) > 2 && $software['cat'] != 'others') { $info['overview'] .= '<br /><br /> <div class="bg2"> <table width="100%" class="table table-hover"> <tr> <th style="background:#EFEFEF" class="sai_head2">' . $l['related_scripts'] . '</th> </tr> </table>'; $i = 0; foreach ($allcatwise[$software['type']][$software['cat']] as $k => $v) { if ($k == $soft || !empty($scripts[$k]['parent']) && !empty($iscripts[$scripts[$k]['parent']])) { continue; } // Show only 5 scripts if ($i == 5) { break; } $info['overview'] .= ' <div style="text-decoration:none;display:inline-block;text-align:center;margin-top:10px;"> <a href="' . script_link($k) . '" title="' . $v['desc'] . '" width="80" alt="" class="someclass" style="text-decoration:none;margin-top:5px;"> <div class="sai_blog_script" style="margin-left:11%;"> <div class="sai_demo_script_logo"> <img src="' . $globals['mirror_images'] . 'top15/48/' . $v['softname'] . '.png" > </div> <div class="sai_script_name">' . $v['name'] . '</div> </div> </a> </div>'; $i++; } $info['overview'] .= '</div><!--end of bg2 class-->'; } //Parse and take care of images $info['features'] = '<div class="bg2"><br />' . softparse($info['features'], $soft) . '</div><!--end of bg2 class-->'; $info['ratings'] = ''; $info['screenshots'] = '<div class="bg2"><iframe src="" id="screenshots_iframe" style="width:100%;height:500px;" frameborder="0" scrolling="no"></iframe></div><!--end of bg class-->'; $info['reviews'] = '<div class="bg2"><div id="allreviews"></div></div><!--end of bg2 class-->'; foreach ($info as $k => $v) { if (in_array($k, array('demo', 'support', 'import', 'changelog'))) { continue; } echo '<div id="' . $k . '_win" style="display: ' . ($init_tab == $k ? "block" : "none") . '; width:100%;"><br /> ' . $v . ' </div>'; } echo '</div>'; softfooter(); }
function alias_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error; global $insid, $backed, $software, $soft, $done; global $alias_list; if (optGET('ajaxdel')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { echo '1' . $l['delete']; return true; } } if (optGET('ajaxalias')) { if (!empty($error)) { echo '0' . current($error); return false; } // Creating new table for display new DB if (!empty($done)) { $alias_list = $softpanel->alias(); echo '1 Alias Created Successfully'; alias_table(); return true; } } softheader($l['<title>']); error_handle($error, '100%'); echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var dompath = false; // For msgbox var message_box = function() { return { show_message: function(title, body , image) { var okbutton = \'<input style="width:75px" class="sai_submit" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, delete_message: function(title, body ,did) { var yesbutton = \'<input type="button" style="width:75px" onclick="message_box.yes_close_message(\\\'\'+did+\'\\\');" value="YES" class="sai_submit"/>\'; var nobutton = \'<input type="button" style="width:75px" onclick="message_box.no_close_message();" value="NO" class="sai_submit" />\'; var img = \'<img src="' . $theme['images'] . 'remove_big.gif" />\'; if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr ><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \' \' + nobutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message = \' <table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \' \' + nobutton + \'</td></tr></table>\' jQuery(\'.sai_message_box\').css(\'top\', jQuery(\'html, body\').scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); }, yes_close_message: function(did) { $(\'#did\'+did).attr("src","' . $theme['images'] . 'progress.gif"); jQuery(\'.sai_message_box\').hide(\'fast\'); $.ajax({ type: "POST", url: window.location+"&ajaxdel=1&delete_alias_id="+did, // checking for error success: function(data){ var result = data.substring(0,1); var msg = data.substring(1); if(result == "1"){ message_box.show_message( "Delete ",msg,2); $("#tr"+did).fadeOut(2000); } if(result == "0"){ message_box.show_message( "Error ",msg,1); } }, error: function(request,error) { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }, no_close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); function suggestdompath(domval){ if(dompath){ return true; } $_("aliaspath").value = "' . cleanpath($softpanel->user['homedir']) . '/www/"+$_("aliasname").value; } $(document).ready(function(){ jQuery(\'#butHide\').hide("fast"); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); // For showing ADD NEW $("#butShow").click(function() { jQuery(\'#showtemp\').slideDown(\'slide\',\'\',1000); jQuery(\'#butShow\').fadeOut(0); jQuery(\'#butHide\').fadeIn(0); }); // For hiding ADD NEW $("#butHide").click(function() { jQuery(\'#showtemp\').slideUp(\'slide\',\'\',1000); jQuery(\'#butHide\').fadeOut(0); jQuery(\'#butShow\').fadeIn(0); }); // For deleting record $(".delete").click(function() { var did = $(this).attr(\'id\'); did = did.substr(3); message_box.delete_message (\'Warning\',\'' . $l['alias_del_conf'] . '\',did); }); // for adding alias $(".submitalias").click(function() { $("#createalias").css("display", ""); var aliasname = ($("#aliasname").val()); var aliaspath = ($("#aliaspath").val()); $.ajax({ type: "POST", url: window.location+"&submitalias=1&ajaxalias=1", data: "aliasname="+aliasname+"&aliaspath="+aliaspath, // checking for error success: function(data){ $("#createalias").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ $_("aliasname").value=""; var msg = data.substring(2,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Done ",msg,2); $("#showtab").html(output); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); // For deleting record $(".delete").click(function() { var did = $(this).attr(\'id\'); did = did.substr(3); message_box.delete_message (\'Warning\',\'' . $l['alias_del_conf'] . '\',did); }); } if(result == "0"){ $("#createalias").css("display", "none"); var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); }); // ]]></script>'; echo '<table border="0" width="100%"><tr><td align="center" width="70%"><div class="sai_tit"><img src="' . $theme['a_images'] . 'alias.gif" /> ' . $l['alias_headling'] . ' </div></td><td align="center"><div id="butShow"><a href="javascript:void(0)" style="text-decoration:none;" class="sai_abut">' . $l['add_new_button'] . '</a></div> <div id="butHide"><a href="javascript:void(0)" style="text-decoration:none;" class="sai_abut">' . $l['back_button'] . '</a></div></td></tr></table> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br /><br /> <div id="showtemp" style="display:none"> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ // ]]></script> <table width="100%" cellpadding="5" cellspacing="1" align="center"> <tr> <td width="35%"> <span class="sai_head">' . $l['alias_label'] . '</span> <span class="sai_exp">' . $l['alias_name_eg'] . '</span><br /> <span class="sai_exp">' . $l['alias_name_notice'] . '</span> </td> <td valign="top"> <input type="text" name="aliasname" id="aliasname" onkeyup="suggestdompath(this);" size="30" value="' . POSTval('aliasname', '') . '" onfocus="" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['alias_path'] . '</span> <span class="sai_exp">' . $l['alias_path_eg'] . '</span><br /> <span class="sai_exp">' . $l['alias_path_notice'] . '</span> </td> <td valign="top"> <input type="text" name="aliaspath" id="aliaspath" size="30" value="' . cleanpath($softpanel->path) . '/www/' . '" onfocus="" /> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ //Add an event handler $_("aliaspath").onkeydown = function(){ dompath = true; } // ]]></script> </td> </tr> </table> <br /><br /> <p align="center"><input type="button" class="submitalias" style="cursor:pointer" name="submitalias" value="' . $l['submitalias'] . '" /> <img id="createalias" src="' . $theme['images'] . 'progress.gif" style="display:none"></p> </form><br /> <br /> </div> <div id="showtab">'; alias_table(); echo '</div><form accept-charset="' . $globals['charset'] . '" name="importsoftware" method="post" action="" onsubmit="return checkform();"> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(){ try{ if(!formcheck() || !checkdbname(\'softdb\', true)){ return false; } }catch(e){ //Do nothing } return true; }; '; echo '// ]]></script>'; softfooter(); }
function apps_theme() { global $user, $globals, $l, $theme, $softpanel, $apps, $iapps, $error; global $software, $soft, $info, $settings, $init_tab, $installed, $removed, $__settings, $notes, $cron, $overwrite_option, $nopackage, $install; if (optGET('notify')) { get_softaculous_file('http://api.softaculous.com/notifyappsversion.php?softid="' . $soft . '"'); echo 1; return true; } if (optGET('ajaxdownload') && !empty($nopackage)) { // Try to download the package if (method_exists($softpanel, 'updatesoftwares')) { $softpanel->downloadapp($soft, 0, 0, 1); echo 1; return true; } // False call echo 0; return false; } // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } softheader($l['<title>'] . $software['name']); $loadedinfo = array('overview', 'notes', 'features', 'reviews', 'ratings'); ?> <script language="JavaScript" src="<?php echo $theme['url'] . '/js/tabber.js'; ?> " type="text/javascript"> </script> <script language="JavaScript" id="ratings_js_file" type="text/javascript"></script> <script language="JavaScript" id="review_js_file" type="text/javascript"></script> <script language="JavaScript" id="reviews_js_file" type="text/javascript"></script> <script type="text/javascript"> tabs = new tabber; tabs.tabs = new Array('<?php echo implode('\', \'', $loadedinfo); ?> '); tabs.tabwindows = new Array('<?php echo implode('_win\', \'', $loadedinfo); ?> _win'); tabs.inittab = <?php echo '\'' . $init_tab . '\';'; ?> addonload('tabs.init();loadraterev();'); function loadraterev(){ <?php if (empty($globals['off_rating_link'])) { echo '$_(\'ratings_js_file\').src = "http://api.webuzo.com/ratingsjs.php?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } if (empty($globals['off_review_link'])) { echo '$_(\'review_js_file\').src = "http://api.webuzo.com/reviewjs.php?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; echo '$_(\'reviews_js_file\').src = "http://api.webuzo.com/reviewsjs.php?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } ?> }; function notifyversion(){ if(AJAX(window.location+"¬ify=true", "notified(re)")){ return false; }else{ return true; } }; function notified(re){ if(re == 1){ alert('<?php echo $l['notifyversion']; ?> '); } }; </script> <?php $url = $theme['images']; $ratings = array(); $deduct = 1; $r = $apps[$soft]['ratings']; for ($i_r = 1; $i_r <= 5; $i_r++) { if ($r >= 1) { $ratings[$i_r] = '<td><img src="' . $url . 'star.png' . '" alt="(' . number_format($apps[$soft]['ratings'], 2) . ' out of 5)" /></td>'; } elseif ($r > 0) { $ratings[$i_r] = '<td><img src="' . $url . 'halfstar.png' . '" alt="(' . number_format($apps[$soft]['ratings'], 2) . ' out of 5)" /></td>'; } else { $ratings[$i_r] = '<td><img src="' . $url . 'nostar.png' . '" alt="(' . number_format($apps[$soft]['ratings'], 2) . ' out of 5)" /></td>'; } $r = $r - $deduct; } // For custom themes if ($soft > 10000) { if (file_exists($globals['euthemes'] . '/' . $globals['theme_folder'] . '/images/topscripts/48/' . $iscripts[$soft]['softname'] . '.png')) { $custom_48 = $theme['images'] . 'topscripts/48/' . $iscripts[$soft]['softname'] . '.png'; } else { $custom_48 = $theme['images'] . '/custom.png'; } } echo '<div id="currentrating" style="display:none"></div> <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> <td width="10%" align="center">' . (!empty($custom_48) ? '<img src="' . $custom_48 . '" alt="">' : '<img src="' . $globals['mirror_images'] . 'webuzo/softimages/' . $soft . '__logo.gif" >') . '</td> <td width="90%" class="sai_process_heading" colspan="4">' . $software['name'] . '</td> </tr> <tr> <td align="center" width="10%">' . ($soft > 10000 ? '' : '<div class="someclass" title="' . $apps[$soft]['ratings'] . '"><table><tr>' . implode('', $ratings) . '</tr></table></div>') . '</td> <td valign="top" align="left" width="20%"> ' . $l['software_ver'] . ' : <font size="2"><b>' . (!empty($info['version']) ? $info['version'] : 'NA') . '</b></font> </td> <td align="left" width="60%"> ' . (!empty($info['release_date']) ? $l['release_date'] . ' : <font size="1"><b>' . $info['release_date'] . '</b></font>' : '') . ' </td> <td width="10%"> ' . (!empty($info['changelog']) ? ' <a href="javascript" onclick="$(\'#changelog_div\').bPopup(); return false;" class="sai_changelogbut" style="text-decoration:none;">' . $l['changelog'] . '</a>' : '') . ' </td> </tr> </table><br /> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sai_tabs"> <tr> <td><a href="javascript:tabs.tab(\'overview\')" class="sai_tab" id="overview">' . $l['overview'] . '</a></td> <td><a href="javascript:tabs.tab(\'notes\')" class="sai_tab" id="notes">' . $l['notes'] . '</a></td> <td><a href="javascript:tabs.tab(\'features\')" class="sai_tab" id="features">' . $l['features'] . '</a></td> ' . (empty($globals['off_rating_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'ratings\')" class="sai_tab" id="ratings">' . $l['ratings'] . '</a></td>' : '') . ' ' . (empty($globals['off_review_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'reviews\')" class="sai_tab" id="reviews">' . $l['reviews'] . '</a></td>' : '') . ' </tr> </table><br />'; // Parse and take care of images $info['overview'] = '<div id="fadeout_div">' . (!empty($info['changelog']) ? '<div id="changelog_div" class="sai_popup" style="display:none;"><span class="sai_clogbutton b-close"><span>X</span></span><div class="sai_changelog">' . $info['changelog'] . '</div></div>' : '') . ' <table width="100%" cellpadding="8" cellspacing="1" border="0"> <tr> ' . (!empty($scripts[$soft]['screenshots']) && empty($globals['panel_hf']) ? ' <td width="20%" valign="top"> <div id="overview_img"> <img src="' . $globals['mirror_images'] . 'softimages/screenshots/' . $soft . '_screenshot1.gif" width="500" alt="" > </div> </td>' : '') . ' <td valign="top" style="padding:10px;"> ' . softparse($info['overview'], $soft) . '<br /><br /> <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> <td width="10%" valign="top" align="center"><font color="#447edf"><i class="fa sai-disk fa-3x"></i></font></td> <td valign="top" width="40%"> <span class="sai_head">' . $l['space_req'] . '</span><br /> <span class="sai_exp">' . $l['available_space'] . ' : ' . (is_numeric($softpanel->spaceremain) ? number_format($softpanel->spaceremain / 1024 / 1024, 2) : $softpanel->spaceremain) . ' ' . $l['mb'] . '<br /> ' . $l['req_space'] . ' : ' . number_format($info['space'] / 1024 / 1024, 2) . ' ' . $l['mb'] . '</span> </td> <td valign="top" align="center" width="10%"><a href="' . $info['support'] . '"><font color="#447edf"><i class="fa sai-question fa-3x"></i></font></a></td> <td valign="top" width="40%"> <span class="sai_head">' . $l['software_support'] . '</span><br /> <span class="sai_exp"><a href="' . $info['support'] . '" target="_blank">' . $l['support_link'] . '</a><br /> ' . $l['support_note'] . '</span> </td> </tr> </table> </td> </tr> </table>'; // Which Version is this software ? $info['overview'] .= ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function show_ins_but(){ if($_("iagree").checked){ $("#softsubmitbut").show(); }else{ $("#softsubmitbut").hide(); } }; </script>'; if (!empty($installed)) { $info['overview'] = '<h3>' . $l['congrats'] . '</h3><br /> ' . $software['name'] . ' ' . $l['succesful'] . '<br /> ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['install_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft, 1) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . app_link($soft) . '">' . $l['return'] . '</a></b></center><!--PROC_DONE--><br /><br />'; if (empty($globals['install_tweet_off']) || empty($globals['lictype'])) { $info['overview'] .= '<form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <table border="0" cellpadding="5" cellspacing="1" align="center" class="sai_divroundshad"> <tr> <td colspan="2"> <font size="+1"><b>' . $l['install_tweet_sub'] . ' :</b></font> </td> </tr> <tr> <td valign="middle"> <textarea name="text" cols="60" row="3" style="resize:none">' . loadtweetdata('install_tweet', $l['install_tweet_classes']) . '</textarea> </td> <td valign="middle"> <input type="submit" value="Tweet!" class="sai_twitter-btn" onsubmit="return false;" id="twitter-btn"/> </td> </tr> </table> </form>'; } } elseif (!empty($removed)) { $info['overview'] = '<br /><br /><br /><div class="sai_success"><img src="' . $theme['images'] . 'notice.gif" /> ' . $l['uninstalled'] . '</div><!--PROC_DONE--><br /><br /> <center><b><a href="' . app_link($soft) . '">' . $l['return'] . '</a></b></center>'; } else { // Premium App | Just listed in Free to TEMPT the USER if (empty($globals['lictype']) && !empty($apps[$soft]['force_apps'])) { $info['overview'] .= '<center class="sai_anotice">' . lang_vars($l['not_in_free'], array($apps[$soft]['name'])) . '</center><br />'; } // The installer $info['overview'] .= '<br /> ' . error_handle($error, "100%", 0, 1) . '<form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware"> <p align="center">'; if (!empty($settings)) { // For set defaults check box display $is_display = 0; if (!empty($info['is_default'])) { foreach ($info['is_default'] as $k => $v) { if (array_key_exists($v, $iapps)) { $ins_display = 1; } } } // Is this app a dependency for any other application ? foreach ($iapps as $k => $v) { if (empty($v['deps'])) { continue; } if (in_array($apps[$soft]['softname'], $v['deps'])) { $rem_display = 1; } } if (!empty($ins_display) || !empty($rem_display)) { foreach ($settings as $group => $sets) { if ($group == 'hidden' || empty($sets)) { continue; } $ext_disp .= '<br /> <table width="100%" cellpadding="8" cellspacing="1" border="0" class="sai_divroundshad"> <tr class="nohover"> <td class="sai_heading_full" colspan="5">' . $group . '</td> </tr> '; foreach ($sets as $sk => $sv) { $ext_disp .= '<tr> <td width="50%"> <span class="sai_head">' . $sv['head'] . '</span> ' . (empty($sv['exp']) ? '' : '<br /><span class="sai_exp">' . $sv['exp'] . '</span>') . ' </td> <td valign="top"> ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? preg_replace('/>|\\/>/is', ' onkeyup="check_pass_strength();">', $sv['tag']) : $sv['tag']) . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? ' <a href="javascript: void(0);" onclick="$_(\'' . $sk . '\').value=randstr(10, 1);check_pass_strength();return false;" title="' . $l['randpass'] . '"><img src="' . $theme['images'] . 'randpass.gif" /></a> <div id="pass-strength-result" class="">' . $l['strength_indicator'] . '</div>' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && (!empty($softpanel->securepass) || !empty($globals['random_pass'])) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(10, 1);check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && !empty($globals['empty_pass']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/dbprefix/is', $sv['tag']) && !empty($globals['random_dbprefix']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(3)+"_";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['random_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(5);\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['empty_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['admin_prefix']) && empty($globals['empty_username']) && empty($globals['random_username']) && !empty($random_username) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'prepend_prefix("' . $globals['admin_prefix'] . '");\'); // ]]></script> ' : '') . ' </td> </tr>'; } $ext_disp .= '</table><br />'; } } //End of if($settings) } if (empty($iapps[$soft . '_1'])) { if (!empty($ins_display)) { $info['overview'] .= $ext_disp; } $info['overview'] .= '<center><input type="hidden" align="" name="install" id="softsubmit" value="install" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" value="' . $l['softsubmit'] . '" class="sai_graybluebut" /></center>'; } else { if (!empty($rem_display)) { $info['overview'] .= $ext_disp; } $info['overview'] .= '<center><input type="hidden" name="remove" id="softsubmit" value="remove" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" onclick="return confirm_remove();" value="' . $l['remove'] . '" class="sai_graybluebut" /></center>'; } $info['overview'] .= '<span id="show_txt" style="display:none;"></span> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> </p> </form> </div><br /> <div id="progress_bar" style="height:125px; display: none;"> <br /> <center> <font size="4" color="#222222" id="progress_txt">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;background-color:#efefef;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> <br /><center>' . $l['wait_note'] . '</center> </div> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function confirm_remove(){ var r = confirm("' . $l['del_insid'] . '"); if(r != true){ return false; } return true; } function checkform(dosubmit){ try{ if(!formcheck()){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(!get_package()){ return false; } if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if($_("softsubmit").value == "remove"){ show_msg("' . $l['removing'] . '"); }else{ if(dosubmit == 1){ $_("installsoftware").submit(); } show_msg("' . $l['installing'] . '"); } } return true; }; var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#overview_win", progress_div: "#progress_bar", formid: "#installsoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $("#progress_txt").html(txt); }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); try{ var sid = $_("softbranch").value; }catch(e){ var sid = ' . $soft . ' } var action = $("#softsubmitbut").val(); $.ajax({ url: window.location+"&jsnohf=1&soft="+sid+"&multi_ver=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ if(action == "Install"){ progressbar.text("' . addslashes($l['ins_finishing_process']) . '"); }else{ progressbar.text("' . addslashes($l['rem_finishing_process']) . '"); } progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Is the package there ? var nopackage = ' . (empty($nopackage) ? 0 : 1) . '; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } function get_package(){ if(nopackage){ show_msg("' . $l['downloading'] . '"); try{ AJAX("' . $globals['index'] . 'act=software&soft=' . $soft . '&ajaxdownload=1&random="+Math.random(), "get_package_handle(re)"); }catch(e){ } return false; }else{ $_("show_txt").style.display = "none"; return true; } }; function get_package_handle(resp){ nopackage = 0; show_msg("' . $l['installing'] . '"); checkform(1); }; </script> '; } //Parse and take care of images $info['features'] = softparse($info['features'], $soft, 1); $info['ratings'] = ''; $info['reviews'] = '<div id="allreviews"></div>'; foreach ($info as $k => $v) { if (in_array($k, array('demo', 'support', 'import', 'install'))) { continue; } echo '<div id="' . $k . '_win" style="display: ' . ($init_tab == $k ? "block" : "none") . ';"> ' . $v . ' </div>'; } softfooter(); }
function adv_software_theme() { global $theme, $globals, $user, $l, $langs, $skins, $error, $saved, $admintag, $admintag_catwise, $adv_software, $iscripts, $reset; softheader($l['<title>']); echo '<div class="sai_heading" align="center"> ' . $l['adv_software_head'] . '</div> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br />'; error_handle($error); if (!empty($saved)) { echo '<br /><div class="sai_success"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['settings_saved'] . '</div><br />'; } if (!empty($reset)) { echo '<br /><div class="sai_success"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['settings_reset'] . '</div><br />'; } if (!empty($admintag_catwise)) { echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function reset_field(input, field){ var this_page = "' . $globals['index'] . 'act=adv_software"; window.location = this_page+"&soft="+input; if(field){ window.location = this_page+"&soft="+input+"&field="+field; } }; function reset_all(){ var this_page = "' . $globals['index'] . 'act=adv_software"; window.location = this_page+"&reset_all="+1; }; function showtip(txt, el){ $_("stooltip").innerHTML = txt; var pos = findelpos(el); $_("stooltip").style.display = ""; var tipheight = parseInt($_("stooltip").offsetHeight); var tipwidth = parseInt($_("stooltip").offsetWidth); //alert(tipheight+" "+tipwidth); var abody = findelpos($_("abody")); var bodyWidth = abody[0] + $_("abody").offsetWidth if((pos[0] + tipwidth) > bodyWidth){ pos[0] = pos[0] - (pos[0] + tipwidth - bodyWidth) + 15; } $_("stooltip").style.left = pos[0]+"px"; $_("stooltip").style.top = (pos[1]-5-tipheight)+"px"; el.onmouseout = function(){ hidetip(); }; }; function hidetip(){ $_("stooltip").style.display = "none"; }; // ]]></script> <div id="stooltip" style="display:none; position:absolute; top: 0px; left: 0px; border: 1px solid #CCC; padding: 8px; background: #FFF; z-index:1000;"></div> <form accept-charset="' . $globals['charset'] . '" name="adv_software" method="post" action=""> <link href="' . $globals['mirror_images'] . 'sprites/20.css" rel="stylesheet" type="text/css" /> <table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_divroundshad"> <tr> <td colspan="2"> <table width="100%" cellpadding="5" cellspacing="1" border="0">'; //r_print($adv_software); //r_print($admintag_catwise); //Showing All scripts Category wise foreach ($admintag_catwise as $ak => $av) { echo '<tr> <td colspan="4"><center class=ribbonhead><b>' . strtoupper($ak) . ' Apps</b></center></td> </tr>'; echo '<tr> <td colspan="2"> <table width="107%" border="0" class="sai_ribboneffect" style="left:-26px;"> <tr> <td width="2%"></td> <td valign="top" width="280"> <br /><font class="bboxtxt" style="color:#FFF;"><b>' . $l['cat_' . $ak . '_' . $kk] . '</b></font> </td> <td align="center" style="cursor:pointer"> <font class="bboxtxt" style="color:#FFF;" id="enable" onmouseover="showtip(\'' . $l['enable_exp'] . '\', this);" ><b>' . $l['enable'] . '</b></font> </td> <td align="center" style="cursor:pointer"> <font class="bboxtxt" style="color:#FFF;" onmouseover="showtip(\'' . $l['default_exp'] . '\', this);" ><b>' . $l['default'] . '</b></font> </td> <td align="center" style="cursor:pointer"> <font class="bboxtxt" style="color:#FFF;" onmouseover="showtip(\'' . $l['editable_exp'] . '\', this);" ><b>' . $l['editable'] . '</b></font> </td> <td align="right" width="40"></td> </tr> </table> </td> </tr>'; foreach ($av as $kk => $vv) { if (empty($av[$kk])) { continue; } foreach ($vv as $k => $v) { //r_print($v); echo '<tr> <td> <table border="0" width="100%" id="td_' . $k . '" cellpadding="5" cellspacing="0" class="adv_cat"> <tr> <th colspan="4"> <table border="0" width="100%" cellpadding="3" cellspacing="0"> <tr> <td width="16"><div class="sp20_' . $iscripts[$k]['softname'] . '"></div></td> <td><font class="bboxtxt"><b>' . $iscripts[$k]['name'] . '</b></font></td> </tr> </table> </th> <th align="left" width="2%"> <img src="' . $theme['images'] . 'restore.gif" onclick="reset_field(' . $k . ')" onmouseover="showtip(\'' . lang_vars($l['reset_soft'], array($iscripts[$k]['name'])) . '\', this);" style="cursor:pointer"/> </th> </tr>'; foreach ($v as $dk => $dv) { //r_print($dv); $tmp = array(); echo '<tr> <td width="40%"> <font class="bboxtxt"><b>' . $dv['head'] . '</b></font> </td> <td align="center" width="10%"> <input type="checkbox" name="' . $k . '_' . $dk . '_enabled" id="' . $k . '_' . $dk . '_enabled" ' . POSTchecked($k . '_' . $dk . '_enabled', $dv['enabled']) . '> </td> <td width="30%">'; // Is it a checkbox or textbox or textarea ? if (preg_match('/^<textarea/is', $dv['tag'])) { $tmp['type'] = 'textarea'; } else { preg_replace('/^<input(.*?)type="(.*?)"/ies', '$tmp[\'type\'] = trim(\'$2\')', $dv['tag']); } // Is it checkbox ? if ($tmp['type'] == 'checkbox') { $tmp['default'] = isset($adv_software[$k][$dk]['default']) ? $adv_software[$k][$dk]['default'] == 'checked="checked"' ? 'checked="checked"' : '' : (preg_match('/checked="checked"/is', $dv['tag']) ? 'checked="checked"' : ''); echo '<center><input type="checkbox" name="' . $k . '_' . $dk . '_default" id="' . $k . '_' . $dk . '_default" ' . POSTchecked($k . '_' . $dk . '_default', $tmp['default']) . '></center>'; } // Is it a textbox ? if ($tmp['type'] == 'text') { preg_replace('/^<input(.*?)value="(.*?)"/ies', '$tmp[\'value\'] = trim(\'$2\')', $dv['tag']); if (isset($adv_software[$k][$dk]['default']) && !empty($adv_software[$k][$dk]['default'])) { $value = $adv_software[$k][$dk]['default']; } else { $value = $tmp['value']; } echo '<input type="text" name="' . $k . '_' . $dk . '_default" id="' . $k . '_' . $dk . '_default" value="' . POSTval($k . '_' . $dk . '_default', $value) . '" />'; } // Is it a textarea ? if ($tmp['type'] == 'textarea') { preg_replace('/^<textarea(.*?)>(.*?)<\\/textarea>/ies', '$tmp[\'value\'] = trim(\'$2\')', $dv['tag']); preg_replace('/^<textarea(.*?)cols="(.*?)"(.*?)>(.*?)<\\/textarea>/ies', '$tmp[\'cols\'] = trim(\'$2\')', $dv['tag']); preg_replace('/^<textarea(.*?)rows="(.*?)"(.*?)>(.*?)<\\/textarea>/ies', '$tmp[\'rows\'] = trim(\'$2\')', $dv['tag']); if (isset($adv_software[$k][$dk]['default']) && !empty($adv_software[$k][$dk]['default'])) { $value = $adv_software[$k][$dk]['default']; } else { $value = $tmp['value']; } echo '<textarea name="' . $k . '_' . $dk . '_default" id="' . $k . '_' . $dk . '_default"' . (!empty($tmp['cols']) ? ' cols="' . $tmp['cols'] . '"' : '') . (!empty($tmp['rows']) ? ' rows="' . $tmp['rows'] . '"' : '') . ' >' . POSTval($k . '_' . $dk . '_default', $value) . '</textarea>'; } echo '</td> <td align="center" width="10%"> <input type="checkbox" name="' . $k . '_' . $dk . '_editable" id="' . $k . '_' . $dk . '_editable" ' . POSTchecked($k . '_' . $dk . '_editable', $dv['editable']) . ' > </td> <td width="5%"> <img src="' . $theme['images'] . 'restore.gif" onclick="reset_field(' . $k . ', \'' . $dk . '\');" onmouseover="showtip(\'' . $l['reset'] . '\', this);" style="cursor:pointer"/> </td> </tr>'; } echo '</table> </td> </tr> <tr><td colspan="10"> </td></tr>'; } } } echo '</td></tr></table></td> </tr> </table> <br /> <p align="center"><input type="submit" name="save" value="' . $l['save'] . '" class="sai_graybluebut" > <input type="button" onclick="reset_all()" value="' . $l['reset_all'] . '" class="sai_graybluebut" ></p> </form>'; } else { echo '<h2 align="center">' . $l['no_results'] . '</h2>'; } softfooter(); }
function addplans_theme() { global $theme, $globals, $user, $l, $langs, $error, $reseller, $iscripts, $plans, $done, $_cpplan, $_users, $allcatwise, $_resellers, $loaded_scripts, $softpanel; softheader($l['<title>']); echo '<br /><form accept-charset="' . $globals['charset'] . '" name="addplan" method="post" action=""> <div class="sai_heading" align="center"><img src="' . $theme['images'] . 'admin/addplan.gif" /> ' . $l['title'] . '</div> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br /><br />' . (empty($globals['lictype']) ? '<div class="sai_notebox">' . $l['feature_not_available'] . '</div>' : '') . '<br />'; error_handle($error); if (!empty($done)) { echo '<div class="sai_notice"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['done'] . '</div><br />'; } echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ ids = new Array("' . implode('", "', array_keys($_users)) . '"); function checkalluser(checker){ for(x in ids){ $_("users_"+ids[x]).checked = checker.checked; changebg(ids[x], "users_"); } }; ids1 = new Array(' . implode(', ', array_keys($iscripts)) . '); function checkallsoftware(checker){ for(x in ids1){ $_("scripts_"+ids1[x]).checked = checker.checked; //change td background color changebg(ids1[x],"scripts_"); } }; ids2 = new Array("' . implode('", "', array_keys($_resellers)) . '"); function checkallreseller(checker){ for(x in ids2){ $_("resellers_"+ids2[x]).checked = checker.checked; changebg(ids2[x], "resellers_"); } }; ids3 = new Array("' . implode('", "', array_keys($_cpplan)) . '"); function checkallcpplan(checker){ for(x in ids3){ $_("cpplan_"+ids3[x]).checked = checker.checked; changebg(ids3[x], "cpplan_"); } }; function selectchkbox(id,type){ if($_(type+id).checked){ $_(type+id).checked = false; }else{ $_(type+id).checked = true; } //change td background color changebg(id,type); } function changebg(id,type){ try{ if($_(type+id).checked){ $("#td_"+id).css({ backgroundColor: "#C5EAFF" }); $("#td_"+id).css({boxShadow: "0 0 4px #3EA0DC"}); }else{ $_("td_"+id).style.background = "#ffffff"; $("#td_"+id).css({boxShadow: "0 0 4px #FFF"}); } }catch(e){} }; function checkall(){ // for users for(x in ids){ changebg(ids[x],"users_"); } // for scripts for(x in ids1){ changebg(ids1[x],"scripts_"); } // for scripts for(x in ids2){ changebg(ids2[x],"resellers_"); } // for scripts for(x in ids3){ changebg(ids3[x],"cpplan_"); } }; addonload("checkall();"); // ]]></script>'; /* $reseller $user*/ echo '<link href="' . $globals['mirror_images'] . 'sprites/20.css" rel="stylesheet" type="text/css" /> <table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_reviewform"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['planhead'] . '</b></font> </td> </tr> </table> </td> </tr> <tr> <td width="35%"> <span class="sai_head">' . $l['planname'] . '</span><br /> <span class="sai_exp2">' . $l['exp_plan'] . '</span> </td> <td valign="top">' . (defined('SOFTRESELLER') ? 'reseller_' . SOFTRESELLER . '_' : '') . ' <input type="text" name="planname" size="40" value="' . POSTval('planname', '') . '"> </td> </tr>'; if (!defined('SOFTRESELLER')) { echo '<tr> <td colspan="2"> <span class="sai_exp2">' . $l['default_plan_note'] . '</span><br /> </td> </tr>'; } echo '</table><br /><br />'; // Are there control panel plans if (!empty($_cpplan)) { echo '<table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_divroundshad"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['cpanelplan'] . '</b></font> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <span>' . $l['cpplanselect'] . '</span><br /><br /> <span class="sai_exp2">' . $l['select_all'] . '<input type="checkbox" onclick="checkallcpplan(this);" /></span> <span class="sai_exp2">' . $l['overwrite_settings'] . '<input type="checkbox" name="cpplansetting"/></span> </td> </tr> <tr> <td colspan="2"> <table width="100%" cellpadding="10" cellspacing="1" border="0">'; $i = 0; foreach ($_cpplan as $k => $v) { if (is_int($i / 4)) { echo '<tr>'; } echo '<td id="td_' . $k . '" valign="top" > <input type="checkbox" id="cpplan_' . $k . '" name="cpplan_' . $k . '" ' . POSTchecked('cpplan_' . $k, '') . ' onclick="changebg(\'' . $k . '\',\'cpplan_\');" /> <a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\'' . $k . '\',\'cpplan_\');"><font class="sai_bboxtxt">' . $v['original_key'] . '</font></a></td>'; $i++; if (is_int($i / 4)) { echo '</tr>'; } } echo '</table> </td> </tr> </table><br /><br />'; } if (!defined('SOFTRESELLER') && method_exists('softpanel', 'listresellers')) { echo '<table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_divroundshad"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['resellerselect'] . '</b></div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <span>' . $l['exp_resellerselect'] . '</span><br /><br /> <span class="sai_exp2">' . $l['select_all'] . '<input type="checkbox" onclick="checkallreseller(this);" /></span> <span class="sai_exp2">' . $l['overwrite_settings'] . '<input type="checkbox" name="resellersetting"/></span> </td> </tr> <tr> <td colspan="2"> <table width="100%" cellpadding="5" cellspacing="1">'; $i = 0; foreach ($_resellers as $k => $v) { if (is_int($i / 4)) { echo '<tr>'; } echo '<td id="td_' . $k . '"><input type="checkbox" id="resellers_' . $k . '" name="resellers_' . $k . '" ' . POSTchecked('resellers_' . $k, '') . ' onclick="changebg(\'' . $k . '\',\'resellers_\');"/><img src="' . $theme['images'] . 'reseller15.png" style="margin-bottom:4px;> <a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\'' . $k . '\',\'resellers_\');"><font class="sai_bboxtxt">' . $k . '</font></a></td>'; $i++; if (is_int($i / 4)) { echo '</tr>'; } } echo '</table> </td> </tr> </table><br /><br />'; } echo '<table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_divroundshad"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['userselect'] . '</b></div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <span>' . $l['exp_userselect'] . '</span><br /><br /> <span class="sai_exp2">' . $l['select_all'] . '<input type="checkbox" onclick="checkalluser(this);" /></span> <span class="sai_exp2">' . $l['overwrite_settings'] . '<input type="checkbox" name="usersetting" /></span> </td> </tr> <tr> <td colspan="2"> <table width="100%" cellpadding="10" cellspacing="1" border="0">'; $i = 0; foreach ($_users as $k => $v) { if (is_int($i / 4)) { echo '<tr>'; } echo '<td id="td_' . $k . '" valign="top"> <input type="checkbox" id="users_' . $k . '" name="users_' . $k . '" ' . POSTchecked('users_' . $k, '') . ' onclick="changebg(\'' . $k . '\',\'users_\');" /> <img src="' . $theme['images'] . 'user15.png" style="margin-bottom:4px;"> <a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\'' . $k . '\',\'users_\');"><font class="sai_bboxtxt">' . $v['original_key'] . '</font></a></td>'; $i++; if (is_int($i / 4)) { echo '</tr>'; } } echo '</table> </td> </tr> </table><br /><br /> <table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_divroundshad"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['scriptselect'] . '</b></div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <span>' . $l['exp_scriptselect'] . '</span><br /><br /> <span class="sai_exp2">' . $l['select_all'] . '<input type="checkbox" onclick="checkallsoftware(this);" /></span> </td> </tr> <tr> <td colspan="2"> <table width="100%" cellpadding="5" cellspacing="1" border="0">'; //r_print($allcatwise); //Showing All scripts Category wise foreach ($allcatwise as $ak => $av) { if (empty($allcatwise[$ak])) { continue; } echo '<tr> <td colspan="4"><center class=ribbonhead><b>' . strtoupper($ak) . ' Apps</b></center></td> </tr>'; foreach ($av as $kk => $vv) { if (empty($av[$kk])) { continue; } echo '<tr> <td colspan="2"> <div class="sai_ribbonhead">' . $l['cat_' . $ak . '_' . $kk] . '</div> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /> </td> </tr>'; $i = 0; foreach ($vv as $k => $v) { if (is_int($i / 4)) { echo '<tr>'; } echo '<td width="20%"> <table width="100%" border="0" id="td_' . $k . '"> <tr> <td width="10%"> <input type="checkbox" id="scripts_' . $k . '" name="scripts_' . $k . '" ' . POSTchecked('scripts_' . $k, '') . ' onclick="changebg(\'' . $k . '\',\'scripts_\');"/> </td> <td width="15%"> <div class="sp20_' . $v['softname'] . '"></div> </td> <td> <a href="javascript:void(0)" style="text-decoration: none; " onclick="selectchkbox(\'' . $k . '\',\'scripts_\');" ><font class="sai_bboxtxt">' . $v['name'] . '</font></a> </td> </tr> </table> </td>'; $i++; if (is_int($i / 4)) { echo '</tr>'; } } } } echo '</table></td> </tr> </table> <p align="center"><input type="submit" name="saveplan" value="' . $l['saveplan'] . '" class="sai_graybluebut" ></p>' . (empty($globals['lictype']) ? '<div class="sai_notebox">' . $l['feature_not_available'] . '</div>' : '') . '<br /> </form>'; softfooter(); }
function java_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $allcatwise; global $software, $soft, $info, $settings, $init_tab, $dbtype, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $cron, $datadir, $ajaxdb, $ajaxdbexists, $overwrite_option, $protocols, $nopackage, $www, $ajaxhttpsexists, $ajaxhttps, $new_insid; if (optGET('notify')) { get_softaculous_file('http://www.softaculous.com/notifyversion.php?softid="' . $soft . '"'); echo 1; return true; } if (optGET('ajaxdownload') && !empty($nopackage)) { // Try to download the package if (method_exists($softpanel, 'updatesoftwares')) { $softpanel->updatesoftwares($soft, 0, 0, 1); echo 1; return true; } // False call echo 0; return false; } // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } if (!empty($ajaxdb)) { echo $ajaxdbexists; return true; } if (!empty($ajaxhttps)) { echo $ajaxhttpsexists; return true; } // Auto Installation responses if (isset($_GET['autoinstall'])) { // Installed successfully if (!empty($installed)) { echo 'installed'; return true; } // Are there errors if (!empty($error)) { echo serialize($error); return false; } } //First add the installation info if (empty($installed)) { $random_username = true; // This is to see if a script has predefined username and cannot be changed foreach ($settings as $ik => $iv) { if ($ik == 'hidden') { continue; } foreach ($iv as $ikk => $ivv) { if ($ikk == 'admin_username' && preg_match('/disabled=\\"disabled\\"/ie', $ivv['tag'])) { $random_username = false; } } } $info['install'] = '<div id="fadeout_div"><form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware"> ' . error_handle($error, "100%", 0, 1) . ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function toggle_advoptions(){ if ($("#advoptions").is(":hidden")){ $("#advoptions").slideDown("slow"); $("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'minus_new.gif"); } else{ $("#advoptions").slideUp("slow"); $("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'plus_new.gif"); } } function plus_onmouseover(){ $("#plus").attr("src", "' . $theme['images'] . 'plus_hover.gif"); } function plus_onmouseout(){ $("#plus").attr("src", "' . $theme['images'] . 'plus.gif"); } function display_pass_strength(score, per){ var lang; //disp_per = $("#pass-strength-hidden").val(); if(typeof per == "undefined") per = 0; if(score == "bad") lang = "' . $l['bad'] . '"; if(score == "good") lang = "' . $l['good'] . '"; if(score == "strong") lang = "' . $l['strong'] . '"; if(score == "short") lang = "' . $l['short'] . '"; if(score == "strength_indicator") lang = "' . $l['strength_indicator'] . '"; $("#pass-strength-result").addClass(score).html( lang+" ("+per+"/100)" ); } function checkform(dosubmit){ // If admin has set the password strength than only we will check for it. ' . (!empty($globals['pass_strength']) ? ' //alert($("#pass-strength-hidden").val()); if(parseInt($("#pass-strength-hidden").val()) < ' . $globals['pass_strength'] . '){ alert("' . $l['err_pass_strength'] . '"+' . $globals['pass_strength'] . '); return false; }' : '') . ' try{ if(!formcheck()){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(!get_package()){ return false; } if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if(dosubmit == 1){ $_("installsoftware").submit(); } show_msg("' . $l['installing'] . '"); } return true; }; var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#installsoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); $.ajax({ url: window.location+"&jsnohf=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); show_backup(); check_pass_strength(); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Is the package there ? var nopackage = ' . (empty($nopackage) ? 0 : 1) . '; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } function get_package(){ if(nopackage){ show_msg("' . $l['downloading'] . '"); try{ AJAX("' . $globals['index'] . 'act=java&soft=' . $soft . '&ajaxdownload=1&random="+Math.random(), "get_package_handle(re)"); }catch(e){ } return false; }else{ $_("show_txt").style.display = "none"; return true; } }; function get_package_handle(resp){ nopackage = 0; show_msg("' . $l['installing'] . '"); checkform(1); }; softemail = new Object(); function softmail(){ try{ var sofdom = "softdomain"; for(x in softemail){ if(softemail[x] == true) continue; var temp = $_(x).value.split("@"); if($_(sofdom).value.indexOf("/") > 0){ var dom_value = $_(sofdom).value.substring(0, $_(sofdom).value.indexOf("/")); }else{ var dom_value = $_(sofdom).value; } $_(x).value = temp[0] + "@" + dom_value; } }catch(e){ return false; } }; function checkhttps(proto_id, softdomain_id, alrt){ try{ var id = $_(proto_id); var proto = id.options[id.selectedIndex].text; $("#checkhttps_wait").css("display","inline-block"); if(proto.indexOf("https") !== -1){ $.ajax({ type: "POST", url: "' . $globals['index'] . 'act=java&soft=' . $soft . '&checkhttps="+encodeURIComponent(proto+$_(softdomain_id).value), timeout:10000, // Checking for error success: function(data){ $("#checkhttps_wait").css("display","none"); is_https(data); }, error: function(jqXHR, status, e) { $("#checkhttps_wait").css("display","none"); is_https(e); return false; } }); //AJAX("' . $globals['index'] . 'act=software&soft=' . $soft . '&checkhttps="+id.options[id.selectedIndex].text+$_(softdomain_id).value, "is_https(re)"); }else{ $("#checkhttps_wait").css("display","none"); is_https("true"); } if(alrt == true){ alert(proto+$_(softdomain_id).value); } }catch(e){ // } return true; }; function is_https(re){ try{ httpserror = ""; //Check if it exists if(re !== "true"){ httpserror = "' . $l['no_https'] . '"; } if(httpserror != ""){ $_("httpserror").style.display = "block"; $_("httpserror").innerHTML = httpserror; return false; }else{ $_("httpserror").style.display = "none"; } }catch(e){ // } return true; }; function prepend_prefix(prefix){ // Decide prefix USERNAME, DOMAIN OR USER DEFINED if(prefix != "" && prefix == "username") prefix = "' . $softpanel->user['name'] . '"; if(prefix != "" && prefix == "domain") prefix = "' . current(array_keys($softpanel->domainroots)) . '"; if(prefix != "" && prefix != "domain" && prefix != "username"); // APPEND OLD USERNAME OR DEFAULT USERNAME var old = $_("admin_username").value temp = $_("admin_username").value.split("-"); if (typeof temp[1] == \'string\' || temp[1] instanceof String){ $_("admin_username").value = prefix+"-"+temp[1]; }else{ $_("admin_username").value = prefix+"-"+old; } } function change_admin_prefix(domain){ var admin_prefix = \'' . $globals['admin_prefix'] . '\'; var random_username = \'' . (!empty($random_username) ? 'true' : '') . '\'; var empty_username = \'' . (empty($globals['empty_username']) ? 'true' : '') . '\'; var gl_random_username = \'' . (empty($globals['random_username']) ? 'true' : '') . '\'; if(admin_prefix == "domain" && random_username == "true" && empty_username == "true" && gl_random_username == "true"){ prepend_prefix(domain); } } // show/hide backup options function show_backup(){ var auto_backup = $("#auto_backup").val(); if(auto_backup == 0){ $("#auto_backup_rotation").attr("disabled", true); }else{ $("#auto_backup_rotation").attr("disabled", false); } return true; }; ' . (!empty($_POST) ? '' : 'addonload(\'softmail();show_backup();\');'); if (!empty($dbtype)) { $info['install'] .= 'function checkdbname(id, alrt){ try{ AJAX("' . $globals['index'] . 'act=java&soft=' . $soft . '&checkdbexists="+$_(id).value, "dbexists(\'"+id+"\', "+alrt+", re)"); }catch(e){ // } return true; }; function dbexists(id, alrt, re){ try{ dberror = ""; //Is the length fine if($_(id).value.length > 7){ dberror = "' . $l['db_name_long'] . '"; } //There should be only alphanumeric characters if(/[^a-zA-Z0-9]/.test($_(id).value)){ dberror = "' . $l['db_alpha_num'] . '"; } //Check if it exists if(re == "true"){ dberror = "' . $l['database_exists'] . '"; } if(dberror != ""){ $_(id+"error").style.display = "block"; $_(id+"error").innerHTML = dberror; if(alrt == true){ alert(dberror); } return false; }else{ $_(id+"error").style.display = "none"; } }catch(e){ // } return true; };'; } //End of if($dbtype) $info['install'] .= '// ]]></script>'; if (empty($globals['lictype']) && !empty($scripts[$soft]['force_scripts'])) { $info['install'] .= '<center class="sai_anotice">' . lang_vars($l['not_in_free'], array($software['name'])) . (!webuzo() ? ' ' . $l['notify_admin'] : '') . '</center><br />'; } $info['install'] .= ' <table width="100%" cellpadding="8" cellspacing="0" border="0" class="sai_divroundshad"> <tr> <td class="sai_heading_full" colspan="2">' . $l['setup'] . '</td> </tr>'; if (empty($softpanel->noprotocol) && empty($globals['hide_protocol'])) { $info['install'] .= '<tr> <td> <span class="sai_head">' . $l['choose_protocol'] . '</span><br /> <span class="sai_exp">' . $l['choose_protocol_exp'] . '</span> </td> <td valign="top"> <select name="softproto" id="softproto" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($protocols as $k => $v) { $info['install'] .= '<option value="' . $k . '" ' . (!empty($_POST['softproto']) && $_POST['softproto'] == $k ? 'selected="selected"' : '') . '>' . $v . '</option>'; } $info['install'] .= '</select><div style="display:none;" id="checkhttps_wait"> <img src="' . $theme['images'] . 'progress.gif" alt="please wait.."></div><br /> <span id="httpserror" style="background: #FDB3B3; display:none; width:200px;"></span> </td> </tr>'; } $info['install'] .= '<tr> <td width="50%"> <span class="sai_head">' . $l['choose_domain'] . '</span><br /> <span class="sai_exp">' . $l['choose_domain_exp'] . '</span> </td> <td> <select name="softdomain" id="softdomain" onchange="softmail();change_admin_prefix(this.value);" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; if (!empty($globals['blank_domain'])) { $info['install'] .= '<option value="" ' . (empty($_POST['softdomain']) ? 'selected="selected"' : '') . '>(' . $l['select_domain'] . ')</option>'; } foreach ($softpanel->webroots as $domain => $dompath) { $info['install'] .= '<option value="' . $domain . '" ' . (!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain ? 'selected="selected"' : '') . '>' . $domain . '</option>'; } $info['install'] .= '</select> </td> </tr> <tr> <td> <span class="sai_head">' . $l['in_directory'] . '</span><br /> <span class="sai_exp">' . $l['in_directory_exp'] . '</span> </td> <td valign="top"> <input type="text" name="softdirectory" id="softdirectory" size="30" value="' . POSTval('softdirectory', !empty($globals['no_prefill']) ? '' : $software['softname']) . '" /> </td> </tr>'; // A data Directory ? if (!empty($datadir)) { $info['install'] .= '<tr> <td> <span class="sai_head">' . $l['datadir'] . '</span><br /> <span class="sai_exp">' . $l['datadir_exp'] . '</span> </td> <td valign="top"> <input type="text" name="datadir" id="datadir" size="30" value="' . POSTval('datadir', $datadir) . '" /> </td> </tr>'; } if (!empty($dbtype)) { $dbname = mysqldbname($software['softname']); if (method_exists($softpanel, 'mysqldbname')) { $dbname = $softpanel->mysqldbname(); } if (empty($dbtype) || aefer()) { $info['install'] .= ' <tr> <td> <span class="sai_head">' . $l['database_name'] . '</span><br /> <span class="sai_exp">' . $l['database_name_exp'] . '</span> </td> <td valign="top"> <input type="text" name="softdb" id="softdb" size="30" value="' . POSTval('softdb', $dbname) . '" onblur="checkdbname(\'softdb\', false)" /><br /> <span id="softdberror" style="background: #FDB3B3; display:none; width:200px;"></span> </td> </tr>'; } } // Are there any cron jobs if (!empty($cron)) { $info['install'] .= '<tr> <td> <span class="sai_head">' . $l['cron_job'] . '</span><br /> <span class="sai_exp">' . $l['cron_job_exp'] . '</span> </td> <td valign="top"> <table width="100%" cellpadding="2" cellspacing="1"> <tr> <td>' . $l['cron_min'] . '</td> <td>' . $l['cron_hour'] . '</td> <td>' . $l['cron_day'] . '</td> <td>' . $l['cron_month'] . '</td> <td>' . $l['cron_weekday'] . '</td> </tr> <tr> <td><input type="text" name="cron_min" id="cron_min" size="2" value="' . POSTval('cron_min', $cron['min']) . '" /></td> <td><input type="text" name="cron_hour" id="cron_hour" size="2" value="' . POSTval('cron_hour', $cron['hour']) . '" /></td> <td><input type="text" name="cron_day" id="cron_day" size="2" value="' . POSTval('cron_day', $cron['day']) . '" /></td> <td><input type="text" name="cron_month" id="cron_month" size="2" value="' . POSTval('cron_month', $cron['month']) . '" /></td> <td><input type="text" name="cron_weekday" id="cron_weekday" size="2" value="' . POSTval('cron_weekday', $cron['weekday']) . '" /></td> </tr> </table> </td> </tr>'; } if (!empty($overwrite_option)) { $info['install'] .= '<tr> <td> <span class="sai_head">' . $l['overwrite'] . '</span> </td> <td valign="top"> <input type="checkbox" name="overwrite_existing" id="overwrite_existing" /> </td> </tr>'; } $info['install'] .= '</table>'; if (!empty($settings)) { if (file_exists($software['path'] . '/install.js')) { $info['install'] .= '<script language="javascript" type="text/javascript"><!--// --><![CDATA['; $info['install'] .= @parselanguages(str_replace('$(', '$_(', implode('', file($software['path'] . '/install.js')))); $info['install'] .= '// ]]></script>'; } foreach ($settings as $group => $sets) { if ($group == 'hidden' || empty($sets)) { continue; } $info['install'] .= '<br /> <table width="100%" cellpadding="8" cellspacing="0" border="0" class="sai_divroundshad"> <tr> <td class="sai_heading_full" colspan="2">' . $group . '</td> </tr>'; foreach ($sets as $sk => $sv) { $info['install'] .= '<tr> <td width="50%"> <span class="sai_head">' . $sv['head'] . '</span> ' . (empty($sv['exp']) ? '' : '<br /><span class="sai_exp">' . $sv['exp'] . '</span>') . ' </td> <td valign="top"> ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? preg_replace('/>|\\/>/is', ' onkeyup="check_pass_strength();">', $sv['tag']) : $sv['tag']) . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? ' <a href="javascript: void(0);" onclick="$_(\'' . $sk . '\').value=randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . ');check_pass_strength();return false;" title="' . $l['randpass'] . '"><img src="' . $theme['images'] . 'randpass.gif" /></a> <div id="pass-strength-result" class="">' . $l['strength_indicator'] . '</div>' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && (!empty($softpanel->securepass) || !empty($globals['random_pass'])) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . ');check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && !empty($globals['empty_pass']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";\'); // ]]></script> ' : '') . ' ' . (preg_match('/dbprefix/is', $sv['tag']) && !empty($globals['random_dbprefix']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(3)+"_";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['random_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(5);\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['empty_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['admin_prefix']) && empty($globals['empty_username']) && empty($globals['random_username']) && !empty($random_username) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'prepend_prefix("' . $globals['admin_prefix'] . '");\'); // ]]></script> ' : '') . ' </td> </tr>'; } $info['install'] .= '</table>'; } //The Hidden groups if (!empty($settings['hidden'])) { foreach ($settings['hidden'] as $sk => $sv) { $info['install'] .= $sv['tag'] . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : ''); } } } //End of if($settings) //Is it a SOFTCOPY, then Leave a NOTE if (!empty($setupcontinue)) { $info['install'] .= '<br />' . $l['softcopy_note'] . '<br /><br />'; } // Advance option $info['install'] .= ' <br /><br /> <table width="100%" cellpadding="8" cellspacing="1" border="0" class="sai_divroundshad"> <tr class="nohover"> <td class="sai_heading_full" colspan="5" id="advoptions_toggle" onclick="toggle_advoptions(\'advoptions\');" class="sai_heading_full" style="cursor:pointer" ><img id="advoptions_toggle_plus" src="' . $theme['images'] . 'plus_new.gif" /> ' . $l['adv_option'] . '</td> </tr> <tr> <td> <div id="advoptions" style="display:none;"> <table border="0" cellpadding="5" cellspacing="0" width="100%"> ' . (aefer() ? "" : '<tr> <td> <span class="sai_head">' . $l['database_name'] . '</span><br /> <span class="sai_exp">' . $l['database_name_exp'] . '</span> </td> <td valign="top"> <input type="text" name="softdb" id="softdb" size="30" value="' . POSTval('softdb', $dbname) . '" onblur="checkdbname(\'softdb\', false)" /><br /> <span id="softdberror" style="background: #FDB3B3; display:none; width:200px;"></span> </td> </tr>') . ' <tr> <td width="50%"> <span class="sai_head">' . $l['disable_notify_update'] . '</span><br /> <span class="sai_exp">' . $l['exp_disable_notify_update'] . '</span> </td> <td> <input type="checkbox" name="disable_notify_update" id="disable_notify_update" ' . POSTchecked('disable_notify_update') . ' /> </td> </tr>'; // Auto backups option only if backups is not disabled and panel is not remote if (empty($globals['disable_backup_restore']) && empty($globals['disable_auto_backup']) && !aefer() && empty($softpanel->disable_auto_backup)) { $info['install'] .= '<tr> <td width="50%"> <span class="sai_head">' . $l['auto_backup'] . '</span><br /> <span class="sai_exp">' . $l['exp_auto_backup'] . '</span> </td> <td> <select name="auto_backup" id="auto_backup" onchange="show_backup();"> <option value="0" ' . POSTselect('auto_backup', '0', 1) . '>' . $l['no_backup'] . '</option>' . (empty($globals['disable_auto_backup_daily']) ? '<option value="daily" ' . POSTselect('auto_backup', 'daily') . '>' . $l['daily'] . '</option>' : '') . (empty($globals['disable_auto_backup_weekly']) ? '<option value="weekly" ' . POSTselect('auto_backup', 'weekly') . '>' . $l['weekly'] . '</option>' : '') . (empty($globals['disable_auto_backup_monthly']) ? '<option value="monthly" ' . POSTselect('auto_backup', 'monthly') . '>' . $l['monthly'] . '</option>' : '') . ' </select> </td> </tr> <tr> <td width="50%"> <span class="sai_head">' . $l['auto_backup_rotation'] . '</span><br /> <span class="sai_exp">' . $l['exp_auto_backup_rotation'] . '</span> </td> <td> <select name="auto_backup_rotation" id="auto_backup_rotation">'; for ($i = 0; $i <= 10; $i++) { // Do we have a limit from admin ? if (!empty($globals['auto_backup_limit']) && ($i > $globals['auto_backup_limit'] || $i == 0) || !empty($globals['max_backups']) && ($i > $globals['max_backups'] || $i == 0)) { continue; } $info['install'] .= '<option value="' . $i . '" ' . POSTselect('auto_backup_rotation', $i, $i == 4 ? '1' : '0') . '>' . (empty($i) ? $l['unlimited'] : $i) . '</option>'; } $info['install'] .= '</select> </td> </tr>'; } $info['install'] .= '</table> </div> </td> </tr> </table>'; $info['install'] .= '<p align="center"> <input type="hidden" name="softsubmit" id="softsubmit" value="' . $l['softsubmit'] . '" /> <input type="hidden" name="pass-strength-hidden" id="pass-strength-hidden" value="" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" value="' . $l['softsubmit'] . '" class="sai_graybluebut" /><span id="show_txt" style="display:none;"></span> <br /><br /><br /> ' . (empty($globals['off_email_link']) && empty($globals['off_install_mail']) ? $l['ins_emailto'] . ' : <input type="text" name="emailto" id="emailto" size="20" value="' . POSTval('emailto', '') . '" />' : '') . ' </p> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> </form></div> <div id="progress_bar" style="height:125px; display: none;"> <br /> <center> <font size="4" color="#222222" id="progress_txt">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;background-color:#efefef;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> <br /><center>' . $l['wait_note'] . '</center> </div> <br /><br /><br />'; } elseif (!empty($installed)) { $info['install'] = '<h3>' . $l['congrats'] . '</h3><br /> ' . $software['name'] . ' ' . $l['succesful'] . ' : <br /> <a href="' . $__settings['softurl'] . '" target="_blank">' . $__settings['softurl'] . '</a> ' . (!empty($software['adminurl']) ? '<br />' . $l['admin_url'] . ' : <a href="' . $__settings['softurl'] . '/' . $software['adminurl'] . '" target="_blank">' . $__settings['softurl'] . '/' . $software['adminurl'] . '</a>' : '') . '<br /><br /> ' . (!empty($setupcontinue) ? $l['setup_continue'] . ' : <br /> <a href="' . $__settings['softurl'] . '/' . $setupcontinue . '" target="_blank">' . $__settings['softurl'] . '/' . $setupcontinue . '</a><br /><br />' : '') . ' ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['install_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $new_insid . '&postact=install">' . $l['return'] . '</a></b></center><br /><br />'; if (empty($globals['install_tweet_off']) || empty($globals['lictype'])) { $info['install'] .= '<form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <table border="0" cellpadding="5" cellspacing="1" align="center" class="sai_divroundshad"> <tr> <td colspan="2"> <font size="+1"><b>' . $l['install_tweet_sub'] . ' :</b></font> </td> </tr> <tr> <td valign="middle"> <textarea name="text" cols="60" row="3" style="resize:none">' . loadtweetdata('install_tweet', $l['install_tweet']) . '</textarea> </td> <td valign="middle"> <input type="submit" value="Tweet!" class="sai_twitter-btn" onsubmit="return false;" id="twitter-btn"/> </td> </tr> </table> </form>'; } $info['install'] .= '<!--PROC_DONE--> <br /><br />'; } softheader($l['<title>'] . $software['name']); $loadedinfo = array('install', 'overview', 'features', 'reviews', 'screenshots', 'ratings'); ?> <script language="JavaScript" src="<?php echo $theme['url'] . '/js/tabber.js'; ?> " type="text/javascript"> </script> <script language="JavaScript" id="ratings_js_file" type="text/javascript"></script> <script language="JavaScript" id="review_js_file" type="text/javascript"></script> <script language="JavaScript" id="reviews_js_file" type="text/javascript"></script> <script type="text/javascript"> tabs = new tabber; tabs.tabs = new Array('<?php echo implode('\', \'', $loadedinfo); ?> '); tabs.tabwindows = new Array('<?php echo implode('_win\', \'', $loadedinfo); ?> _win'); tabs.inittab = <?php echo '\'' . $init_tab . '\';'; ?> addonload('tabs.init();loadraterev();check_pass_strength();'); function loadraterev(){ <?php if (empty($globals['off_rating_link']) && $soft < 10000) { echo '$_(\'ratings_js_file\').src = "https://www.softaculous.com/ratings.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } if (empty($globals['off_review_link']) && $soft < 10000) { echo '$_(\'review_js_file\').src = "https://www.softaculous.com/review.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; echo '$_(\'reviews_js_file\').src = "https://www.softaculous.com/reviews.js?soft=' . $soft . '&user='******'name'] . '&timezone=' . $globals['timezone'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } ?> }; function notifyversion(){ if(AJAX(window.location+"¬ify=true", "notified(re)")){ return false; }else{ return true; } }; function notified(re){ if(re == 1){ alert('<?php echo $l['notifyversion']; ?> '); } }; function loadScreenshots(){ $_('screenshots_iframe').src = '<?php echo 'https://www.softaculous.com/screenshots/screenshots1.php?sid=' . $soft; ?> '; }; </script> <?php $url = $theme['images']; $ratings = array(); $deduct = 1; $r = $scripts[$soft]['ratings']; for ($i_r = 1; $i_r <= 5; $i_r++) { if ($r >= 1) { $ratings[$i_r] = '<td><img src="' . $url . 'star.png' . '" alt="(' . number_format($scripts[$soft]['ratings'], 2) . ' out of 5)" /></td>'; } elseif ($r > 0) { $ratings[$i_r] = '<td><img src="' . $url . 'halfstar.png' . '" alt="(' . number_format($scripts[$soft]['ratings'], 2) . ' out of 5)" /></td>'; } else { $ratings[$i_r] = '<td><img src="' . $url . 'nostar.png' . '" alt="(' . number_format($scripts[$soft]['ratings'], 2) . ' out of 5)" /></td>'; } $r = $r - $deduct; } // For custom themes if ($soft > 10000) { if (file_exists($globals['euthemes'] . '/' . $globals['theme_folder'] . '/images/topscripts/48/' . $iscripts[$soft]['softname'] . '.png')) { $custom_48 = $theme['images'] . 'topscripts/48/' . $iscripts[$soft]['softname'] . '.png'; } else { $custom_48 = $theme['images'] . '/custom.png'; } } echo '<div id="currentrating" style="display:none"></div> <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> <td width="10%" align="center">' . (!empty($custom_48) ? '<img src="' . $custom_48 . '" alt="">' : '<img src="' . $globals['mirror_images'] . 'top15/48/' . $scripts[$soft]['softname'] . '.png" >') . '</td> <td width="90%" class="sai_process_heading" colspan="4">' . $software['name'] . '</td> </tr> <tr> <td align="center" width="10%">' . ($soft > 10000 ? '' : '<div class="someclass" title="' . $scripts[$soft]['ratings'] . '"><table><tr>' . implode('', $ratings) . '</tr></table></div>') . '</td> <td valign="top" align="left" width="20%"> ' . $l['software_ver'] . ' : <font size="2"><b>' . (!empty($tmp_ver) ? $tmp_ver : $software['ver']) . '</b></font> <a href="javascript" onclick="notifyversion(); return false;" ><img src="' . $theme['images'] . 'notify.gif" name="notifyver" title="' . $l['notify_ver'] . '" alt="' . $l['notify_ver'] . '"></a> </td> <td align="left" width="60%"> ' . (!empty($info['release_date']) ? $l['release_date'] . ' : <font size="1"><b>' . $info['release_date'] . '</b></font>' : '') . ' </td> <td width="10%"> ' . (!empty($info['changelog']) ? ' <a href="javascript" onclick="$(\'#changelog_div\').bPopup(); return false;" class="sai_changelogbut" style="text-decoration:none;">' . $l['changelog'] . '</a>' : '') . ' </td> </tr> </table><br /> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sai_tabs"> <tr> <td><a href="javascript:tabs.tab(\'install\')" id="install" class="sai_insbut">' . $l['install'] . '</a></td> <td><a href="javascript:tabs.tab(\'overview\')" class="sai_tab" id="overview">' . $l['overview'] . '</a></td> <td><a href="javascript:tabs.tab(\'features\')" class="sai_tab" id="features">' . $l['features'] . '</a></td> ' . (empty($globals['off_screenshot_link']) ? '<td><a href="javascript:tabs.tab(\'screenshots\'); loadScreenshots();" class="sai_tab" id="screenshots">' . $l['screenshots'] . '</a></td>' : '') . ' ' . (empty($globals['off_demo_link']) ? '<td><a href="' . ($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'] . 'act=demos&soft=' . $soft) . '" class="sai_tab" id="demo" target="_blank">' . $l['demo'] . '</a></td>' : '') . ' ' . (empty($globals['off_rating_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'ratings\')" class="sai_tab" id="ratings">' . $l['ratings'] . '</a></td>' : '') . ' ' . (empty($globals['off_review_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'reviews\')" class="sai_tab" id="reviews">' . $l['reviews'] . '</a></td>' : '') . (empty($info['import']) ? '' : '<td><a href="' . $globals['ind'] . 'act=import&soft=' . $soft . '" class="sai_tab" id="ratings">' . $l['import'] . '</a></td>') . ' </tr> </table><br /> <script type="text/javascript"> $_(tabs.inittab).className = tabs.tabbedclass; var softid = ' . $soft . ' tabs.override = function(id){ if(id == \'install\'){ $_(\'install\').className = \'sai_insbutclicked\'; }else{ $_(\'install\').className = \'sai_insbut\'; } }; </script>'; //Parse and take care of images $info['overview'] = (!empty($info['changelog']) ? '<div id="changelog_div" class="sai_popup" style="display:none;"><span class="sai_clogbutton b-close"><span>X</span></span><div class="sai_changelog">' . $info['changelog'] . '</div></div>' : '') . ' <table width="100%" cellpadding="8" cellspacing="1" border="0"> <tr> ' . (!empty($scripts[$soft]['screenshots']) && empty($globals['panel_hf']) ? ' <td width="20%" valign="top"> <div id="overview_img"> <img src="' . $globals['mirror_images'] . 'softimages/screenshots/' . $soft . '_screenshot1.gif" width="500" alt="" > </div> </td>' : '') . ' <td valign="top" style="padding:10px;"> ' . softparse($info['overview'], $soft) . '<br /><br /> <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> <td width="52" valign="top" align="center"><font color="#447edf"><i class="fa sai-disk fa-3x"></i></font></td> <td valign="top"> <span class="sai_head">' . $l['space_req'] . '</span><br /> <span class="sai_exp">' . $l['available_space'] . ' : ' . (is_numeric($softpanel->spaceremain) ? number_format($softpanel->spaceremain / 1024 / 1024, 2) : $softpanel->spaceremain) . ' ' . $l['mb'] . '<br /> ' . $l['req_space'] . ' : ' . number_format($software['spacereq'] / 1024 / 1024, 2) . ' ' . $l['mb'] . '</span> </td> </tr> <tr> <td valign="top" align="center"><a href="' . $info['support'] . '"><font color="#447edf"><i class="fa sai-question fa-3x"></i></font></a></td> <td valign="top"> <span class="sai_head">' . $l['software_support'] . '</span><br /> <span class="sai_exp"><a href="' . $info['support'] . '" target="_blank">' . $l['support_link'] . '</a><br /> ' . $l['support_note'] . '</span> </td> </tr> </table> </td> </tr> </table>'; if (!empty($installations[$soft])) { $is_cloneable = is_cloneable($soft); $highlight = optGET('highlight'); $action = optGET('postact'); $info['overview'] .= '<br /><br /> <center> <span class="sai_newhead">' . $l['current_ins'] . '</span><br /> </center> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" style="margin:8px 0px;" />'; $info['overview'] .= '<table border="0" cellpadding="5" cellspacing="0" width="100%" class="sai_altrowstable"> <tr> <th class="sai_exp">' . $l['link'] . '</th> <th width="50" class="sai_exp" >' . $l['admin'] . '</th> <th width="180" class="sai_exp">' . $l['ins_time'] . '</th> <th width="80" class="sai_exp">' . $l['version'] . '</th> <th width="145" class="sai_exp" style="text-align:center">' . $l['options'] . '</th> </tr>'; $i = 1; foreach ($installations[$soft] as $ik => $iv) { $info['overview'] .= '<tr id="trid' . $ik . '" class="' . ($i % 2 == 0 ? "sai_evenrowcolor" : "sai_oddrowcolor") . '"> <td><a href="' . $iv['softurl'] . '" target="_blank" id="insurl' . $ik . '">' . $iv['softurl'] . '</a>' . ($highlight == $ik && !empty($action) ? '<span id="highlight"> <b class="sai_highlight">' . $l['act_' . $action] . '</b></span>' : '') . '</td> <td><a href="' . $iv['softurl'] . '/' . (!empty($iv['admin_folder']) ? $iv['admin_folder'] : admin_folder($iv['sid'])) . '" target="_blank"><img src="' . $theme['images'] . '/admin.gif" /></a></td> <td>' . datify($iv['itime']) . '</td> <td>' . $iv['ver'] . ($software['ver'] != $iv['ver'] && file_exists($software['path'] . '/upgrade.xml') ? ' <a href="' . $globals['ind'] . 'act=upgrade&insid=' . $ik . '"><img src="' . $theme['images'] . 'updates.gif" alt="' . $l['upd_to'] . ' ' . $scripts[$soft]['ver'] . '" /></a>' : '') . '</td> <td>' . (!empty($is_cloneable) ? '<a href="' . $globals['ind'] . 'act=sclone&insid=' . $ik . '" title="' . $l['clone'] . '"><img src="' . $theme['images'] . 'clone.gif" /></a> ' : '') . (empty($globals['disable_backup_restore']) ? '<a href="' . $globals['ind'] . 'act=backup&insid=' . $ik . '" title="' . $l['backup'] . '"><img src="' . $theme['images'] . 'backup.gif" /></a>' : '') . ' <a href="' . $globals['ind'] . 'act=editdetail&insid=' . $ik . '" title="' . $l['editdetail'] . '"><img src="' . $theme['images'] . 'editdetail.gif" /></a> <a href="' . $globals['ind'] . 'act=remove&insid=' . $ik . '"><img src="' . $theme['images'] . 'remove.gif" /></a> <input type="checkbox" name="insids[]" id="' . $iv['softurl'] . '" value="' . $ik . '"></td> </tr>'; $i++; } $info['overview'] .= '</table> <p align="right"> ' . $l['with_selected'] . ': <select name="multi_options" id="multi_options"> <option name="todo" id="todo" value="0">---</option> <option name="todo" id="todo" value="mult_rem">' . $l['remove'] . '</option> </select> <input type="button" value="' . $l['go'] . '" onclick="show_confirm()"> <br /> </p> <div id="rem_div"></div> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ insids = new Array(); removed = new Object(); function show_confirm(){ insids = new Array(); removed = new Object(); if($_("multi_options").value != "mult_rem"){ return false; } // Build the list of Installations to remove var field = document.getElementsByName(\'insids[]\'); insids = new Array(); var c = 0; for(i = 0; i < field.length; i++){ if(field[i].checked == true){ insids[c] = field[i].value; c++; } } //alert(insids); if(c == 0){ alert("' . $l['no_sel_inst'] . '"); return false; } var r = confirm("' . $l['del_insid'] . '"); if(r != true){ return false; } remove_by_id(insids[0], "", 0); } function remove_by_id(insid, re, oldinsid){ removed[insid] = false; if(re.length > 0 && oldinsid > 0){ if(re == "removed"){ removed[insid] = true; } } nextinsid = 0; // Find the next INSTALLATION to remove for(i = 0; i < insids.length; i++){ if(typeof(removed[insids[i]]) != "undefined"){ continue; } nextinsid = insids[i]; break; } // If there is something left to be removed if(insid != 0){ try{ AJAX("' . $globals['index'] . 'act=remove&insid="+insid+"&ajax=1&ssk="+randomstring(32)+"&random="+Math.random(), "remove_by_id(\'"+nextinsid+"\', re, \'"+insid+"\')"); $_("rem_div").innerHTML = "<br /><br /><p align=\\"center\\"><img src=\\"' . $theme['images'] . 'ajax_remove.gif\\"> <br />' . $l['rem_inst_id'] . ' ID: " +insid+ ", URL: " + $_("insurl"+insid)+"<br /></p>"; return true; }catch(e){ return false; } } $_("rem_div").innerHTML = ""; alert("' . $l['inst_remvd'] . '"); location.reload(true); return true; } $(document).ready(function(){ $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); });'; // If we get anything in $highlight than only we have to call this JS function other wise it will cause the JS error. if (!empty($highlight)) { $info['overview'] .= 'goto_id("insurl' . $highlight . '"); $("#highlight").fadeOut(10000);'; } $info['overview'] .= '}); // ]]></script>'; } if (count($allcatwise[$software['type']][$software['cat']]) > 2 && $software['cat'] != 'others') { $info['overview'] .= '<br /><br /><br /><br /> <table width="100%" cellpadding="8" cellspacing="0" border="0" class="sai_divroundshad"> <tr> <td class="sai_heading_full" colspan="2">' . $l['related_scripts'] . '</td> </tr> </table>'; $i = 0; foreach ($allcatwise[$software['type']][$software['cat']] as $k => $v) { if ($k == $soft || !empty($scripts[$k]['parent']) && !empty($iscripts[$scripts[$k]['parent']])) { continue; } // Show only 5 scripts if ($i == 5) { break; } $info['overview'] .= ' <div style="text-decoration:none;display:inline-block;text-align:center;margin-top:10px;"> <a href="' . script_link($k) . '" title="' . $v['desc'] . '" width="80" alt="" class="someclass" style="text-decoration:none;margin-top:5px;"> <div class="sai_blog_script" style="margin-left:11%;"> <div class="sai_demo_script_logo"> <img src="' . $globals['mirror_images'] . 'top15/48/' . $v['softname'] . '.png" > </div> <div class="sai_script_name">' . $v['name'] . '</div> </div> </a></div>'; $i++; } } //Parse and take care of images $info['features'] = softparse($info['features'], $soft); $info['ratings'] = ''; $info['screenshots'] = '<iframe src="" id="screenshots_iframe" style="width:100%;height:600px;" frameborder="0" scrolling="no"></iframe>'; $info['reviews'] = '<div id="allreviews"></div>'; foreach ($info as $k => $v) { if (in_array($k, array('demo', 'support', 'import', 'changelog'))) { continue; } echo '<div id="' . $k . '_win" style="display: ' . ($init_tab == $k ? "block" : "none") . ';"> ' . $v . ' </div>'; } softfooter(); }
function adduser_theme() { global $theme, $globals, $user, $l, $langs, $error, $reseller, $iscripts, $plans, $done, $_cpplan, $_users, $allcatwise, $_resellers, $loaded_scripts, $softpanel, $__adduser; softheader($l['<title>']); echo '<br /><form accept-charset="' . $globals['charset'] . '" name="addplan" method="post" action=""> <div class="sai_heading" align="center"><img src="' . $theme['images'] . 'admin/addplan.gif" /> ' . $l['title'] . '</div> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br /><br />'; error_handle($error); if (!empty($done)) { echo '<div class="sai_notice"><img src="' . $theme['images'] . 'success.gif" /> ' . $l['done'] . '</div>'; } echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function show(){ if($_("is_reseller").checked){ $_("num_users_row").style.display = ""; }else{ $_("num_users_row").style.display = "none"; $_("num_users").value = 0; } } addonload("show();"); // ]]></script>'; echo '<link href="https://www.softaculous.net/images/sprites/20.css" rel="stylesheet" type="text/css" /> <table width="721" cellpadding="6" cellspacing="0" border="0" style="margin:0px auto;" class="sai_reviewform"> <tr> <td colspan="2"> <table class="sai_ribboneffect" width="107%" style="left:-21px;" border="0"> <tr> <td width="2%"></td> <td valign="top"><br /> <font class="sai_ribbonhead" style="color:#FFF;"><b>' . $l['user_details'] . '</b></font> </td> </tr> </table> </td> </tr> <tr> <td width="35%"> <span class="sai_head">' . $l['username'] . '</span><br /> <span class="sai_exp2">' . $l['exp_username'] . '</span> </td> <td valign="top"> <input type="text" name="username" size="40" value="' . POSTval('username', '') . '"> </td> </tr> <tr> <td width="35%"> <span class="sai_head">' . $l['user_email'] . '</span><br /> <span class="sai_exp2">' . $l['exp_user_email'] . '</span> </td> <td valign="top"> <input type="text" name="user_email" size="40" value="' . POSTval('user_email', '') . '"> </td> </tr>'; if (ent()) { echo '<tr> <td width="35%"> <span class="sai_head">' . $l['uid'] . '</span><br /> <span class="sai_exp2">' . $l['exp_uid'] . '</span> </td> <td valign="top"> <input type="text" name="uid" size="40" value="' . POSTval('uid', '') . '"> </td> </tr> <tr> <td width="35%"> <span class="sai_head">' . $l['gid'] . '</span><br /> <span class="sai_exp2">' . $l['exp_gid'] . '</span> </td> <td valign="top"> <input type="text" name="gid" size="40" value="' . POSTval('gid', '') . '"> </td> </tr>'; } if (!defined('SOFTRESELLER')) { echo '<tr> <td width="35%"> <span class="sai_head">' . $l['is_reseller'] . '</span><br /> <span class="sai_exp2">' . $l['exp_is_reseller'] . '</span> </td> <td valign="top"> <input type="checkbox" name="is_reseller" size="40" id="is_reseller" ' . POSTchecked('is_reseller', true) . ' onclick="show(this);"> </td> </tr> <tr id="num_users_row" style="display:none;"> <td width="35%"> <span class="sai_head">' . $l['number_of_users'] . '</span><br /> <span class="sai_exp2">' . $l['exp_number_of_users'] . '</span> </td> <td valign="top"> <input type="text" name="num_users" id="num_users" size="40" value="' . POSTval('num_users', '') . '"> </td> </tr>'; } echo '</td> </tr> <tr><td></td></tr> </table> <p align="center"><input type="submit" name="saveuser" value="' . $l['saveuser'] . '" class="sai_graybluebut" ></p> </form>'; softfooter(); }
function classes_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts; global $software, $cid, $info, $settings, $init_tab, $overwrite_option, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $show_installtype, $protocols, $nopackage; // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } //First add the installation info if (empty($installed)) { $info['install'] = '<div id="fadeout_div"><form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware" class="form-horizontal"> ' . error_handle($error, "100%", 0, 1) . ' <script language="javascript" src="' . $theme['url'] . '/js/jquery-ui-custom.js?' . $GLOBALS['globals']['version'] . '" type="text/javascript"></script> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(dosubmit){ try{ if(!formcheck()){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(!get_package()){ return false; } if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if(dosubmit == 1){ $_("installsoftware").submit(); } show_msg("' . $l['installing'] . '"); } return true; }; function toggle_advoptions(){ if ($("#advoptions").is(":hidden")){ $("#advoptions").slideDown("slow"); $("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'minus_new.gif"); } else{ $("#advoptions").slideUp("slow"); $("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'plus_new.gif"); } } function plus_onmouseover(){ $("#plus").attr("src", "' . $theme['images'] . 'plus_hover.gif"); } function plus_onmouseout(){ $("#plus").attr("src", "' . $theme['images'] . 'plus.gif"); } var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#installsoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); $.ajax({ url: window.location+"&jsnohf=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); new_theme_funcs_init(); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Is the package there ? var nopackage = ' . (empty($nopackage) ? 0 : 1) . '; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } function get_package(){ if(nopackage){ show_msg("' . $l['downloading'] . '"); try{ AJAX("' . $globals['index'] . 'act=js&soft=' . $cid . '&ajaxdownload=1&random="+Math.random(), "get_package_handle(re)"); }catch(e){ } return false; }else{ $_("show_txt").style.display = "none"; return true; } }; function get_package_handle(resp){ nopackage = 0; show_msg("' . $l['installing'] . '"); checkform(1); }; softemail = new Object(); function softmail(){ try{ var sofdom = "softdomain"; for(x in softemail){ if(softemail[x] == true) continue; var temp = $_(x).value.split("@"); $_(x).value = temp[0] + "@" + $_(sofdom).value; } }catch(e){ return false; } }; function change_aefer_path(){ try{ var str = $_("softdomain").value; var apath = ' . json_encode($softpanel->domains) . '; $_("aef_path").innerHTML = $_("aef_span_lang").innerHTML = $_("aef_span_lang_a").innerHTML = apath[str]["path"]+"/"; }catch(e){ return false; } }; $(document).ready(function(){ $("#check_all_classes").on("click", function(event){ if(this.checked == true){ $(".check_all_classes").prop("checked", true); }else{ $(".check_all_classes").prop("checked", false); } }); change_aefer_path(); }); ' . (!empty($_POST) ? '' : 'addonload(\'softmail();\');'); $info['install'] .= '// ]]></script>'; $info['install'] .= ' <div class="bg"> <div class="sai_sub_head">' . $l['setup'] . '</div><hr>'; if (aefer() || ent()) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="softdomain" class="sai_head">' . $l['choose_domain'] . '</span><br /> <span class="sai_exp">' . $l['choose_domain_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softdomain" id="softdomain" onchange="change_aefer_path();" class="form-control">'; if (!empty($globals['blank_domain'])) { $info['install'] .= '<option value="" ' . (empty($_POST['softdomain']) ? 'selected="selected"' : '') . '>(' . $l['select_domain'] . ')</option>'; } foreach ($softpanel->domainroots as $domain => $dompath) { $info['install'] .= '<option value="' . $domain . '" ' . (!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain ? 'selected="selected"' : '') . '>' . $domain . '</option>'; } $info['install'] .= '</select> </div> </div>'; } $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="softdirectory" class="sai_head">' . $l['in_directory'] . '</label><br /> <span class="sai_exp2">' . lang_vars(aefer() || ent() ? $l['aef_in_directory_exp'] : $l['in_directory_exp'], array($softpanel->user['homedir'])) . '</span> </div> <div class="col-sm-7"> <span id="aef_path">' . $softpanel->user['homedir'] . '/</span><br><input type="text" name="softdirectory" id="softdirectory" class="form-control" size="30" value="' . POSTval('softdirectory', $software['softname']) . '" /> </div> </div>'; if (!empty($overwrite_option)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <span class="sai_head">' . $l['overwrite'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="overwrite_existing" id="overwrite_existing" /> </div> </div>'; } $info['install'] .= ' </div><br /><!--end of bg class-->'; if (!empty($settings)) { if (file_exists($software['path'] . '/install.js')) { $info['install'] .= '<script language="javascript" type="text/javascript"><!--// --><![CDATA['; $info['install'] .= @parselanguages(str_replace('$(', '$_(', implode('', file($software['path'] . '/install.js')))); $info['install'] .= '// ]]></script>'; } foreach ($settings as $group => $sets) { if ($group == 'hidden') { continue; } $info['install'] .= ' <div class="bg"> <div class="sai_sub_head">' . $group . '</div><hr>'; foreach ($sets as $sk => $sv) { //Adding class to input if (preg_match('/type="text"/is', $sv['tag'])) { $sv['tag'] = preg_replace('/>/is', ' class="form-control">', $sv['tag']); } if (preg_match('/<select/is', $sv['tag'])) { $sv['tag'] = preg_replace('/<select/is', '<select class="form-control"', $sv['tag']); } $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for=' . $sk . ' class="sai_head" id="sai_head">' . $sv['head'] . '</label> ' . (empty($sv['exp']) ? '' : '<span class="sai_exp">' . $sv['exp'] . '</span>') . ' </div> ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? preg_replace('/>|\\/>/is', ' onkeyup="check_pass_strength();" >', ' <div class="col-sm-6">' . $sv['tag'] . '</div>') : '<div class="col-sm-7 ">' . $sv['tag'] . '</div>') . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && (!empty($softpanel->securepass) || !empty($globals['random_pass'])) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . ');check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) && !empty($globals['empty_pass']) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";check_pass_strength();\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['random_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value=randstr(5);\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['empty_username']) && !empty($random_username) ? ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'$_("' . $sk . '").value="";\'); // ]]></script> ' : '') . ' ' . (preg_match('/admin_username/is', $sv['tag']) && !empty($globals['admin_prefix']) && empty($globals['empty_username']) && empty($globals['random_username']) && !empty($random_username) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ addonload(\'prepend_prefix("' . $globals['admin_prefix'] . '");\'); // ]]></script> ' : '') . ' </div><br />'; } $info['install'] .= ' </div><br /><!--end of bg class-->'; } //The Hidden groups if (!empty($settings['hidden'])) { foreach ($settings['hidden'] as $sk => $sv) { $info['install'] .= $sv['tag'] . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : ''); } } } //End of if($settings) // Advance option $info['install'] .= ' <div class="bg"> <div class="sai_sub_head" id="advoptions_toggle" onclick="toggle_advoptions(\'advoptions\');" style="cursor:pointer"><img id="advoptions_toggle_plus" src="' . $theme['images'] . 'plus_new.gif" style="margin-top:-4px;"/> ' . $l['adv_option'] . '</div> <div id="advoptions" style="display:none;"><hr> <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['disable_notify_update'] . '</label> <span class="sai_exp">' . $l['exp_disable_notify_update'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="disable_notify_update" id="disable_notify_update" ' . POSTchecked('disable_notify_update') . ' /> </div> </div> </div> </div><!--end of bg--><br /><br />'; $info['install'] .= ' <p align="center" class="sai_head"> <input type="hidden" name="softsubmit" id="softsubmit" value="' . $l['softsubmit'] . '" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" value="' . $l['softsubmit'] . '" class="flat-butt" /><span id="show_txt" style="display:none;"></span> <br /><br /><br /> ' . (empty($globals['off_email_link']) ? $l['ins_emailto'] . ' : <input type="text" name="emailto" id="emailto" size="20" value="' . POSTval('emailto', '') . '" />' : '') . ' </p> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> </form></div> <div id="progress_bar" style="height:125px; display: none; width:100%;"> <br /><br /> <center> <font size="4" color="#222222" id="progress_txt" style="width:100%;">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444;" width:100%;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; width:50%;""> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> </div> <br />'; } elseif (!empty($installed)) { $info['install'] = ' <div class="bg2"> <h4>' . $l['congrats'] . '</h4><br /> ' . $software['name'] . ' ' . $l['succesful'] . ' : <br /> <b>' . $__settings['softpath'] . '</b> <br /><br /> ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['install_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $cid) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . $globals['ind'] . 'act=classes&cid=' . $cid . '">' . $l['return'] . '</a></b></center><br /><br />'; if (empty($globals['install_tweet_off']) || empty($globals['lictype'])) { $info['install'] .= '<form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <div class="panel panel-info" style="width:55%; margin:0 auto;"> <div class="panel-heading" style="padding:5px; font-size:15px;"> <font><b>' . $l['install_tweet_sub'] . ' :</b></font> </div> <div class="panel-body"> <div class="row"> <div class="col-sm-10"> <textarea name="text" cols="80" row="3" style="resize:none; width:100%;">' . loadtweetdata('install_tweet', $l['install_tweet_classes']) . '</textarea> </div> <div class="col-sm-2"> <input type="submit" value="Tweet!" class="btn btn-info" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/> </div> </div> </div> </div> </form>'; } $info['install'] .= ' </div><!--end of bg class--><!--PROC_DONE--> <br /><br /><br /><br /> '; } softheader($l['<title>'] . $software['name']); $loadedinfo = array('install', 'overview', 'file', 'reviews', 'ratings'); ?> <script language="JavaScript" src="<?php echo $theme['url'] . '/js/tabber.js'; ?> " type="text/javascript"> </script> <script language="JavaScript" id="ratings_js_file" type="text/javascript"></script> <script language="JavaScript" id="review_js_file" type="text/javascript"></script> <script language="JavaScript" id="reviews_js_file" type="text/javascript"></script> <script language="JavaScript" id="file_js_file" type="text/javascript"></script> <script type="text/javascript"> tabs = new tabber; tabs.tabs = new Array('<?php echo implode('\', \'', $loadedinfo); ?> '); tabs.tabwindows = new Array('<?php echo implode('_win\', \'', $loadedinfo); ?> _win'); tabs.inittab = <?php echo '\'' . $init_tab . '\';'; ?> addonload('tabs.init();loadraterev();'); function loadraterev(){ $_('ratings_js_file').src = '<?php echo $globals['api_nuphp2'] . 'rating.php?cid=' . $cid . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '&rating=1'; ?> '; $_('review_js_file').src = '<?php echo $globals['api_nuphp2'] . 'review.php?cid=' . $cid . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '&review=1'; ?> '; $_('reviews_js_file').src = '<?php echo $globals['api_nuphp2'] . 'reviews.php?cid=' . $cid . '&user='******'name'] . '&timezone=' . $globals['timezone'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '&reviews=1'; ?> '; if(tabs.inittab == 'file'){ filecodeview.loadDirStruct(); } } </script> <?php $url = $theme['images']; $ratings = array(); $deduct = 1; $r = $software['ratings']; for ($i_r = 1; $i_r <= 5; $i_r++) { if ($r >= 1) { $ratings[$i_r] = '<img src="' . $url . 'star.png' . '" alt="(' . number_format($software['ratings'], 2) . ' out of 5)" />'; } elseif ($r > 0) { $ratings[$i_r] = '<img src="' . $url . 'halfstar.png' . '" alt="(' . number_format($software['ratings'], 2) . ' out of 5)" />'; } else { $ratings[$i_r] = '<img src="' . $url . 'nostar.png' . '" alt="(' . number_format($software['ratings'], 2) . ' out of 5)" />'; } $r = $r - $deduct; } echo ' <div class="bg"> <div id="currentrating" style="display:none"></div> <div class="row" style="margin-left:-5px;"> <span class="sai_process_heading" colspan="4">' . $software['name'] . '</span> </div><br /> <div class="row"> <div class="col-sm-3"><div class="someclass" title="' . $scripts[$k]['ratings'] . '">' . implode('', $ratings) . '</div></div> <div class="col-sm-4"> ' . $l['software_ver'] . ' : <span class="sai_head"><font size="4">' . $software['version'] . '</font></span> <a href="javascript" onclick="notifyversion(); return false;" ><img src="' . $theme['images'] . 'notify.gif" name="notifyver" title="' . $l['notify_ver'] . '" alt="' . $l['notify_ver'] . '"></a> </div> <div class="col-sm-3"> ' . $l['software_category'] . ' : <span class="sai_head"><font size="4">' . $l['classes_' . $software['category']] . '</font></span> </div> </div><br /> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sai_tabs"> <tr> <td><a href="javascript:tabs.tab(\'install\')" id="install" class="sai_insbut">' . $l['install'] . '</a></td> <td><a href="javascript:tabs.tab(\'overview\')" class="sai_tab" id="overview">' . $l['overview'] . '</a></td> <td><a href="javascript:tabs.tab(\'file\'); filecodeview.loadDirStruct();" class="sai_tab" id="file">' . $l['file'] . '</a></td> ' . (empty($globals['off_rating_link']) ? '<td><a href="javascript:tabs.tab(\'ratings\')" class="sai_tab" id="ratings">' . $l['ratings'] . '</a></td>' : '') . ' ' . (empty($globals['off_review_link']) ? '<td><a href="javascript:tabs.tab(\'reviews\')" class="sai_tab" id="reviews">' . $l['reviews'] . '</a></td>' : '') . ' </tr> </table><br />'; ?> <script type="text/javascript"> $_(tabs.inittab).className = tabs.tabbedclass; var softid = <?php echo $cid; ?> ; tabs.override = function(id){ if(id == 'install'){ $_('install').className = 'sai_insbutclicked'; }else{ $_('install').className = 'sai_insbut'; } }; </script> <?php //Parse and take care of images $info['overview'] = '<table width="100%" cellpadding="8" cellspacing="1" border="0"> <tr> <td valign="top" style="padding:10px;"> ' . softparse($info['overview'], $cid) . '<br /><br /> <table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> <td width="52" valign="top" align="center"><font color="#447edf"><i class="fa sai-disk fa-3x"></i></font></td> <td valign="top"> <span class="sai_head">' . $l['space_req'] . '</span><br /> <span class="sai_exp2">' . $l['available_space'] . ' : ' . (is_numeric($softpanel->spaceremain) ? number_format($softpanel->spaceremain / 1024 / 1024, 2) : $softpanel->spaceremain) . ' ' . $l['mb'] . '<br /> ' . $l['req_space'] . ' : ' . number_format($software['spacereq'] / 1024 / 1024, 2) . ' ' . $l['mb'] . '</span> </td> </tr> <tr> <td valign="top" align="center"><a href="' . $info['support'] . '"><font color="#447edf"><i class="fa sai-question fa-3x"></i></font></a></td> <td valign="top"> <span class="sai_head">' . $l['software_support'] . '</span><br /> <span class="sai_exp2"><a href="' . $info['support'] . '" target="_blank">' . $l['support_link'] . '</a><br /> ' . $l['support_note'] . '</span> </td> </tr> </table> </td> </tr> </table>'; if (!empty($installations)) { $info['overview'] .= '<br /><br /> <div class="sai_sub_head" align="center">' . $l['current_ins'] . '</div><hr>'; $info['overview'] .= '<table border="0" cellpadding="5" cellspacing="0" width="100%" class="table table-hover"> <tr> <thead class="sai_head2" style="background:#333; color:#fff;"> <th><b>' . $l['link'] . '</b></th> <th width="180"><b>' . $l['ins_time'] . '</b></th> <th width="80"><b>' . $l['version'] . '</b></th> <th width="120"><b>' . $l['remove'] . '</b></th> <th width="50"><input type="checkbox" id="check_all_classes"></th> <thead> </tr>'; foreach ($installations as $ik => $iv) { $info['overview'] .= '<tr> <td>' . $iv['softpath'] . '</td> <td width="180">' . datify($iv['itime']) . '</td> <td width="80">' . $iv['ver'] . ($software['ver'] != $iv['ver'] && file_exists($software['path'] . '/upgrade.xml') ? ' <a href="' . $globals['ind'] . 'act=upgrade&cinsid=' . $ik . '"><img src="' . $theme['images'] . 'updates.gif" alt="' . $l['upd_to'] . ' ' . $scripts[$cid]['ver'] . '" /></a>' : '') . '</td> <td width="120"><a href="' . $globals['ind'] . 'act=classes_remove&cinsid=' . $ik . '" title="' . $l['remove'] . '"><img src="' . $theme['images'] . 'remove.gif" /></a></td> <td width="50"><input type="checkbox" class="check_all_classes" name="insids[]" value="' . $ik . '"></td> </tr>'; } $info['overview'] .= '</table><br /> <p align="right"> ' . $l['with_selected'] . ': <select name="multi_options" id="multi_options"> <option name="todo" id="todo" value="0">---</option> <option name="todo" id="todo" value="mult_rem">' . $l['remove'] . '</option> </select> <input type="button" class="sai_graybluebut" value="' . $l['go'] . '" onclick="show_confirm()"> <br /> </p> <div id="rem_div"></div> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ insids = new Array(); removed = new Object(); function show_confirm(){ insids = new Array(); removed = new Object(); if($_("multi_options").value != "mult_rem"){ return false; } // Build the list of Installations to remove var field = document.getElementsByName(\'insids[]\'); insids = new Array(); var c = 0; for(i = 0; i < field.length; i++){ if(field[i].checked == true){ insids[c] = field[i].value; c++; } } //alert(insids); if(c == 0){ alert("' . $l['no_sel_inst'] . '"); return false; } var r = confirm("' . $l['del_insid'] . '"); if(r != true){ return false; } remove_by_id(insids[0], "", 0); } function remove_by_id(insid, re, oldinsid){ removed[insid] = false; if(re.length > 0 && oldinsid > 0){ if(re == "removed"){ removed[insid] = true; } } nextinsid = 0; // Find the next INSTALLATION to remove for(i = 0; i < insids.length; i++){ if(typeof(removed[insids[i]]) != "undefined"){ continue; } nextinsid = insids[i]; break; } // If there is something left to be removed if(insid != 0){ try{ AJAX("' . $globals['index'] . 'act=classes_remove&cinsid="+insid+"&ajax=1&ssk="+randomstring(32)+"&random="+Math.random(), "remove_by_id(\'"+nextinsid+"\', re, \'"+insid+"\')"); $_("rem_div").innerHTML = "<br /><br /><p align=\\"center\\"><img src=\\"' . $theme['images'] . 'ajax_remove.gif\\"> <br />' . $l['rem_inst_id'] . ' ID: " +insid+ "<br /></p>"; return true; }catch(e){ return false; } } $_("rem_div").innerHTML = ""; alert("' . $l['inst_remvd'] . '"); location.reload(true); return true; } $(document).ready(function(){ $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); }); // ]]></script>'; } $info['file'] = '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var filecodeview = { dir : "", data_obj : ' . $software['dirstruct'] . ', loadDirStruct : function(direction){ var size = new Number((' . $software['zip_size'] . '/1024)+"").toFixed(parseInt(2)); size = size+" kb"; var right = "right"; var back_path_div = \'<table border="0" width="100%"><tr><td><a href="javascript:void(0);" onclick="filecodeview.loadDirStruct(\\\'\'+right+\'\\\');" style="font-size:15px;color:#09F;text-decoration:none;">' . $software['name'] . '</a> / <div id="back_path" style="display:inline;"></div></td><td align="right" width="33%"><a href="' . $globals['api_nuphp'] . 'download.php?cid=' . $cid . '&file=package" taget="_blank" style="text-decoration:none">' . $l['download_zip'] . ' (\'+size+\') <img src="' . $theme['images'] . 'zip.gif" alt="Download" title="Download" height="35px" width="30px"></a></td></tr></table><div id="soft_dir"></div>\'; $("#file_win").html(back_path_div); var soft_dirs = \'<table border="0" cellpadding="10" cellspacing="0" width="100%" class="table table-hover"><th width="50%" class="sai_exp2">' . $l['files'] . '</th><th width="25%" class="sai_exp2">' . $l['size'] . '</th><th width="25%" class="sai_exp2" colspan="2">' . $l['modified_time'] . '</th>\'; var tr_i = 1; $.each(filecodeview.data_obj, function (i, item) { if(tr_i % 2 == 0){ tr_class = "sai_evenrowcolor"; }else{ tr_class = "sai_oddrowcolor"; } var download_td = "<td></td>"; if(item.is_dir == 1){ var file_ext_ico = "dir.png"; }else{ var file_ext_ico = "txt.png"; download_td = \'<td><a href="' . $globals['api_nuphp'] . 'download.php?cid=' . $cid . '&file=\'+i+\'" taget="_blank" style="text_decoration:none";><img src="' . $theme['images'] . 'downloadbutton.png" alt="Download" title="Download" height="20px" width="20px"></a></td>\'; } var size = new Number((item.size/1024)+"").toFixed(parseInt(2)); size = size+" kb"; if(item.modified == "" || typeof(item.modified) == "undefined"){ var m_time = "--"; }else{ var m_time = filecodeview.timeConverter(item.modified); } if(i.search("/") <= 0){ var right = "right"; soft_dirs += \'<tr class=\'+tr_class+\'><td><img src="' . $theme['images'] . '\'+file_ext_ico+\'" width="20px" height="20px"/> <a href="javascript:void(0)" onclick="filecodeview.show_tree(\\\'\'+i+\'\\\', \\\'\'+right+\'\\\');" style="text-decoration:none;">\'+i+\'</td><td>\'+size+\'</td><td>\'+m_time+\'</td>\'+download_td+\'</tr>\'; tr_i += 1; } });// end of each loop soft_dirs += "</table>"; $("#soft_dir").css("display", "none"); $("#soft_dir").html(soft_dirs); $("#soft_dir").show("slide", {direction : "left"}, 700); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); }, // End of loadDirStruct show_tree : function(current, direction){ //alert(current); if(filecodeview.data_obj[current].is_dir == 0){ var size = new Number((filecodeview.data_obj[current].size/1024)+"").toFixed(parseInt(2)); size = size+" kb"; download_td = \'<a href="' . $globals['api_nuphp'] . 'download.php?cid=' . $cid . '&file=\'+current+\'" taget="_blank" style="text_decoration:none";><img src="' . $theme['images'] . 'downloadbutton.png" alt="Download" title="Download" height="20px" width="20px"></a>\'; var soft_file = \'<div style="height:600px;width:100%;"><div style="background-color:#E8E8E8;box-shadow: 0 5px 5px 0 #CCCCCC;text-shadow: 2px 2px 2px #FFFFFF;padding:10px;font-size:13px;">\'+current.substr((current.lastIndexOf("/")+1))+\' <img src="' . $theme['images'] . 'action_separator.png"> \'+size+\' <img src="' . $theme['images'] . 'action_separator.png"> \'+download_td+\'</div><iframe src="' . $globals['api_nuphp'] . 'file_giver.php?cid=' . $cid . '&giveinfo=codeview&file=\'+current+\'" width="100%" height="100%" frameborder="0" class="sai_iframe_class" id="filecode"></iframe></div>\'; //$("#soft_dir").css("display", "none"); $("#soft_dir").html(soft_file); $("#soft_dir").show("slide", {direction : "right"}, 700); }else{ var soft_dirs = \'<div id="back_path" ></div><table border="0" cellpadding="10" cellspacing="0" width="100%" class="table table-hover"><tr><th width="50%" class="sai_exp2">' . $l['files'] . '</th><th width="25%" class="sai_exp2">' . $l['size'] . '</th><th width="25%" class="sai_exp2" colspan="2">' . $l['modified_time'] . '</th></tr>\'; var tr_i = 1; $.each(filecodeview.data_obj, function (i, item) { if(tr_i % 2 == 0){ tr_class = "sai_evenrowcolor"; }else{ tr_class = "sai_oddrowcolor"; } var download_td = "<td></td>"; if(item.is_dir == 1){ var file_ext_ico = "dir.png"; }else{ var file_ext_ico = "txt.png"; download_td = \'<td><a href="' . $globals['api_nuphp'] . 'download.php?cid=' . $cid . '&file=\'+i+\'"><img src="' . $theme['images'] . 'downloadbutton.png" alt="Download" title="Download" height="20px" width="20px"></a></td>\'; } var rgxp = new RegExp("^"+current, "i"); var rgxpnot = new RegExp("^"+current+"/(.*)/(.*)", "gi"); if(i.match(rgxpnot)){ return; } if(i.match(rgxp)){ // This new_i is defined because we are changing the value of i for display purpose var new_i = i; // We are adding / to i bcoz same filename as folder should not be replaced otherwise only extension will be displayed if(item.is_dir == 1){ i = i + "/"; } // If we are not in the directory why should we go ahead right !! if(!i.match(current+"/")) return; i = i.replace(current+"/",""); var size = new Number((item.size/1024)+"").toFixed(parseInt(2)); size = size+" kb"; if(item.modified == "" || typeof(item.modified) == "undefined"){ var m_time = "--"; }else{ var m_time = filecodeview.timeConverter(item.modified); } // Now count the / occured bcoz only the current folder we have to display var count_i = i.split("/"); // For checking the right file to be displayed if((count_i.length) <= 2 && i.length > 0){ var right = "right"; soft_dirs += \'<tr class=\'+tr_class+\'><td><img src="' . $theme['images'] . '\'+file_ext_ico+\'" width="20px" height="20px"/> <a href="javascript:void(0)" onclick="filecodeview.show_tree(\\\'\'+new_i+\'\\\', \\\'\'+right+\'\\\');" style="text-decoration:none;">\'+i+\'</td><td>\'+size+\'</td><td>\'+m_time+\'</td>\'+download_td+\'</tr>\'; tr_i += 1; } } });// end of each loop soft_dirs += "</table>"; var seperated_path = new Array(); var new_joined_path = ""; var final_path = ""; if(current.search("/") >= 0){ var new_back_path = current.substr(current.lastIndexOf("/")); seperated_path = current.split("/"); for(var i = 0; i < (seperated_path.length); i++){ if(i>0){ var seperator = "/"; }else{ var seperator = ""; } var left = "left"; new_joined_path += seperator+seperated_path[i]; final_path += \'<a href="javascript:void(0);" onclick="filecodeview.show_tree(\\\'\'+new_joined_path+\'\\\', \\\'\'+left+\'\\\');" style="font-size:16px;color:#09F;text-decoration:none;">\'+seperated_path[i]+\'</a> / \'; } }else{ var left = "left"; var new_back_path = current; final_path += \'<a href="javascript:void(0);" onclick="filecodeview.show_tree(\\\'\'+current+\'\\\', \\\'\'+left+\'\\\');" style="font-size:16px;color:#09F;text-decoration:none;">\'+current+\' </a>\'; } $("#back_path").html(final_path); $("#soft_dir").css("display", "none"); $("#soft_dir").html(soft_dirs); $("#soft_dir").show("slide", {direction : direction}, 700); }// End of else $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); }, //End of show_tree timeConverter : function(timestamp){ var a = new Date(timestamp*1000); var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; var year = a.getFullYear(); var month = months[a.getMonth()]; var date = a.getDate(); var hour = a.getHours(); var min = a.getMinutes(); var sec = a.getSeconds(); var time = date+","+month+" "+year+" "+hour+":"+min+":"+sec ; return time; } };// end of filecodeview // ]]></script>'; $info['ratings'] = ''; $info['reviews'] = '<div id="allreviews"></div>'; foreach ($info as $k => $v) { if (in_array($k, array('demo', 'support'))) { continue; } echo '<div id="' . $k . '_win" style="display: ' . ($init_tab == $k ? "block" : "none") . ';"> ' . $v . ' </div>'; } echo '</div><!--end of bg class-->'; softfooter(); }
function email_account_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $done, $domain_list, $email_list, $domain_name; // To change the password if (optGET('ajaxup')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { echo '1' . $l['changed_password']; return true; } } // To update domains links if (optGET('ajaxdom')) { show_email_users(); return true; } // For Delete if (optGET('ajaxdel')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { echo '1' . $l['delete']; return true; } } // For adding Email User if (optGET('ajaxemail')) { if (!empty($error)) { echo '0' . current($error); return false; } // Creating new table to display the list of email accounts if (!empty($done)) { echo '1' . $l['change_final']; show_email_users(); return true; } } softheader($l['<title>']); echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'email_account.gif" /> ' . $l['email'] . '</center> <form accept-charset="' . $globals['charset'] . '" action="" method="post" name="email_account" id="editform"> <table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" > <tr> <td width="35%"> <span class="sai_head">' . $l['loginname'] . '</span><br /> </td> <td> <input type="text" name="login" id="login" size="30" size="30" value="' . POSTval('login', '') . '" />@<select class="input" name="selectdomain" id="selectdomain" >'; foreach ($domain_list as $key => $value) { if ($domain_name == $key) { echo '<option value=' . $key . ' selected=selected >' . $key . '</option>'; } else { echo '<option value=' . $key . '>' . $key . '</option>'; } } echo '</select> <img id="changedom" src="' . $theme['images'] . 'progress.gif" style="display:none"> </td> </tr> <tr> <td> <span class="sai_head">' . $l['new_pass'] . '</span><br /> </td> <td> <input type="password" name="newpass" id="newpass" size="30" value="" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['retype_pass'] . '</span><br /> </td> <td> <input type="password" name="conf" id="conf" size="30" value="" /> </td> </tr> <tr> <td colspan="2"> <p align="center"> <input type="hidden" name="create_acc" value="1" /> <input type="submit" style="cursor:pointer" value="' . $l['submit_button'] . '" name="create_acc" class="sai_graybluebut" id="submitemail" /> <img id="createmail" src="' . $theme['images'] . 'progress.gif" style="display:none"> </p> </td> </tr> </table> </form> <center> </br></br> <span class="sai_head">' . $l['record_table'] . ' <span id="domain_file">' . $domain_name . '</span></span><br /><br /><br /> </center> <div id="showrectab">'; show_email_users(); echo '</div> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ $(document).ready(function(){ $("#selectdomain").change(function(){ $("#changedom").css("display", ""); var domain = $(this).val(); $.ajax({ type: "POST", url: window.location+"&ajaxdom=1&domain="+domain, success: function(data){ $("#changedom").css("display", "none"); $("#showrectab").html(data); $("#domain_file").html(domain); } }); }); // For creating email accounts $("#submitemail").click(function(){ $("#createmail").css("display", ""); $.ajax({ type: "POST", url: window.location+"&ajaxemail=1", data: $("#editform").serialize(), // Checking for error success: function(data){ $("#createmail").css("display", "none"); var result = data.substring(0,1); if(result == "1"){ $_("login").value=""; $_("newpass").value=""; $_("conf").value=""; var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Done ",msg,2); $("#showrectab").html(output); } if(result == "0"){ $("#createemail").css("display", "none"); var msg = data.substring(1); message_box.show_message( "Error",msg,1); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); return false; }); }); // ]]></script>'; softfooter(); }
function sslcsr_theme() { global $user, $globals, $l, $theme, $softpanel, $error, $done, $domain_list, $domain_name, $csr_list, $detailcsr; // For delete if (optGET('ajaxdel')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { echo '1' . $l['delete']; showcert(); return true; } } // For detail if (optGET('ajaxdetail')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { showdetail(); return true; } } softheader($l['<title>']); error_handle($error, '100%'); if (!empty($done)) { echo '<div class="sai_success">' . $done . '</div>'; } echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'sslcsr.gif" /> ' . $l['lbl_head'] . '</center>'; if (empty($domain_list)) { echo ' <center ><h2>' . $l['no_key_file'] . '</h2></center>'; } else { echo '<div id="showrectab">'; showcert(); echo '</div> <div id="detailrectab" style="display:none">'; echo '</div><br /><br /> <form accept-charset="' . $globals['charset'] . '" name="createssl" method="post" action=""> <table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" > <tr> <td> <span class="sai_head">' . $l['key'] . '</span><br /> </td> <td> <select class="input" name="selectkey" id="selectkey">'; foreach ($domain_list as $key => $value) { $ext = get_extension($value); if ($ext == 'key') { $file = get_filename($value); if (!in_array($file . '.csr', $csr_list)) { echo '<option value=' . $file . '>' . $file . '</option>'; } } } echo '<option value=newkey>' . $l['genrate'] . '</option>'; echo '</select> </td> </tr> <tr> <td> <span class="sai_head">' . $l['domain'] . '</span><br /> <span class="sai_exp">' . $l['domain_desc'] . '</span></td> </td> <td> <input type="text" name="domain" id="domain" size="30" ' . (!empty($error) ? 'value="' . POSTval('domain', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['country'] . '</span><br /> <span class="sai_exp">' . $l['country_desc'] . '</span></td> <td> <input type="text" name="country" id="country" size="30" ' . (!empty($error) ? 'value="' . POSTval('country', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['state'] . '</span><br /> <span class="sai_exp">' . $l['state_desc'] . '</span></td> <td> <input type="text" name="state" id="state" size="30" ' . (!empty($error) ? 'value="' . POSTval('state', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['locality'] . '</span><br /> <span class="sai_exp">' . $l['locality_desc'] . '</span></td> <td> <input type="text" name="locality" id="locality" size="30" ' . (!empty($error) ? 'value="' . POSTval('locality', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['organisation'] . '</span><br /> <span class="sai_exp">' . $l['organisation_desc'] . '</span></td> <td> <input type="text" name="organisation" id="organisation" size="30" ' . (!empty($error) ? 'value="' . POSTval('organisation', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['org_unit'] . '</span><br /> <span class="sai_exp">' . $l['org_unit_desc'] . '</span></td> <td> <input type="text" name="orgunit" id="orgunit" size="30" ' . (!empty($error) ? 'value="' . POSTval('orgunit', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['email'] . '</span><br /> <span class="sai_exp">' . $l['email_desc'] . '</span></td> <td> <input type="text" name="email" id="email" size="30" ' . (!empty($error) ? 'value="' . POSTval('email', '') . '"' : '') . ' /> </td> </tr> <tr> <td width="40%"> <span class="sai_head">' . $l['pass_pharse'] . '</span><br /> <span class="sai_exp">' . $l['pass_pharse_desc'] . '</span></td> <td> <input type="text" name="pass" id="pass" size="30" ' . (!empty($error) ? 'value="' . POSTval('pass', '') . '"' : '') . ' /> </td> </tr> <tr> <td colspan="2"> <p align="center"><input type="submit" name="createcsr" value="' . $l['createcsr'] . '" class="sai_graybluebut" /></p> </td> </tr> </table> </form>'; } echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var message_box = function(){ return{ show_message: function(title, body , image) { var okbutton = \'<input style="width:75px" class="sai_graybluebut" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, delete_message: function(title, body ,did) { var yesbutton = \'<input type="button" style="width:75px" onclick="message_box.yes_close_message(\\\'\'+did+\'\\\');" value="YES" class="sai_graybluebut"/>\'; var nobutton = \'<input type="button" style="width:75px" onclick="message_box.no_close_message();" value="NO" class="sai_graybluebut" />\'; var img = \'<img src="' . $theme['images'] . 'remove_big.gif" />\'; if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr ><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \' \' + nobutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message = \' <table border="0" cellpadding="8" width="100%" height="100%"><tr height="60%" ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1" height="10%">\' + title + \'</td></tr><tr><td style="text-align:left" height="60%" cellpading="2" class ="msg_tr2">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3" >\' + yesbutton + \' \' + nobutton + \'</td></tr></table>\' jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); }, yes_close_message: function(did) { $(\'#did\'+did).attr("src","' . $theme['images'] . 'progress.gif"); jQuery(\'.sai_message_box\').hide(\'fast\'); $.ajax({ type: "POST", url: window.location+"&ajaxdel=1&delete_record="+did, // checking for error success: function(data){ var result = data.substring(0,1); var msg = data.substring(1); if(result == "1"){ var msg = data.substring(1,data.indexOf("<table")); var output = data.substring(data.indexOf("<table")); message_box.show_message( "Delete ",msg,2); $("#showrectab").html(output); } if(result == "0"){ message_box.show_message( "Error ",msg,1); $(\'#did\'+did).attr("src","' . $theme['images'] . 'remove.gif"); } }, error: function(request,error) { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }, no_close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); $(document).ready(function(){ $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr(\'class\'); $(this).attr("class", \'sai_tr_bgcolor\'); $(this).mouseout(function(){ $(this).attr(\'class\', old_class); }); }); }); // ]]></script>'; softfooter(); }
function addremote_theme() { global $theme, $globals, $user, $l, $error, $panels, $done; softheader($l['<title>']); echo '<center class="sai_tit"><img src="' . $theme['images'] . 'adddomain.gif" /> ' . $l['header'] . '</center> <img src="' . $theme['images'] . 'hr.jpg" width="100%" height="1" alt="" /><br /><br />'; error_handle($error, '100%'); if (!empty($done)) { echo '<div class="sai_success">' . $l['done'] . '</div><br /><br /> <center><a href="' . $globals['ind'] . 'act=remote" style="padding:8px; display:block; font-size: 18px; font-weight: 400;">' . $l['return_overview'] . '</a></center>'; } else { echo '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkradio(panel){ var panels = new Array("' . implode('", "', array_keys($panels)) . '"); for(x in panels){ $_("panel_"+panels[x]).style.backgroundColor = "white"; } $_("panel_"+panel).style.backgroundColor = "#E2F4FE"; $_("panel").value = panel; } addonload("checkradio(\'' . POSTval('panel', 'cpanel') . '\');"); // ]]></script> <form accept-charset="' . $globals['charset'] . '" name="addremote" method="post" action=""> <table border="0" cellpadding="8" cellspacing="0" width="100%"> <tr> <td width="35%" valign="top"> <span class="sai_head">' . $l['choose_type'] . '</span><br /> <span class="sai_exp">' . $l['choose_type_exp'] . '</span> </td> <td> <input type="hidden" name="panel" id="panel" /> <table> <tr>'; foreach ($panels as $pk => $pv) { echo '<td align="center" width="100" valign="top"> <a href="javascript:checkradio(\'' . $pk . '\');" style="padding:8px; text-decoration:none; display:block; font-size: 18px; font-weight: 400; color: #444444;" id="panel_' . $pk . '" /> <img src="' . $theme['images'] . $pk . '.gif" border="0" /><br /> ' . $pv . ' </a> </td>'; } echo '</tr> </table> </td> </tr> <tr> <td> <span class="sai_head">' . $l['domain_name'] . '</font></span><br /> <span class="sai_exp">' . $l['domain_name_exp'] . '</span> </td> <td> <input type="text" name="domain_name" id="domain_name" size="30" value="' . POSTval('domain_name', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['username'] . '</font></span><br /> <span class="sai_exp">' . $l['username_exp'] . '</span> </td> <td> <input type="text" name="username" id="username" size="30" value="' . POSTval('username', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['password'] . '</font></span><br /> <span class="sai_exp">' . $l['password_exp'] . '</span> </td> <td> <input type="password" name="password" id="password" size="30" value="' . POSTval('password', '') . '" /> </td> </tr> </table> <br /><br /> <p align="center"> <input type="submit" name="addremotesite" id="addremotesite" value="' . $l['submit'] . '" class="sai_graybluebut" /> </p> </form>'; } softfooter(); }
function fuser_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error; global $insid, $backed, $software, $soft, $done, $show; echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=' . $globals['charset'] . '" /> <meta name="keywords" content="softaculous, software" /> <title>' . $l['<title>'] . '</title> <link rel="stylesheet" type="text/css" href="' . $theme['url'] . '/style.css" /> <link rel="shortcut icon" href="' . $theme['a_images'] . 'favicon.ico" /> <script language="javascript" src="' . $theme['url'] . '/js/universal.js" type="text/javascript"></script> </head> <body> <div class="sai_loginmap"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td colspan="3" background="' . $theme['images'] . 'loginhead.gif"> <table border="0" cellpadding="0" cellspacing="0" width="950" align="center"> <tr> <td align="left" width="100%" height="43" valign="middle"> <a href="' . $globals['ind'] . '"><img ' . ($globals['softpanel'] == 'ampps' ? 'src="' . $theme['a_images'] . 'loginlogo.gif"' : (empty($globals['logo_url']) ? ' src="' . $theme['a_images'] . 'loginlogo.gif"' : ' src="' . $theme['images'] . 'cust_panel.gif"')) . ' alt="" /></a> </td> </td> </tr> </table> </td> </tr> <tr> <td> </td> <td align="left" width="950" valign="top">'; error_handle($error, 360, 1); if (!empty($done)) { echo '<br /><br /> <center><div class="sai_notice" style="width:70%;"><img src="' . $theme['images'] . 'notice.gif" /> ' . $l['fuser_mail_done'] . '</div> <a href="index.php?act=login" style="color:#666666">' . $l['back_to_login'] . '</a> </center> <br /><br /><br /><br />'; } else { echo '<form accept-charset="' . $globals['charset'] . '" action="" method="post" name="loginform"> <br /><br /><br /> <table border="0" cellpadding="8" cellspacing="0" align="center"> <tr> <td width="360" valign="middle"> <center class="sai_loginhead">' . $l['forgotuser'] . '</center> <table border="0" cellpadding="2" cellspacing="0" align="center"> <tr> <td width="30"> </td> <td valign="top" class="sai_login_txt"> <br /><br /><br /> ' . $l['emailuser'] . '<br /> <input type="text" name="email" id="email" value="' . POSTval('email', '') . '" class="sai_login_input" /> <center><span class="sai_loginhead">' . $l['enteremail'] . '</span></center> <center><br /> <input type="submit" name="submitemailuser" value="' . $l['sub_email'] . '" class="sai_graybluebut" /> </center> </td> <td width="30"> </td> </tr> </table> </td> </tr> </table> </form> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ window.onload = function(){ $_("email").focus(); } // ]]></script>'; } echo '</td> <td> </td> </tr> </table> </div> <br />'; softfooter(); }
function network_tools_theme() { global $user, $globals, $l, $theme, $softpanel, $error, $done, $domain, $lookup, $action; // For Detail if (optGET('domain_lookup')) { if (!empty($error)) { echo '0' . current($error); return false; } if (!empty($done)) { showdetail(); return true; } } softheader($l['<title>']); error_handle($error); if (!empty($done)) { echo '<div class="sai_success">' . $done . '</div><br /><br />'; } echo '<center class="sai_tit"><img src="' . $theme['a_images'] . 'network_tools.gif" /> ' . $l['network_tools'] . '</center> <form accept-charset="' . $globals['charset'] . '" name="domain_lookup" method="post" action="" id="domain_lookup"> <table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;"> <tr> <td width="50%"> <span class="sai_head">' . $l['lbl_head'] . '</font></span><br/><span class="sai_exp">' . $l['lookup_desc'] . '</span> </td> <td> <input type="text" name="domain_name" id="domain_name" size="30" value="' . POSTval('domain_name', '') . '" /> </td> </tr> <tr> <td> <p align="right"> <input type="button" class="sai_graybluebut" name="dns_lookup" value="' . $l['domain_lookup'] . '" id="dns_lookup"/> </p> </td> <td> <p align="left"> <input type="button" class="sai_graybluebut" name="dns_traceroute" value="' . $l['domain_trace'] . '" id="dns_traceroute"/> <img id="trace_prog" src="' . $theme['images'] . 'progress.gif" style="display:none"> </p> </td> </tr> </table> </form><br /> <div id="domain_lookup_tab" style="display:none"></div></br> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ var message_box = function(){ return{ show_message: function(title, body , image) { var okbutton = \'<input style="width:75px" class="sai_graybluebut" type="button" onclick="message_box.close_message();" value="OK" />\'; if(image == "1"){ var img = \'<img src="' . $theme['images'] . 'error.gif" />\'; }else{ var img = \'<img src="' . $theme['images'] . 'confirm.gif" />\'; } if(jQuery(\'.sai_message_box\').html() === null) { var message = \'<div class="sai_message_box"><table border="0" cellpadding="8" width="100%" height="100%"><tr ><td rowspan="2" width="40%" > \'+ img + \'</td><td width="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table></div>\'; jQuery(document.body).append( message ); jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); }else{ var message =\' <table border="0" width="100%" cellpadding="8" height="100%"><tr ><td rowspan="2" width="40%">\'+ img + \'</td><td widt="60%" class ="msg_tr1">\' + title + \'</td></tr><tr class ="msg_tr2"><td style="text-align:left">\' + body + \'</td></tr><tr ><td colspan="2" class ="msg_tr3">\' + okbutton + \'</td></tr></table>\'; jQuery(\'.sai_message_box\').css(\'top\', jQuery($(jQuery.browser.webkit ? "body": "html")).scrollTop() + 150); jQuery(\'.sai_message_box\').show(\'slow\'); jQuery(\'.sai_message_box\').html( message ); } }, close_message: function() { jQuery(\'.sai_message_box\').hide(\'fast\'); } } }(); $(document).ready(function(){ // For close details $(".dclose").click(function(){ $("#domain_lookup_tab").slideUp(\'slide\',\'\',5000); }); // Domain Lookup $("#dns_lookup").click(function(){ var action = $(this).attr(\'id\'); action = action.substr(4); var domain = $("#domain_name").val(); $.ajax({ type: "POST", url: window.location+"&domain_lookup=1&domain_name="+domain+"&action="+action, // Checking for error success: function(data){ var result = data.substring(0,1); if(result == "0"){ var msg = data.substring(1); message_box.show_message( "Error",msg,1); }else{ $("#domain_lookup_tab").html(data); $("#domain_lookup_tab").slideDown(\'slide\',\'\',5000); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); // Domain Lookup $("#dns_traceroute").click(function(){ $("#trace_prog").css("display", ""); var action = $(this).attr(\'id\'); action = action.substr(4); var domain = $("#domain_name").val(); $.ajax({ type: "POST", url: window.location+"&domain_lookup=1&domain_name="+domain+"&action="+action, // Checking for error success: function(data){ $("#trace_prog").css("display", "none"); var result = data.substring(0,1); if(result == "0"){ $("#trace_prog").css("display", "none"); var msg = data.substring(1); message_box.show_message( "Error",msg,1); }else{ $("#domain_lookup_tab").html(data); $("#domain_lookup_tab").slideDown(\'slide\',\'\',5000); } }, error: function() { message_box.show_message("Error",\'' . $l['connect_error'] . '\',1); } }); }); }); // ]]></script>'; softfooter(); }
function signin_theme() { global $user, $globals, $l, $theme, $iscripts, $catwise, $error, $softpanel; $theme['url'] = 'themes/default'; $theme['images'] = $theme['url'] . '/images/'; echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="keywords" content="softaculous, software" /> <title>Softaculous Login</title> <link rel="stylesheet" type="text/css" href="' . $theme['url'] . '/style.css" /> <link rel="shortcut icon" href="' . $theme['images'] . 'favicon.ico" /> <script language="javascript" src="' . $theme['url'] . '/js/universal.js" type="text/javascript"></script> </head> <body> <div class="sai_loginmap"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td colspan="3" background="' . $theme['images'] . 'loginhead.gif"> <table border="0" cellpadding="0" cellspacing="0" width="950" align="center"> <tr> <td align="left" width="100%" height="43" valign="middle"> <a href="' . $globals['ind'] . '"><img src="' . $theme['images'] . 'cust_panel.gif" alt="" /></a> </td> </tr> </table> </td> </tr> <tr> <td> </td> <td align="left" width="950" valign="top"><form accept-charset="UTF-8" action="" method="post" name="loginform"> <br /><br /> <table border="0" cellpadding="8" cellspacing="0" align="center"> <tr> <td width="400" valign="middle"> <center class="sai_main_head">' . $l['sign_in'] . '</center> <table border="0" cellpadding="2" cellspacing="0" align="center"> <tr> <td width="30"> </td> <td valign="top" class="sai_login_txt"> <br /> ' . $l['log_user'] . '<br /> <input type="text" name="username" id="username" value="' . POSTval('username') . '" class="sai_login_input" /> <br /> ' . $l['log_pass'] . '<br /> <input type="password" name="password" value="" class="sai_login_input" /> <center> <input type="submit" name="login" value="' . $l['sub_but'] . '" class="flat-butt" /> </center> </td> <td width="30"> </td> </tr> </table> <br /> </td> </tr> </table> </form> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ window.onload = function(){ $_("username").focus(); } // ]]></script> </td> <td> </td> </tr> </table> </div> <br />'; }
function js_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts, $allcatwise; global $software, $soft, $info, $settings, $init_tab, $overwrite_option, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $show_installtype, $protocols, $nopackage, $ajaxhttpsexists, $ajaxhttps, $new_insid; if (optGET('ajaxdownload') && !empty($nopackage)) { // Try to download the package if (method_exists($softpanel, 'updatesoftwares')) { $softpanel->updatesoftwares($soft, 0, 0, 1); echo 1; return true; } // False call echo 0; return false; } // Give the staus if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } if (!empty($ajaxhttps)) { echo $ajaxhttpsexists; return true; } // Auto Installation responses if (isset($_GET['autoinstall'])) { // Installed successfully if (!empty($installed)) { echo 'installed'; return true; } // Are there errors if (!empty($error)) { echo serialize($error); return false; } } //First add the installation info if (empty($installed)) { $info['install'] = '<div id="fadeout_div"><form accept-charset="' . $globals['charset'] . '" name="installsoftware" method="post" action="" onsubmit="return checkform();" id="installsoftware" class="form-horizontal">'; if (empty($globals['lictype']) && !empty($scripts[$soft]['force_scripts'])) { $info['install'] .= ' <div class="alert alert-warning"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <center>' . lang_vars($l['not_in_free'], array($software['name'])) . (!webuzo() ? ' ' . $l['notify_admin'] : '') . '</center> </div>'; } $info['install'] .= error_handle($error, "100%", 0, 1) . '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(dosubmit){ try{ if(!formcheck()){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(!get_package()){ return false; } if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if(dosubmit == 1){ $_("installsoftware").submit(); } show_msg("' . $l['installing'] . '"); } return true; }; function toggle_advoptions(){ if ($("#advoptions").is(":hidden")){ $("#advoptions").slideDown("slow"); $("#plus").attr("src", "' . $theme['images'] . 'minus_new.gif"); } else{ $("#advoptions").slideUp("slow"); $("#plus").attr("src", "' . $theme['images'] . 'plus_new.gif"); } } function plus_onmouseover(){ $("#plus").attr("src", "' . $theme['images'] . 'plus_hover.gif"); } function plus_onmouseout(){ $("#plus").attr("src", "' . $theme['images'] . 'plus.gif"); } var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#installsoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); $.ajax({ url: window.location+"&jsnohf=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ //alert(responseText); if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(newhtml); show_backup(); new_theme_funcs_init(); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Is the package there ? var nopackage = ' . (empty($nopackage) ? 0 : 1) . '; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } function get_package(){ if(nopackage){ show_msg("' . $l['downloading'] . '"); try{ AJAX("' . $globals['index'] . 'act=js&soft=' . $soft . '&ajaxdownload=1&random="+Math.random(), "get_package_handle(re)"); }catch(e){ } return false; }else{ $_("show_txt").style.display = "none"; return true; } }; function get_package_handle(resp){ nopackage = 0; show_msg("' . $l['installing'] . '"); checkform(1); }; softemail = new Object(); function softmail(){ try{ var sofdom = "softdomain"; for(x in softemail){ if(softemail[x] == true) continue; var temp = $_(x).value.split("@"); if($_(sofdom).value.indexOf("/") > 0){ var dom_value = $_(sofdom).value.substring(0, $_(sofdom).value.indexOf("/")); }else{ var dom_value = $_(sofdom).value; } $_(x).value = temp[0] + "@" + dom_value; } }catch(e){ return false; } }; function checkhttps(proto_id, softdomain_id, alrt){ try{ var id = $_(proto_id); var proto = id.options[id.selectedIndex].text; $("#checkhttps_wait").css("display","inline-block"); if(proto.indexOf("https") !== -1){ $.ajax({ type: "POST", url: "' . $globals['index'] . 'act=js&soft=' . $soft . '&checkhttps="+encodeURIComponent(proto+$_(softdomain_id).value), timeout:10000, // Checking for error success: function(data){ $("#checkhttps_wait").css("display","none"); is_https(data); }, error: function(jqXHR, status, e) { $("#checkhttps_wait").css("display","none"); is_https(e); return false; } }); //AJAX("' . $globals['index'] . 'act=software&soft=' . $soft . '&checkhttps="+id.options[id.selectedIndex].text+$_(softdomain_id).value, "is_https(re)"); }else{ $("#checkhttps_wait").css("display","none"); is_https("true"); } if(alrt == true){ alert(proto+$_(softdomain_id).value); } }catch(e){ // } return true; }; function is_https(re){ try{ httpserror = ""; //Check if it exists if(re !== "true"){ httpserror = "' . $l['no_https'] . '"; } if(httpserror != ""){ $_("httpserror").style.display = "block"; $_("httpserror").innerHTML = httpserror; return false; }else{ $_("httpserror").style.display = "none"; } }catch(e){ // } return true; }; // show/hide backup options function show_backup(){ var auto_backup = $("#auto_backup").val(); if(auto_backup == 0){ $("#auto_backup_rotation").attr("disabled", true); }else{ $("#auto_backup_rotation").attr("disabled", false); } return true; }; ' . (!empty($_POST) ? '' : 'addonload(\'softmail();show_backup();\');'); $info['install'] .= '// ]]></script>'; $info['install'] .= ' <div class="bg"> <div class="sai_sub_head">' . $l['setup'] . '</div><hr>'; if (empty($globals['hide_protocol'])) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="softproto" class="sai_head">' . $l['choose_protocol'] . '</label><br /> <span class="sai_exp2">' . $l['choose_protocol_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softproto" class="form-control" id="softproto" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($protocols as $k => $v) { $info['install'] .= '<option value="' . $k . '" ' . (optPOST('softproto') == $k || $globals['default_protocol'] == $k && empty($_POST['softproto']) ? 'selected="selected"' : '') . '>' . $v . '</option>'; } $info['install'] .= '</select><div style="display:none;" id="checkhttps_wait"> <img src="' . $theme['images'] . 'progress.gif" alt="please wait.."></div><br /> <div class="row"> <span id="httpserror" style="display:none; padding:10px;" class="alert alert-danger"></span> </div> </div> </div>'; } $info['install'] .= ' <div class="row"> <div class="col-sm-5">'; $info['install'] .= ' <label for="softdomain" class="sai_head">' . $l['choose_domain'] . '</label><br /> <span class="sai_exp2">' . $l['choose_domain_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softdomain" class="form-control" id="softdomain" onchange="softmail();" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; if (!empty($globals['blank_domain'])) { $info['install'] .= '<option value="" ' . (empty($_POST['softdomain']) ? 'selected="selected"' : '') . '>(' . $l['select_domain'] . ')</option>'; } foreach ($softpanel->domainroots as $domain => $dompath) { $info['install'] .= '<option value="' . $domain . '" ' . (!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain ? 'selected="selected"' : '') . '>' . $domain . '</option>'; } $info['install'] .= ' </select> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="softdirectory" class="sai_head">' . $l['in_directory'] . '</label><br /> <span class="sai_exp2">' . $l['in_directory_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="softdirectory" class="form-control" id="softdirectory" size="30" value="' . POSTval('softdirectory', $software['softname']) . '" /> </div> </div><br />'; if (!empty($show_installtype)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="jsinstalltype" class="sai_head">' . $l['ins_type'] . '</label><br /> <span class="sai_exp2">' . $l['ins_type_exp'] . '</span> </div> <div class="col-sm-7"> <select name="jsinstalltype" id="jsinstalltype" class="form-control"> <option value="0" ' . POSTselect('jsinstalltype', 0) . '>' . $l['ori_pack'] . '</option> <option value="1" ' . POSTselect('jsinstalltype', 1, 1) . '>' . $l['just_lib'] . '</option> </select> </div> </div><br />'; } if (!empty($overwrite_option)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <span class="sai_head">' . $l['overwrite'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="overwrite_existing" id="overwrite_existing" /> </div> </div>'; } $info['install'] .= ' </div><br /><!--end of bg class-->'; if (!empty($settings)) { if (file_exists($software['path'] . '/install.js')) { $info['install'] .= '<script language="javascript" type="text/javascript"><!--// --><![CDATA['; $info['install'] .= @parselanguages(str_replace('$(', '$_(', implode('', file($software['path'] . '/install.js')))); $info['install'] .= '// ]]></script>'; } foreach ($settings as $group => $sets) { if ($group == 'hidden' || empty($sets)) { continue; } $info['install'] .= ' <div class="bg"> <div class="sai_sub_head">' . $group . '</div><hr>'; foreach ($sets as $sk => $sv) { //Adding class form-control to input if (preg_match('/type="text"/is', $sv['tag'])) { $sv['tag'] = preg_replace('/>/is', ' class="form-control">', $sv['tag']); } if (preg_match('/<select/is', $sv['tag'])) { $sv['tag'] = preg_replace('/<select/is', '<select class="form-control"', $sv['tag']); } $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for=' . $sk . ' class="sai_head" id="sai_head">' . $sv['head'] . '</label> ' . (empty($sv['exp']) ? '' : '<span class="sai_exp">' . $sv['exp'] . '</span>') . ' </div> <div class="col-sm-7 ">' . $sv['tag'] . '</div> ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : '') . ' ' . (preg_match('/admin_pass|softpass/is', $sv['tag']) ? ' <div class="col-sm-1"> <a href="javascript: void(0);" onclick="$_(\'' . $sk . '\').value=randstr(10, 1, ' . (!empty($globals['pass_strength']) ? $globals['pass_strength'] : 0) . ');return false;" title="' . $l['randpass'] . '"><img src="' . $theme['images'] . 'randpass.gif" /></a> </div> ' : '') . ' </div><br />'; } $info['install'] .= '</div><br /><!--end of bg class-->'; } //The Hidden groups if (!empty($settings['hidden'])) { foreach ($settings['hidden'] as $sk => $sv) { $info['install'] .= $sv['tag'] . ' ' . (preg_match('/softmail/is', $sv['tag']) ? '<script language="javascript" type="text/javascript"><!-- // --><![CDATA[ softemail["' . $sk . '"] = false; //Add an event handler $_("' . $sk . '").onkeydown = function(){ softemail["' . $sk . '"] = true; } // ]]></script> ' : ''); } } } //End of if($settings) // Advance option $info['install'] .= ' <div class="bg"> <div class="sai_sub_head" id="advoptions_toggle" onclick="toggle_advoptions(\'advoptions\');" style="cursor:pointer"><img id="advoptions_toggle_plus" src="' . $theme['images'] . 'plus_new.gif" style="margin-top:-4px;"/> ' . $l['adv_option'] . '</div> <div id="advoptions" style="display:none;"><hr> <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['disable_notify_update'] . '</label> <span class="sai_exp">' . $l['exp_disable_notify_update'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="disable_notify_update" id="disable_notify_update" ' . POSTchecked('disable_notify_update') . ' /> </div> </div><br />'; // Auto backups option only if backups is not disabled and panel is not remote if (empty($globals['disable_backup_restore']) && empty($globals['disable_auto_backup']) && !aefer() && empty($softpanel->disable_auto_backup)) { $info['install'] .= ' <div class="row"> <div class="col-sm-5"> <label for="auto_backup" class="sai_head">' . $l['auto_backup'] . '</label> <span class="sai_exp">' . $l['exp_auto_backup'] . '</span> </div> <div class="col-sm-7"> <select name="auto_backup" class="form-control" id="auto_backup" onchange="show_backup();"> <option value="0" ' . POSTselect('auto_backup', '0', 1) . '>' . $l['no_backup'] . '</option>' . (empty($globals['disable_auto_backup_daily']) ? '<option value="daily" ' . POSTselect('auto_backup', 'daily') . '>' . $l['daily'] . '</option>' : '') . (empty($globals['disable_auto_backup_weekly']) ? '<option value="weekly" ' . POSTselect('auto_backup', 'weekly') . '>' . $l['weekly'] . '</option>' : '') . (empty($globals['disable_auto_backup_monthly']) ? '<option value="monthly" ' . POSTselect('auto_backup', 'monthly') . '>' . $l['monthly'] . '</option>' : '') . ' </select> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['auto_backup_rotation'] . '</label> <span class="sai_exp">' . $l['exp_auto_backup_rotation'] . '</span> </div> <div class="col-sm-7"> <select name="auto_backup_rotation" class="form-control" id="auto_backup_rotation">'; for ($i = 0; $i <= 10; $i++) { // Do we have a limit from admin ? if (!empty($globals['auto_backup_limit']) && ($i > $globals['auto_backup_limit'] || $i == 0) || !empty($globals['max_backups']) && ($i > $globals['max_backups'] || $i == 0)) { continue; } $info['install'] .= '<option value="' . $i . '" ' . POSTselect('auto_backup_rotation', $i, $i == 4 ? '1' : '0') . '>' . (empty($i) ? $l['unlimited'] : $i) . '</option>'; } $info['install'] .= '</select> </div> </div><br />'; } $info['install'] .= ' </div> </div><br /><!--end of bg-->'; $info['install'] .= ' <p align="center"> <input type="hidden" name="softsubmit" id="softsubmit" value="' . $l['softsubmit'] . '" /> <input type="submit" name="softsubmitbut" id="softsubmitbut" value="' . $l['softsubmit'] . '" class="flat-butt" /><span id="show_txt" style="display:none;"></span> <br /><br /><br /> ' . (empty($globals['off_email_link']) && empty($globals['off_install_mail']) ? '<span class="sai_head">' . $l['ins_emailto'] . '</span> : <input type="text" name="emailto" id="emailto" size="20" value="' . POSTval('emailto', '') . '" />' : '') . ' </p> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> </form></div> <div id="progress_bar" style="height:125px; width:100%; display: none;"> <br /> <center> <font size="4" color="#222222" id="progress_txt" style="width:100%;">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444; width:100%;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; width:50%;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> <br /><center>' . $l['wait_note'] . '</center> </div> <br /><br /><br />'; } elseif (!empty($installed)) { $info['install'] = ' <div class="bg2"> <h4>' . $l['congrats'] . '</h4><br /> ' . $software['name'] . ' ' . $l['succesful'] . ' : <br /> <a href="' . $__settings['softurl'] . '" target="_blank">' . $__settings['softurl'] . '</a> <br /><br /> ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['install_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . (!empty($globals['ampps_enabled']) && empty($globals['no_ampps']) && $globals['softpanel'] != 'ampps' ? lang_vars($l['ampps_download'], array($software['name'])) . '<br /><br />' : '') . ' ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $new_insid . '&postact=install">' . $l['return'] . '</a></b></center><br /><br />'; if (empty($globals['install_tweet_off']) || empty($globals['lictype'])) { $info['install'] .= '<form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <div class="panel panel-info" style="width:55%; margin:0 auto;"> <div class="panel-heading" style="padding:5px; font-size:15px;"> <font><b>' . $l['install_tweet_sub'] . ' :</b></font> </div> <div class="panel-body"> <div class="row"> <div class="col-sm-10"> <textarea name="text" cols="80" row="3" style="resize:none; width:100%;">' . loadtweetdata('install_tweet', $l['install_tweet']) . '</textarea> </div> <div class="col-sm-2"> <input type="submit" value="Tweet!" class="btn btn-info" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/> </div> </div> </div> </div> </form>'; } $info['install'] .= ' </div><!--end of bg class--><!--PROC_DONE--> <br /><br />'; } softheader($l['<title>'] . $software['name']); $loadedinfo = array('install', 'overview', 'features', 'reviews', 'ratings'); $url = $theme['images']; $ratings = array(); $deduct = 1; $r = $scripts[$k]['ratings']; for ($i_r = 1; $i_r <= 5; $i_r++) { if ($r >= 1) { $ratings[$i_r] = '<img src="' . $url . 'star.png' . '" alt="(' . number_format($scripts[$k]['ratings'], 2) . ' out of 5)" />'; } elseif ($r > 0) { $ratings[$i_r] = '<img src="' . $url . 'halfstar.png' . '" alt="(' . number_format($scripts[$k]['ratings'], 2) . ' out of 5)" />'; } else { $ratings[$i_r] = '<img src="' . $url . 'nostar.png' . '" alt="(' . number_format($scripts[$k]['ratings'], 2) . ' out of 5)" />'; } $r = $r - $deduct; } ?> <script language="JavaScript" src="<?php echo $theme['url'] . '/js/tabber.js'; ?> " type="text/javascript"> </script> <script language="JavaScript" id="ratings_js_file" type="text/javascript"></script> <script language="JavaScript" id="review_js_file" type="text/javascript"></script> <script language="JavaScript" id="reviews_js_file" type="text/javascript"></script> <script type="text/javascript"> tabs = new tabber; tabs.tabs = new Array('<?php echo implode('\', \'', $loadedinfo); ?> '); tabs.tabwindows = new Array('<?php echo implode('_win\', \'', $loadedinfo); ?> _win'); tabs.inittab = <?php echo '\'' . $init_tab . '\';'; ?> addonload('tabs.init();loadraterev();'); function loadraterev(){ <?php if (empty($globals['off_rating_link']) && $soft < 10000) { echo '$_(\'ratings_js_file\').src = "https://www.softaculous.com/ratings.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } if (empty($globals['off_review_link']) && $soft < 10000) { echo '$_(\'review_js_file\').src = "https://www.softaculous.com/review.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; echo '$_(\'reviews_js_file\').src = "https://www.softaculous.com/reviews.js?soft=' . $soft . '&user='******'name'] . '&ip=' . $_SERVER['SERVER_ADDR'] . '";'; } ?> }; </script> <?php // For custom themes if ($soft > 10000) { if (file_exists($globals['euthemes'] . '/' . $globals['theme_folder'] . '/images/topscripts/48/' . $iscripts[$soft]['softname'] . '.png')) { $custom_48 = $theme['images'] . 'topscripts/48/' . $iscripts[$soft]['softname'] . '.png'; } else { $custom_48 = $theme['images'] . '/custom.png'; } } echo ' <div class="bg"> <div id="currentrating" style="display:none"></div> <div class="row" style="margin-left:10px;"> ' . (!empty($custom_48) ? '<img src="' . $custom_48 . '" alt="">' : '<img src="' . $globals['mirror_images'] . 'top15/48/' . $scripts[$soft]['softname'] . '.png" >') . ' <span class="sai_process_heading" style="margin-left:20px;">' . $software['name'] . '</span> </div><br /> <div class="row"> <div class="col-sm-2"> ' . ($soft > 10000 ? '' : '<div class="someclass" title="' . $scripts[$soft]['ratings'] . '">' . implode('', $ratings) . '</div>') . ' </div> <div class="col-sm-5 ver_style"> ' . $l['software_ver'] . ' : <font size="2"><b>' . (!empty($tmp_ver) ? $tmp_ver : $software['ver']) . '</b></font> <a href="javascript" onclick="notifyversion(); return false;" ><img src="' . $theme['images'] . 'notify.gif" name="notifyver" title="' . $l['notify_ver'] . '" alt="' . $l['notify_ver'] . '"></a> </div> <div class="col-sm-3 release_style"> ' . (!empty($info['release_date']) ? $l['release_date'] . ' : <font size="1"><b>' . $info['release_date'] . '</b></font>' : '') . ' </div> <div class="col-sm-2 change_style" style="margin-top:0px;"> ' . (!empty($info['changelog']) ? ' <a href="javascript" data-toggle="modal" data-target="#changelog_div" class="sai_changelogbut" style="text-decoration:none;">' . $l['changelog'] . '</a>' : '') . ' </div> </div><br /> <script type=text/javascript>'; if (!empty($softpanel->pheader)) { if (substr_count($_SERVER['REQUEST_URI'], 'x3') > 0) { echo ' $(document).ready(function(){ $(".ver_style").css("margin-left","0px"); $(".release_style").css("margin-left","0px"); $(".change_style").css({"margin-left":"0px", "margin-top":"-15px"}); });'; } else { echo ' $(document).ready(function(){ $(".ver_style").css("margin-left","0px"); $(".release_style").css("margin-left","0px"); $(".change_style").css({"margin-left":"0px", "margin-top":"-10px"}); });'; } } echo ' </script> <div class="old_tab"> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="sai_tabs"> <tr> <td><a href="javascript:tabs.tab(\'install\')" id="install" class="sai_insbut">' . $l['install'] . '</a></td> <td><a href="javascript:tabs.tab(\'overview\')" class="sai_tab" id="overview">' . $l['overview'] . '</a></td> <td><a href="javascript:tabs.tab(\'features\')" class="sai_tab" id="features">' . $l['features'] . '</a></td> ' . (empty($globals['off_demo_link']) ? '<td><a href="' . ($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'] . 'act=demos&soft=' . $soft) . '" class="sai_tab" id="demo" target="_blank">' . $l['demo'] . '</a></td>' : '') . ' ' . (empty($globals['off_rating_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'ratings\')" class="sai_tab" id="ratings">' . $l['ratings'] . '</a></td>' : '') . ' ' . (empty($globals['off_review_link']) && $soft < 10000 ? '<td><a href="javascript:tabs.tab(\'reviews\')" class="sai_tab" id="reviews">' . $l['reviews'] . '</a></td>' : '') . ' </tr> </table><br /> </div> <div class="new_tab"> <nav class="navbar navbar-default"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <ul class="nav"> <li class="active" style="width:80px;"><a href="javascript:tabs.tab(\'install\')" id="install" class="sai_tab2" style="text-decoration:none; height:40px; top:5px;" data-toggle="collapse" data-target="#myNavbar">' . $l['install'] . '</a></li> </ul> </div> <div class="collapse navbar-collapse" id="myNavbar" style="position:absolute; z-index:1000; width:100%; background:#F8F8F8;"> <ul class="nav navbar-nav"> <li><a href="javascript:tabs.tab(\'overview\')" id="overview" class="sai_tab2" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['overview'] . '</a></li> <li><a href="javascript:tabs.tab(\'features\')" id="features" class="sai_tab2" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['features'] . '</a></li> <li>' . (empty($globals['off_demo_link']) ? '<a href="' . ($soft >= 10000 && !empty($info['demo']) ? $info['demo'] : $globals['ind'] . 'act=demos&soft=' . $soft) . '" class="sai_tab2" id="demo" target="_blank" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['demo'] . '</a>' : '') . '</li> <li>' . (empty($globals['off_rating_link']) && $soft < 10000 ? '<a href="javascript:tabs.tab(\'ratings\')" class="sai_tab2" id="ratings" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['ratings'] . '</a>' : '') . '</li> <li>' . (empty($globals['off_review_link']) && $soft < 10000 ? '<a href="javascript:tabs.tab(\'reviews\')" class="sai_tab2" id="reviews" style="text-decoration:none;" data-toggle="collapse" data-target="#myNavbar">' . $l['reviews'] . '</a>' : '') . '</li> </ul> </div> </nav> </div>'; ?> <script type="text/javascript"> $_(tabs.inittab).className = tabs.tabbedclass; var softid = <?php echo $soft; ?> ; tabs.override = function(id){ if(id == 'install'){ $_('install').className = 'sai_insbutclicked'; }else{ $_('install').className = 'sai_insbut'; } }; </script> <?php //Parse and take care of images $info['overview'] = (!empty($info['changelog']) ? ' <div class="modal fade" id="changelog_div" role="dialog" > <div class="modal-dialog modal-lg" style="margin-top:80px;"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header" style="background:#F0F0F0;"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Changelog</h4> </div> <div class="modal-body" style="height: 350px; overflow-y: auto;"> ' . $info['changelog'] . ' </div> <div class="modal-footer" style="padding-top:10px; height:50px;"> <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Close</button> </div> </div> </div> </div>' : '') . ' <div class="bg2"> <div class="row"> <div class="col-sm-12"> ' . softparse($info['overview'], $soft) . '<br /><br /> </div> <div class="col-sm-6"> <div class="row"> <div class="col-sm-1"><font color="#447edf"><i class="fa sai-disk fa-3x"></i></font></div> <div class="col-sm-5"> <span class="sai_head">' . $l['space_req'] . '</span><br /> <span class="sai_exp2">' . $l['available_space'] . ' : ' . (is_numeric($softpanel->spaceremain) ? number_format($softpanel->spaceremain / 1024 / 1024, 2) : $softpanel->spaceremain) . ' ' . $l['mb'] . '<br /> ' . $l['req_space'] . ' : ' . number_format($software['spacereq'] / 1024 / 1024, 2) . ' ' . $l['mb'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-1"><a href="' . $info['support'] . '"><font color="#447edf"><i class="fa sai-question fa-3x"></i></font></a></div> <div class="col-sm-5"> <span class="sai_head">' . $l['software_support'] . '</span><br /> <span class="sai_exp2"><a href="' . $info['support'] . '" target="_blank">' . $l['support_link'] . '</a><br /> ' . $l['support_note'] . '</span> </div> </div> </div> </div><br /> </div><!--end of bg class-->'; if (!empty($installations[$soft])) { $is_cloneable = is_cloneable($soft); $highlight = optGET('highlight'); $action = optGET('postact'); $info['overview'] .= '<br /><br /> <center><span class="sai_newhead">' . $l['current_ins'] . '</span><br /></center><hr>'; $info['overview'] .= ' <div class="bg2"> <table class="table table-hover"> <thead style="background:#EFEFEF;" class="sai_head2"> <tr> <th>' . $l['link'] . '</th> <th>' . $l['ins_time'] . '</th> <th>' . $l['version'] . '</th> <th width="130">' . $l['options'] . '</th> <th><input type="checkbox" id="check_all"></th> </tr> </thead>'; foreach ($installations[$soft] as $ik => $iv) { $info['overview'] .= '<tr id="trid' . $ik . '"> <td class="endurl"><a href="' . $iv['softurl'] . '" target="_blank" id="insurl' . $ik . '">' . $iv['softurl'] . '</a>' . ($highlight == $ik && !empty($action) ? '<span id="highlight"> <b class="sai_highlight">' . $l['act_' . $action] . '</b></span>' : '') . '</td> <td>' . datify($iv['itime']) . '</td> <td>' . $iv['ver'] . ($software['ver'] != $iv['ver'] && file_exists($software['path'] . '/upgrade.xml') ? ' <a href="' . $globals['ind'] . 'act=upgrade&insid=' . $ik . '"><img src="' . $theme['images'] . 'updates.gif" alt="' . $l['upd_to'] . ' ' . $scripts[$soft]['ver'] . '" class="someclass" /></a>' : '') . '</td> <td>' . (!empty($is_cloneable) ? '<a href="' . $globals['ind'] . 'act=sclone&insid=' . $ik . '" title="' . $l['clone'] . '" class="someclass"><img src="' . $theme['images'] . 'clone.gif" /></a> ' : '') . ' <a href="' . $globals['ind'] . 'act=remove&insid=' . $ik . '" title="' . $l['remove'] . '" class="someclass"><img src="' . $theme['images'] . 'remove.gif" /></a></td> <td> <input type="checkbox" name="insids[]" id="' . $iv['softurl'] . '" value="' . $ik . '" class="soft_inslist"> </td> </tr>'; } $info['overview'] .= '</table><br /> <p align="right" style="width:100%;"> <span class="sai_head">' . $l['with_selected'] . ':</span> <select name="multi_options" id="multi_options"> <option name="todo" id="todo" value="0">---</option> <option name="todo" id="todo" value="mult_rem">' . $l['remove'] . '</option> </select> <input type="button" value="' . $l['go'] . '" onclick="show_confirm()" class="sai_graybluebut"> <br /> </p> <div id="rem_div"></div> </div><!--end of bg2 class--> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ insids = new Array(); removed = new Object(); function show_confirm(){ insids = new Array(); removed = new Object(); if($_("multi_options").value != "mult_rem"){ return false; } // Build the list of Installations to remove var field = document.getElementsByName(\'insids[]\'); insids = new Array(); var c = 0; for(i = 0; i < field.length; i++){ if(field[i].checked == true){ insids[c] = field[i].value; c++; } } //alert(c); if(c == 0){ alert("' . $l['no_sel_inst'] . '"); return false; } var r = confirm("' . $l['del_insid'] . '"); if(r != true){ return false; } remove_by_id(insids[0], "", 0); } function remove_by_id(insid, re, oldinsid){ removed[insid] = false; if(re.length > 0 && oldinsid > 0){ if(re == "removed"){ removed[insid] = true; } } nextinsid = 0; // Find the next INSTALLATION to remove for(i = 0; i < insids.length; i++){ if(typeof(removed[insids[i]]) != "undefined"){ continue; } nextinsid = insids[i]; break; } // If there is something left to be removed if(insid != 0){ try{ AJAX("' . $globals['index'] . 'act=remove&insid="+insid+"&ajax=1&ssk="+randomstring(32)+"&random="+Math.random(), "remove_by_id(\'"+nextinsid+"\', re, \'"+insid+"\')"); $_("rem_div").innerHTML = "<br /><br /><p align=\\"center\\"><img src=\\"' . $theme['images'] . 'ajax_remove.gif\\"> <br />' . $l['rem_inst_id'] . ' ID: " +insid+ ", URL: " + $_("insurl"+insid)+"<br /></p>"; return true; }catch(e){ return false; } } $_("rem_div").innerHTML = ""; alert("' . $l['inst_remvd'] . '"); location.reload(true); return true; } $(document).ready(function(){ $("#check_all").on("click", function(event){ if(this.checked == true){ $(".soft_inslist").prop("checked", true); }else{ $(".soft_inslist").prop("checked", false); } }); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); });'; // If we get anything in $highlight than only we have to call this JS function other wise it will cause the JS error. if (!empty($highlight)) { $info['overview'] .= 'goto_id("insurl' . $highlight . '"); $("#highlight").fadeOut(10000);'; } $info['overview'] .= '}); // ]]></script>'; } if (count($allcatwise[$software['type']][$software['cat']]) > 2 && $software['cat'] != 'others') { $info['overview'] .= '<br /><br /><div class="bg2"> <table width="100%" class="table table-hover"> <tr> <th style="background:#EFEFEF" class="sai_head2">' . $l['related_scripts'] . '</th> </tr> </table>'; $i = 0; foreach ($allcatwise[$software['type']][$software['cat']] as $k => $v) { if ($k == $soft || !empty($scripts[$k]['parent']) && !empty($iscripts[$scripts[$k]['parent']])) { continue; } // Show only 5 scripts if ($i == 5) { break; } $info['overview'] .= ' <div style="text-decoration:none;display:inline-block;text-align:center;margin-top:10px;"> <a href="' . script_link($k) . '" title="' . $v['desc'] . '" width="80" alt="" class="someclass" style="text-decoration:none;margin-top:5px;"> <div class="sai_blog_script" style="margin-left:11%;"> <div class="sai_demo_script_logo"> <img src="' . $globals['mirror_images'] . 'top15/48/' . $v['softname'] . '.png" > </div> <div class="sai_script_name">' . $v['name'] . '</div> </div> </a> </div>'; $i++; } $info['overview'] .= '</div><!--end of bg class-->'; } //Parse and take care of images $info['features'] = '<div class="bg2"><br />' . softparse($info['features'], $soft) . '</div><!--end of bg2 class-->'; $info['ratings'] = ''; $info['reviews'] = '<div class="bg2"><div id="allreviews"></div></div><!--end of bg2 class-->'; foreach ($info as $k => $v) { if (in_array($k, array('demo', 'support', 'changelog'))) { continue; } echo '<div id="' . $k . '_win" style="display: ' . ($init_tab == $k ? "block" : "none") . '; width:100%;"><br /> ' . $v . ' </div>'; } echo '</div><!--End of bg-->'; softfooter(); }
function pass_protect_dir_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $done; // For Delete if (optGET('ajaxdel')) { if (!empty($error)) { echo '{err}' . current($error) . '{/err}'; return false; } if (!empty($done)) { echo '{suc}' . $l['delete'] . '{/suc}'; return true; } } // For Adding a Record if (optGET('add_pass_protect')) { if (!empty($error)) { echo '{err}' . current($error) . '{/err}'; return false; } if (!empty($done)) { echo '{suc}' . $l['add_pass_protect'] . '{/suc}'; show_protected_user_accts(); return true; } } softheader($l['<title>']); echo ' <center class="sai_tit"> <img src="' . $theme['a_images'] . 'email_account.gif" /> ' . $l['lbl_head'] . ' </center> <form accept-charset="' . $globals['charset'] . '" action="" method="post" name="frm_protect_dir" id="frm_protect_dir"> <table border="0" cellpadding="8" cellspacing="8" width="700px" align="center" class="sai_divroundshad" style="padding-left:15px; padding-top:15px;" > <tr> <td width="35%"> <span class="sai_head">' . $l['dir_path'] . '</span><br /> <span class="sai_exp">' . $l['exp_dir_path'] . '</span> </td> <td> ' . $softpanel->user['homedir'] . '/<input type="text" name="dir_path" id="dir_path" size="30" value="' . stripslashes(POSTval('dir_path', 'public_html/')) . '" onfocus="" /> </td> </tr> <tr> <td width="35%"> <span class="sai_head">' . $l['dir_name'] . '</span><br /> <span class="sai_exp">' . $l['exp_dir_name'] . '</span> </td> <td> <input type="text" name="dir_name" id="dir_name" size="30" size="30" value="' . POSTval('dir_name', '') . '" /> </td> </tr> <tr> <td width="35%"> <span class="sai_head">' . $l['username'] . '</span><br /> <span class="sai_exp">' . $l['exp_username'] . '</span> </td> <td> <input type="text" name="username" id="username" size="30" size="30" value="' . POSTval('username', '') . '" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['password'] . '</span><br /> <span class="sai_exp">' . $l['exp_password'] . '</span> </td> <td> <input type="password" name="password" id="password" size="30" value="" /> </td> </tr> <tr> <td> <span class="sai_head">' . $l['re_password'] . '</span><br /> <span class="sai_exp">' . $l['exp_re_password'] . '</span> </td> <td> <input type="password" name="re_password" id="re_password" size="30" value="" /> </td> </tr> <tr> <td colspan="2"> <p align="center"> <input type="hidden" name="add_pass_protect" value="1" /> <input type="submit" style="cursor:pointer" value="' . $l['submit_pass_protect'] . '" name="submit_pass_protect" class="sai_graybluebut" id="submit_pass_protect" /> <img id="add_pass_proc_loader" src="' . $theme['images'] . 'progress.gif" style="display:none" /> </p> </td> </tr> </table> </form> <center> </br></br> <span class="sai_head">' . $l['record_table'] . '<br /><br /> </center> <div id="showrectab">'; show_protected_user_accts(); echo '</div> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ $(document).ready(function(){ // For Adding Password Protected Directories $("#submit_pass_protect").click(function(){ // The Revolving Loader !!! $("#add_pass_proc_loader").css("display", ""); $.ajax({ type: "POST", url: window.location+"&add_pass_protect=1", data: $("#frm_protect_dir").serialize(), // Checking for error success: function(data){ $("#add_pass_proc_loader").css("display", "none"); // Do we have a success string ? var suc_index = data.indexOf("{suc}"); if(suc_index != -1){ var suc_end_index = data.indexOf("{/suc}"); var suc_data = data.substring(suc_index+5,suc_end_index); if(suc_data != ""){ // Clean Up $_("dir_path").value = ""; $_("dir_name").value = ""; $_("username").value = ""; $_("password").value = ""; $_("re_password").value = ""; message_box.show_message("Done", suc_data, 2); $("#showrectab").html(data.substring(data.indexOf("<table"))); return true; } } var err_index = data.indexOf("{err}"); var err_end_index = data.indexOf("{/err}"); var err_data = data.substring(err_index+5, err_end_index); if(err_data != ""){ message_box.show_message( "Error",err_data,1); return true; } }, error: function() { message_box.show_message("Error", "' . $l['connect_error'] . '", 1); } }); return false; }); }); // ]]></script>'; softfooter(); }
function sclone_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $scripts; global $software, $soft, $info, $settings, $init_tab, $dbtype, $dbs, $installed, $__settings, $setupcontinue, $installations, $notes, $cron, $datadir, $ajaxdb, $ajaxdbexists, $overwrite_option, $protocols, $nopackage, $can_publish, $not_default, $child, $install_option, $multi_ver, $child_sids, $installation_keys, $no_autoupgrade, $ajaxhttpsexists, $ajaxhttps, $insid, $cloned, $new_insid; if (optGET('ajaxdownload') && !empty($nopackage)) { // Try to download the package if (method_exists($softpanel, 'updatesoftwares')) { $softpanel->updatesoftwares($soft, 0, 0, 1); echo 1; return true; } // False call echo 0; return false; } // Give the status if (optGET('ajaxstatus')) { $_status = soft_progress(optGET('ajaxstatus')); $tmp_status = unserialize($_status[1]); $_status[1] = $tmp_status['current_status']; if (!empty($_status)) { echo implode('|', $_status); return true; } // False call echo 0; return false; } if (!empty($ajaxdb)) { echo $ajaxdbexists; return true; } if (!empty($ajaxhttps)) { echo $ajaxhttpsexists; return true; } softheader($l['<title>']); if (!empty($cloned)) { echo ' <div class="bg"> <h4>' . $l['congrats'] . '</h4><br /> ' . $software['name'] . ' ' . $l['succesful'] . ' : <br /> <a href="' . $__settings['softurl'] . '" target="_blank">' . $__settings['softurl'] . '</a> ' . (!empty($software['adminurl']) ? '<br />' . $l['admin_url'] . ' : <a href="' . $__settings['softurl'] . '/' . $software['adminurl'] . '" target="_blank">' . $__settings['softurl'] . '/' . $software['adminurl'] . '</a>' : '') . '<br /><br /> ' . (!empty($setupcontinue) ? $l['setup_continue'] . ' : <br /> <a href="' . $__settings['softurl'] . '/' . $setupcontinue . '" target="_blank">' . $__settings['softurl'] . '/' . $setupcontinue . '</a><br /><br />' : '') . ' ' . $l['enjoy'] . '<br /><br /> ' . (!empty($notes) ? $l['install_notes'] . ' : <br /> <div class="sai_notes">' . softparse($notes, $soft) . '</div><br /><br />' : '') . ' ' . $l['please_note'] . '<br /><br /> ' . $l['regards'] . ',<br /> ' . $l['softinstaller'] . '<br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $new_insid . '&postact=clone" class="sai_head">' . $l['return'] . '</a></b></center><br /><br />'; if (empty($globals['clone_tweet_off']) || empty($globals['lictype'])) { echo ' <form method="get" action="http://twitter.com/intent/tweet" id="tweet" onsubmit="return dotweet(this);"> <div class="panel panel-info" style="width:55%; margin:0 auto;"> <div class="panel-heading" style="padding:5px; font-size:15px;"> <font><b>' . $l['clone_tweet_sub'] . ' :</b></font> </div> <div class="panel-body"> <div class="row"> <div class="col-sm-10"> <textarea name="text" cols="80" row="3" style="resize:none; width:100%;">' . loadtweetdata('clone_tweet', $l['clone_tweet']) . '</textarea> </div> <div class="col-sm-2 col-xs-2"> <input type="submit" value="Tweet!" class="btn btn-info" onsubmit="return false;" id="twitter-btn" style="margin-top:20px;"/> </div> </div> </div> </div> </form>'; } echo ' </div><!--end of bg class--><!--PROC_DONE--> <br /><br />'; } else { echo ' <div id="install_win"> <div id="fadeout_div"> <form accept-charset="' . $globals['charset'] . '" name="clonesoftware" method="post" action="" onsubmit="return checkform();" id="clonesoftware"> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ function checkform(dosubmit){ try{ if(!formcheck()){ return false; } }catch(e){ //Do nothing } $_("softsubmitbut").disabled = true; if(!get_package()){ return false; } if(useprog){ // Send a request to check the status progressbar.start(); // Return false so that the form is not submitted return false; // This is OLD School ! }else{ if(dosubmit == 1){ $_("clonesoftware").submit(); } show_msg("' . $l['cloning'] . '"); } return true; }; var progressbar = { timer: 0, total_width: 0, status_key: "", synctimer: 0, fadeout_div: "#fadeout_div", win_div: "#install_win", progress_div: "#progress_bar", formid: "#clonesoftware", frequency: 8000, current: function(){ try{ var tmp_cur = Math.round(parseInt($_("progress_color").width)/parseInt($_("table_progress").width)*100); if(tmp_cur > 100){ tmp_cur = 99; } return tmp_cur; }catch(e){ return -1; } }, reset: function(){ try{ clearTimeout(this.timer); $_("progress_color").width = 1; }catch(e){ }}, move: function(dest, speed, todo){ try{ var cur = this.current(); if(cur < 0){ clearTimeout(this.timer); return false; } var cent = cur + 1; var new_width = cent/100*this.total_width; if(new_width < 1){ new_width = 1; } //alert(new_width+" "+dest+" "+cent); $_("progress_color").width = new_width; $_("progress_percent").innerHTML = "("+cent+" %)"; if(cent < dest){ this.timer = setTimeout("progressbar.move("+dest+", "+speed+")", speed); }else{ eval(todo); } }catch(e){ }}, text: function(txt){ try{ $_("progress_txt").innerHTML = txt; }catch(e){ }}, sync: function(){ if(progressbar.status_key.length < 2){ return false; } $.ajax({ url: window.location+"&ajaxstatus="+progressbar.status_key+"&random="+Math.random(), type: "GET", success: function(data){ if(data == 0) return false; var tmp = data.split("|"); var cur = progressbar.current(); tmp[2] = (3000/(tmp[0]-cur)); //alert(tmp); if(tmp[0] > cur){ if(parseInt(tmp[2]) == 0){ tmp[2] = 800; } progressbar.move(tmp[0], tmp[2]); } progressbar.text(tmp[1]); progressbar.synctimer = setTimeout("progressbar.sync()", progressbar.frequency); } }); }, sync_abort: function(){ clearTimeout(this.synctimer); }, start: function(){ try{ this.post(); this.reset(); this.total_width = parseInt($_("table_progress").width); this.move(95, 800); this.status_key = $("#soft_status_key").attr("value"); this.sync(); }catch(e){ }}, post: function(){ // Scroll to the Top and show the progress bar goto_top(); $(progressbar.fadeout_div).fadeOut(500, function(){ $(progressbar.progress_div).fadeOut(1); $(progressbar.progress_div).fadeIn(500); } ); try{ var sid = $_("softbranch").value; }catch(e){ var sid = ' . $soft . ' } $.ajax({ url: window.location+"&jsnohf=1&soft="+sid+"&multi_ver=1", type: "POST", data: $(progressbar.formid).serialize(), complete: function( jqXHR, status, responseText ) { progressbar.sync_abort(); // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; try{ if(responseText.match(/\\<\\!\\-\\-PROC_DONE\\-\\-\\>/gi)){ progressbar.text("' . addslashes($l['finishing_process']) . '"); progressbar.move(99, 10, "$(progressbar.progress_div).fadeOut(1)"); }else{ progressbar.reset(); } }catch(e){ } if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // Create a dummy div to hold the results // inject the contents of the document in, removing the scripts // to avoid any "Permission Denied" errors in IE //var newhtml = jQuery("<div>").append(responseText).find(progressbar.win_div).html(); //alert(responseText); $(progressbar.win_div).animate({opacity: 0}, 1000, "", function(){ $(progressbar.win_div).html(responseText); new_theme_funcs_init(); }).delay(50).animate({opacity: 1}, 500); //alert(newhtml); }else{ alert("Oops ... the connection was lost"); } } }); } }; function show_msg(msg){ $_("show_txt").innerHTML = "<br /><br /> "+msg+" <img src=\\"' . $theme['images'] . 'progress.gif\\" />"; $_("show_txt").style.display = ""; } // Is the package there ? var nopackage = ' . (empty($nopackage) ? 0 : 1) . '; // Use the Progress Bar ? var useprog = 1; try{ if(BrowserDetect.browser.toLowerCase() == "safari" && BrowserDetect.version.toString().substr(0, 1) == "3"){ useprog = 0; } }catch(e){ } function get_package(){ if(nopackage){ show_msg("' . $l['downloading'] . '"); try{ AJAX("' . script_link($soft) . '&ajaxdownload=1&random="+Math.random(), "get_package_handle(re)"); }catch(e){ } return false; }else{ $_("show_txt").style.display = "none"; return true; } }; function get_package_handle(resp){ nopackage = 0; show_msg("' . $l['cloning'] . '"); checkform(1); }; function checkhttps(proto_id, softdomain_id, alrt){ try{ var id = $_(proto_id); var proto = id.options[id.selectedIndex].text; $("#checkhttps_wait").css("display","inline-block"); if(proto.indexOf("https") !== -1){ $.ajax({ type: "POST", url: "' . script_link($soft) . '&checkhttps="+encodeURIComponent(proto+$_(softdomain_id).value), timeout:10000, // Checking for error success: function(data){ $("#checkhttps_wait").css("display","none"); is_https(data); }, error: function(jqXHR, status, e) { $("#checkhttps_wait").css("display","none"); is_https(e); return false; } }); //AJAX("' . script_link($soft) . '&checkhttps="+id.options[id.selectedIndex].text+$_(softdomain_id).value, "is_https(re)"); }else{ $("#checkhttps_wait").css("display","none"); is_https("true"); } if(alrt == true){ alert(proto+$_(softdomain_id).value); } }catch(e){ // } return true; }; function is_https(re){ try{ httpserror = ""; //Check if it exists if(re !== "true"){ httpserror = "' . $l['no_https'] . '"; } if(httpserror != ""){ $_("httpserror").style.display = "block"; $_("httpserror").innerHTML = httpserror; return false; }else{ $_("httpserror").style.display = "none"; } }catch(e){ // } return true; }; '; if (!empty($dbtype)) { echo 'function checkdbname(id, alrt){ try{ AJAX("' . script_link($soft) . '&checkdbexists="+$_(id).value, "dbexists(\'"+id+"\', "+alrt+", re)"); }catch(e){ // } return true; }; function dbexists(id, alrt, re){ try{ dberror = ""; //Is the length fine if($_(id).value.length > ' . (empty($softpanel->maxdblen) ? 7 : $softpanel->maxdblen) . '){ dberror = "' . $l['db_name_long'] . '"; } //There should be only alphanumeric characters if(/[^a-zA-Z0-9]/.test($_(id).value) && !' . aefer() . '0){ dberror = "' . $l['db_alpha_num'] . '"; } //Check if it exists if(re == "true"){ dberror = "' . $l['database_exists'] . '"; } if(dberror != ""){ $_(id+"error").style.display = "block"; $_(id+"error").innerHTML = dberror; if(alrt == true){ alert(dberror); } return false; }else{ $_(id+"error").style.display = "none"; } }catch(e){ // } return true; };'; } //End of if($dbtype) echo ' // ]]></script>'; echo ' <div class="bg"><br /> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-6 col-xs-5" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-copy fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-6 col-xs-7" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['prog_cloning'] . $software['name'] . '</div> </div>'; if (empty($globals['lictype']) && !empty($scripts[$soft]['force_scripts'])) { echo '<br /> <div class="alert alert-warning"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <center>' . lang_vars($l['not_in_free'], array($software['name'])) . (!webuzo() ? ' ' . $l['notify_admin'] : '') . '</center> </div>'; } echo error_handle($error, "100%", 0, 1); echo ' <div style="padding: 0 25px;"><br /> <div class="sai_sub_head">' . $l['clone_ins'] . '</div><hr>'; if (empty($softpanel->noprotocol)) { echo ' <div class="row"> <div class="col-sm-5"> <label for="softproto" class="sai_head">' . $l['choose_protocol'] . '</label><br /> <span class="sai_exp2">' . $l['choose_protocol_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softproto" id="softproto" class="form-control" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($protocols as $k => $v) { echo '<option value="' . $k . '" ' . (optPOST('softproto') == $k || $globals['default_protocol'] == $k && empty($_POST['softproto']) ? 'selected="selected"' : '') . '>' . $v . '</option>'; } echo ' </select> <div style="display:none;" id="checkhttps_wait"> <img src="' . $theme['images'] . 'progress.gif" alt="please wait.."> </div><br /> <div class="row"> <div class="col-sm-12"> <span id="httpserror" style="display:none; font-size:12px; padding:10px;" class="alert alert-danger"></span> </div> </div> </div> </div>'; } echo ' <div class="row"> <div class="col-sm-5"> <label for="softdomain" class="sai_head">' . $l['choose_domain'] . '</label><br /> <span class="sai_exp2">' . $l['choose_domain_exp'] . '</span> </div> <div class="col-sm-7"> <select name="softdomain" id="softdomain" class="form-control" onchange="softmail();" onblur="checkhttps(\'softproto\', \'softdomain\', false)">'; foreach ($softpanel->domainroots as $domain => $dompath) { echo '<option value="' . $domain . '" ' . (!empty($_POST['softdomain']) && $_POST['softdomain'] == $domain ? 'selected="selected"' : '') . '>' . $domain . '</option>'; } echo ' </select> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="softdirectory" class="sai_head">' . $l['in_directory'] . '</label><br /> <span class="sai_exp2">' . $l['in_directory_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="softdirectory" id="softdirectory" class="form-control" size="30" value="' . POSTval('softdirectory', !empty($globals['no_prefill']) ? '' : $software['softname']) . '" /> </div> </div><br />'; // A data Directory ? if (!empty($datadir)) { echo ' <div class="row"> <div class="col-sm-5"> <label for="datadir" class="sai_head">' . $l['datadir'] . '</label><br /> <span class="sai_exp2">' . $l['datadir_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="datadir" id="datadir" class="form-control" size="30" value="' . POSTval('datadir', $datadir) . '" /> </div> </div><br />'; } if (!empty($dbtype)) { $dbname = mysqldbname($software['softname']); if (method_exists($softpanel, 'mysqldbname')) { $dbname = $softpanel->mysqldbname(); } echo ' <div class="row"> <div class="col-sm-5"> <label for="softdb" class="sai_head">' . $l['database_name'] . '</label><br /> <span class="sai_exp2">' . (aefer() ? $l['database_name_exp_aefer'] : $l['database_name_exp']) . '</span> </div> <div class="col-sm-7"> <input type="text" name="softdb" id="softdb" class="form-control" size="30" value="' . POSTval('softdb', $dbname) . '" onblur="checkdbname(\'softdb\', false)" /> <span id="softdberror" style="background: #FDB3B3; display:none; width:200px;"></span> </div> </div><br />'; if (!empty($softpanel->no_db_create)) { // Database Username echo ' <div class="row"> <div class="col-sm-5"> <label for="dbusername" class="sai_head">' . $l['dbusername'] . '</label><br /> <span class="sai_exp2">' . $l['dbusername_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="dbusername" id="dbusername" class="form-control" size="30" value="' . POSTval('dbusername', '') . '" /> </div> </div><br />'; // Database Password echo ' <div class="row"> <div class="col-sm-5"> <label for="dbuserpass" class="sai_head">' . $l['dbuserpass'] . '</label><br /> <span class="sai_exp2">' . $l['dbuserpass_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="dbuserpass" id="dbuserpass" class="form-control" size="30" value="' . POSTval('dbuserpass', '') . '" /> </div> </div><br />'; //Database Host Name echo ' <div class="row"> <div class="col-sm-5"> <label for="hostname" class="sai_head">' . $l['hostname'] . '</label><br /> <span class="sai_exp2">' . $l['hostname_exp'] . '</span> </div> <div class="col-sm-7"> <input type="text" name="hostname" id="hostname" class="form-control" size="30" value="' . POSTval('hostname', 'localhost') . '" /> </div> </div><br />'; } } if (!empty($cron)) { echo ' <div class="row"> <div class="col-sm-5"> <span class="sai_head">' . $l['cron_job'] . '</span><br /> <span class="sai_exp2">' . $l['cron_job_exp'] . '</span> </div> <div class="col-sm-7"> <div class="row"> <div class="col-sm-2"> <span>' . $l['cron_min'] . '</span> <input type="text" class="form-control" name="cron_min" id="cron_min" size="2" value="' . POSTval('cron_min', $cron['min']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_hour'] . '</span> <input type="text" class="form-control" name="cron_hour" id="cron_hour" size="2" value="' . POSTval('cron_hour', $cron['hour']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_day'] . '</span> <input type="text" class="form-control" name="cron_day" id="cron_day" size="2" value="' . POSTval('cron_day', $cron['day']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_month'] . '</span> <input type="text" class="form-control" name="cron_month" id="cron_month" size="2" value="' . POSTval('cron_month', $cron['month']) . '" /> </div> <div class="col-sm-2"> <span>' . $l['cron_weekday'] . '</span> <input type="text" class="form-control" name="cron_weekday" id="cron_weekday" size="2" value="' . POSTval('cron_weekday', $cron['weekday']) . '" /> </div> </div> </div> </div><br />'; } if (!empty($overwrite_option)) { echo ' <div class="row"> <div class="col-sm-5"> <label class="sai_head">' . $l['overwrite'] . '</label> </div> <div class="col-sm-7"> <input type="checkbox" name="overwrite_existing" id="overwrite_existing" /> </div> </div><br />'; } echo ' <br /> </div>'; // The Clone details form echo ' <div class="bg info_block"> <div class="sai_sub_head">' . $l['info'] . '</div><hr style="border-color: #D1D2D3;"> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_softname'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $software['name'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_num'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['insid'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_ver'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['ver'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_time'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . datify($user['ins'][$insid]['itime']) . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_path'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softpath'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_url'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info"><a href="' . $user['ins'][$insid]['softurl'] . '" target="_blank">' . $user['ins'][$insid]['softurl'] . '</a></span> </div> </div><br />'; if (!empty($user['ins'][$insid]['admin_folder']) || !empty($scripts[$soft]['admin_url'])) { $adminurl = $user['ins'][$insid]['softurl'] . '/' . (!empty($user['ins'][$insid]['admin_folder']) ? $user['ins'][$insid]['admin_folder'] : $scripts[$soft]['admin_url']); echo ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_admin_url'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info"><a href="' . $adminurl . '" target="_blank">' . $adminurl . '</a></span> </div> </div><br />'; } echo ' ' . (empty($user['ins'][$insid]['wwwdir']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_wwwdir'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['wwwdir'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['wwwurl']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_wwwurl'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['wwwurl'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdatadir']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_datadir'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdatadir'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdb']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_db'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdb'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdbuser']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_dbuser'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdbuser'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdbhost']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_dbhost'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdbhost'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['cron_command']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_cron_command'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . base64_decode($user['ins'][$insid]['cron_command']) . '</span> </div> </div><br /> ') . ' </div><br /><br /><!--end of bg class--> <p align="center"> <input type="hidden" name="softsubmit" id="softsubmit" value="' . $l['softsubmit'] . '" /> <input type="hidden" name="cloneins" id="cloneins" value="' . $l['cloneins'] . '" /> <input type="submit" name="softsubmitbut" class="flat-butt" id="softsubmitbut" value="' . $l['cloneins'] . '" /><span id="show_txt" style="display:none;"></span> </p><br /><br /> <input type="hidden" name="soft_status_key" id="soft_status_key" value="' . POSTval('soft_status_key', generateRandStr(32)) . '" /> <center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /><br />'; echo ' </div><!--end of bg class--> </form> </div> <div id="progress_bar" style="display: none; width: 100%;"> <br /> <div class="bg"> <center> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-5 col-xs-5" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-copy fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-7 col-xs-7" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['prog_cloning'] . $software['name'] . '</div> </div> <br /> <font size="4" color="#222222" id="progress_txt" style="width: 100%;">' . $l['checking_data'] . '</font> <font style="font-size: 18px;font-weight: 400;color: #444444; width: 100%;" id="progress_percent">(0 %)</font><br /><br /> </center> <table width="500" cellpadding="0" cellspacing="0" id="table_progress" border="0" align="center" height="28" style="border:1px solid #CCC; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;background-color:#efefef; width: 50%;"> <tr> <td id="progress_color" width="1" style="background-image: url(' . $theme['images'] . 'bar.gif); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px;"></td> <td id="progress_nocolor"> </td> </tr> </table> <br /> <center>' . $l['wait_note'] . '</center><br /><br /> </div><!--end of bg class--><br /><br /> </div><br /><br /><br /><br />'; echo ' </div><br /><br />'; } softfooter(); }
function editdetail_theme() { global $user, $globals, $l, $theme, $softpanel, $iscripts, $catwise, $error, $edit, $settings; global $insid, $edited, $software, $soft, $scripts, $version_updated, $account_details_editable, $no_autoupgrade, $add_to_fileindex, $__settings, $default_fileindex; softheader($l['<title>']); echo ' <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ // show/hide backup options function show_backup(){ try{ if(auto_backup.value == 0){ $("#auto_backup_rotation").prop("disabled", true); }else{ $("#auto_backup_rotation").prop("disabled", false); } }catch(e){ // } return true; }; function toggle_advoptions(ele){ //alert("#"+ele); if ($("#"+ele).is(":hidden")){ $("#"+ele).slideDown("slow"); $("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'minus_new.gif"); } else{ $("#"+ele).slideUp("slow"); $("#advoptions_toggle_plus").attr("src", "' . $theme['images'] . 'plus_new.gif"); } } function plus_onmouseover(ele){ $("#"+ele.id+"_plus").attr("src", "' . $theme['images'] . 'plus_hover.gif"); } function plus_onmouseout(ele){ $("#"+ele.id+"_plus").attr("src", "' . $theme['images'] . 'plus.gif"); } $(document).ready(function() { $("#editfiles tr").click(function(event) { if (event.target.type !== "checkbox") { $(":checkbox", this).trigger("click"); } }); }); ' . (!empty($_POST) ? '' : 'addonload(\'show_backup();\');') . ' // ]]></script>'; $width_size = 65; if (!empty($softpanel->leftpanel_resize)) { $width_size = 40; } if (!empty($edited)) { echo ' <div class="bg"><br /> <div class="alert alert-warning"><center>' . $l['details_edited'] . '</center></div><br /><br /> <center><b><a href="' . script_link($soft) . '&highlight=' . $insid . '&postact=edit" class="sai_head">' . $l['return'] . '</a></b></center><br /> </div><!--end of bg-->'; } else { echo ' <form accept-charset="' . $globals['charset'] . '" name="editsettings" method="post" action="" class="form-horizontal"> <div class="bg"><br /> <div class="row sai_main_head" style="width:100%;" align="center"> <div class="col-sm-5 col-xs-4" style="padding:0 10px 0 0; text-align:right;"> <i class="fa sai-projectman fa-2x" style="color:#00A0D2;"></i> </div> <div class="col-sm-7 col-xs-8" style="padding-top:10px; padding-left:0; text-align:left;">' . $l['edit_ins'] . '</div> </div><br />'; error_handle($error, '100%'); if (!empty($version_updated)) { echo '<div class="alert alert-warning" align="center"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>' . $l['version_edited'] . '</div>'; } echo !empty($GLOBALS['alreadyupdated']) ? ' <form accept-charset="' . $globals['charset'] . '" method="post" name="uprec" id="uprec" action=""> <br /> <center class="alert alert-warning"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <a href="' . $globals['index'] . 'act=editdetail&insid=' . $insid . '&updateversion=1" style="text-decoration:none;"><img src="' . $theme['images'] . 'notice.gif" /> ' . lang_vars($l['alreadyupdated'], array($GLOBALS['alreadyupdated'], $user['ins'][$insid]['ver'])) . '</a> </center> </form>' : ''; echo ' <div style="padding: 0 25px;"> <div class="sai_sub_head">' . $l['ins_details'] . '</div><hr>'; if (empty($globals['hide_directory_url'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_dir" class="sai_head">' . $l['edit_dir'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_dir" id="edit_dir" class="form-control" value="' . POSTval('edit_dir', $user['ins'][$insid]['softpath']) . '" size="' . $width_size . '" /> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="edit_url" class="sai_head">' . $l['edit_url'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_url" id="edit_url" class="form-control" value="' . POSTval('edit_url', $user['ins'][$insid]['softurl']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } // Web directory @since 3.5 if (!empty($user['ins'][$insid]['wwwdir'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_wwwdir" class="sai_head">' . $l['edit_wwwdir'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_wwwdir" id="edit_wwwdir" class="form-control" value="' . POSTval('edit_wwwdir', $user['ins'][$insid]['wwwdir']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } // Web directory URL @since 3.5 if (!empty($user['ins'][$insid]['wwwurl'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_wwwurl" class="sai_head">' . $l['edit_wwwurl'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_wwwurl" id="edit_wwwurl" class="form-control" value="' . POSTval('edit_wwwurl', $user['ins'][$insid]['wwwurl']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } // Data directory ? if (!empty($user['ins'][$insid]['softdatadir'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_datadir" class="sai_head">' . $l['edit_datadir'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_datadir" id="edit_datadir" class="form-control" value="' . POSTval('edit_datadir', $user['ins'][$insid]['softdatadir']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } if (!empty($user['ins'][$insid]['softdb'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_db" class="sai_head">' . $l['edit_db'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_dbname" id="edit_db" class="form-control" value="' . POSTval('edit_dbname', $user['ins'][$insid]['softdb']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } if (!empty($user['ins'][$insid]['softdbuser'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_dbuser" class="sai_head">' . $l['edit_dbuser'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_dbuser" id="edit_dbuser" class="form-control" value="' . POSTval('edit_dbuser', $user['ins'][$insid]['softdbuser']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } if (!empty($user['ins'][$insid]['display_softdbpass'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_dbpass" class="sai_head">' . $l['edit_dbpass'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_dbpass" id="edit_dbpass" class="form-control" value="' . aPOSTval('edit_dbpass', $user['ins'][$insid]['display_softdbpass']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } if (!empty($user['ins'][$insid]['softdbhost'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="edit_dbhost" class="sai_head">' . $l['edit_dbhost'] . '</label><br /> </div> <div class="col-sm-7"> <input type="text" name="edit_dbhost" class="form-control" id="edit_dbhost" value="' . aPOSTval('edit_dbhost', $user['ins'][$insid]['softdbhost']) . '" size="' . $width_size . '" /> </div> </div><br /> '; } echo ' <div class="row"> <div class="col-sm-5"> <label for="disable_notify_update" class="sai_head">' . $l['disable_notify_update'] . '</label><br /> <span class="sai_exp">' . $l['exp_disable_notify_update'] . '</span> </div> <div class="col-xs-6"> <input type="checkbox" name="disable_notify_update" id="disable_notify_update" ' . POSTchecked('disable_notify_update', $user['ins'][$insid]['disable_notify_update']) . ' /> </div> </div><br />'; if (!empty($scripts[$soft]['auto_upgrade']) && empty($no_autoupgrade)) { echo ' <div class="row"> <div class="col-sm-5"> <label for="eu_auto_upgrade" class="sai_head">' . $l['eu_auto_upgrade'] . '</label><br /> <span class="sai_exp">' . $l['exp_eu_auto_upgrade'] . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="eu_auto_upgrade" id="eu_auto_upgrade" ' . POSTchecked('eu_auto_upgrade', $user['ins'][$insid]['eu_auto_upgrade']) . ' /> </div> </div><br /> '; } if (empty($globals['off_upgrade_plugins']) && !empty($software['update_plugins'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="auto_upgrade_plugins" class="sai_head">' . lang_vars($l['auto_upgrade_plugins'], array($software['name'])) . '</label><br /> <span class="sai_exp">' . lang_vars($l['exp_auto_upgrade_plugins'], array($software['name'])) . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="auto_upgrade_plugins" id="auto_upgrade_plugins" id="auto_upgrade_plugins" ' . POSTchecked('auto_upgrade_plugins', $user['ins'][$insid]['auto_upgrade_plugins']) . ' /> </div> </div><br /> '; } if (empty($globals['off_upgrade_themes']) && !empty($software['update_themes'])) { echo ' <div class="row"> <div class="col-sm-5"> <label for="auto_upgrade_themes" class="sai_head">' . lang_vars($l['auto_upgrade_themes'], array($software['name'])) . '</label><br /> <span class="sai_exp">' . lang_vars($l['exp_auto_upgrade_themes'], array($software['name'])) . '</span> </div> <div class="col-sm-7"> <input type="checkbox" name="auto_upgrade_themes" id="auto_upgrade_themes" ' . POSTchecked('auto_upgrade_themes', $user['ins'][$insid]['auto_upgrade_themes']) . ' /> </div> </div><br /> '; } if (empty($globals['disable_backup_restore']) && empty($globals['disable_auto_backup']) && !aefer()) { echo ' <div class="row"> <div class="col-sm-5"> <label for="auto_backup" class="sai_head">' . $l['auto_backup'] . '</label><br /> <span class="sai_exp">' . $l['exp_auto_backup'] . '</span> </div> <div class="col-sm-7"> <select name="auto_backup" class="form-control" id="auto_backup" onchange="show_backup();"> <option value="0" ' . POSTselect('auto_backup', '0', empty($user['ins'][$insid]['auto_backup']) ? '1' : '0') . '>' . $l['no_backup'] . '</option>' . (empty($globals['disable_auto_backup_daily']) ? '<option value="daily" ' . POSTselect('auto_backup', 'daily', $user['ins'][$insid]['auto_backup'] == 'daily' ? '1' : '0') . '>' . $l['daily'] . '</option>' : '') . (empty($globals['disable_auto_backup_weekly']) ? '<option value="weekly" ' . POSTselect('auto_backup', 'weekly', $user['ins'][$insid]['auto_backup'] == 'weekly' ? '1' : '0') . '>' . $l['weekly'] . '</option>' : '') . (empty($globals['disable_auto_backup_monthly']) ? '<option value="monthly" ' . POSTselect('auto_backup', 'monthly', $user['ins'][$insid]['auto_backup'] == 'monthly' ? '1' : '0') . '>' . $l['monthly'] . '</option>' : '') . ' </select> </div> </div><br /> '; } echo ' <div class="row"> <div class="col-sm-5"> <label for="auto_backup_rotation" class="sai_head">' . $l['auto_backup_rotation'] . '</label><br /> <span class="sai_exp">' . $l['exp_auto_backup_rotation'] . '</span> </div> <div class="col-sm-7"> <select name="auto_backup_rotation" class="form-control" id="auto_backup_rotation">'; for ($i = 0; $i <= 10; $i++) { // Do we have a limit from admin ? if (!empty($globals['auto_backup_limit']) && ($i > $globals['auto_backup_limit'] || $i == 0) || !empty($globals['max_backups']) && ($i > $globals['max_backups'] || $i == 0)) { continue; } echo '<option value="' . $i . '" ' . POSTselect('auto_backup_rotation', $i, !empty($user['ins'][$insid]['auto_backup_rotation']) && $user['ins'][$insid]['auto_backup_rotation'] == $i ? '1' : empty($user['ins'][$insid]['auto_backup_rotation']) && $i == 4 ? '1' : '0') . '>' . (empty($i) ? $l['unlimited'] : $i) . '</option>'; } echo '</select> </div> </div><br />'; if (!empty($add_to_fileindex)) { echo ' <div class="row"> <div class="col-sm-5"> <label for="advoptions_toggle" class="sai_head">' . $l['select_files'] . '</label><br /> <span class="sai_exp">' . $l['select_files_exp'] . '</span><br /> </div> <div class="col-sm-7"> <div id="advoptions_toggle" onclick="toggle_advoptions(\'selectfile\');" class="sai_head" style="background: none; cursor:pointer;"><img id="advoptions_toggle_plus" src="' . $theme['images'] . 'plus_new.gif" /> ' . $l['select_files_list'] . '</div> <div id="selectfile" style="display:none"> <table class="table table-hover"> <thead style="background:#EFEFEF;" class="sai_head2"> <tr> <th width="5%"><input type="checkbox" id="check_all_edit" name="check_all_edit"></th> <th colspan="2"><b>' . $l['check_all_edit'] . '</b></th> </tr> </thead>'; foreach ($add_to_fileindex as $ck => $cv) { if (in_array($cv['name'], $default_fileindex)) { continue; } echo '<tr> <td><input type="checkbox" name="add_to_fileindex[]" class="soft_filelist" value="' . $cv['name'] . '" ' . POSTmulticheck('add_to_fileindex', $cv['name'], $__settings['fileindex']) . ' /></td> <td width="5%"><img src="' . $theme['images'] . '' . (!empty($cv['dir']) ? 'dir.png' : 'file.png') . '"></td> <td>' . $cv['name'] . '</td> </tr>'; $i++; } echo ' </table> </div> </div> </div><br /> <div class="row"> <div class="col-sm-5"> <label for="select_files_backup" class="sai_head">' . $l['select_files_backup'] . '</label><br /> <span class="sai_exp">' . $l['select_files_backup_exp'] . '</span> </div> <div class="col-sm-7"> <select name="select_files_backup" class="form-control" id="select_files_backup"> <option value="0" ' . POSTselect('select_files_backup', '0', empty($user['ins'][$insid]['select_files_backup']) ? '1' : '0') . '>' . $l['no'] . '</option> <option value="1" ' . POSTselect('select_files_backup', '1', !empty($user['ins'][$insid]['select_files_backup']) ? '1' : '0') . '>' . $l['yes'] . '</option> </select> </div> </div> <br />'; } echo ' </div>'; if (!empty($settings)) { echo ' <div class="bg">'; foreach ($settings as $group => $sets) { if ($group == 'hidden' || empty($sets)) { continue; } echo ' <div class="sai_sub_head">' . $group . '</div><hr>'; foreach ($sets as $sk => $sv) { if ($sk == 'admin_pass') { $exp_class = 'sai_exp2'; } else { $exp_class = 'sai_exp'; } echo ' <div class="row"> <div class="col-sm-5"> <label for=' . $sk . ' class="sai_head">' . $sv['head'] . '</label> ' . (empty($sv['exp']) ? '' : '<br /><span class="' . $exp_class . '">' . $sv['exp'] . '</span>') . ' </div>'; //Adding class to input if (preg_match('/type="text"/is', $sv['tag'])) { $sv['tag'] = preg_replace('/>/is', 'class="form-control">', $sv['tag']); } echo ' <div class="col-sm-7">' . $sv['tag'] . '</div> </div><br />'; } } //The Hidden groups if (!empty($settings['hidden'])) { foreach ($settings['hidden'] as $sk => $sv) { echo $sv['tag']; } } echo ' </div><br /><!--end of bg clss-->'; } //End of if($settings) echo ' <div class="bg info_block"> <div class="sai_sub_head">' . $l['info'] . '</div><hr style="border-color: #D1D2D3;"> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_softname'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $software['name'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_num'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['insid'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_ver'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['ver'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_time'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . datify($user['ins'][$insid]['itime']) . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_path'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softpath'] . '</span> </div> </div><br /> <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_url'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info"><a href="' . $user['ins'][$insid]['softurl'] . '" target="_blank">' . $user['ins'][$insid]['softurl'] . '</a></span> </div> </div><br />'; if (!empty($user['ins'][$insid]['admin_folder']) || !empty($scripts[$soft]['admin_url'])) { $adminurl = $user['ins'][$insid]['softurl'] . '/' . (!empty($user['ins'][$insid]['admin_folder']) ? $user['ins'][$insid]['admin_folder'] : $scripts[$soft]['admin_url']); echo ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_admin_url'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info"><a href="' . $adminurl . '" target="_blank">' . $adminurl . '</a></span> </div> </div><br />'; } echo ' ' . (empty($user['ins'][$insid]['wwwdir']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_wwwdir'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['wwwdir'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['wwwurl']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_wwwurl'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['wwwurl'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdatadir']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_datadir'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdatadir'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdb']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_db'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdb'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdbuser']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_dbuser'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdbuser'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['softdbhost']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_dbhost'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . $user['ins'][$insid]['softdbhost'] . '</span> </div> </div><br /> ') . ' ' . (empty($user['ins'][$insid]['cron_command']) ? '' : ' <div class="row"> <div class="col-sm-5 col-xs-5"> <span class="sai_head">' . $l['ins_cron_command'] . '</span> </div> <div class="col-sm-6 col-xs-6"> <span class="sai_info">' . base64_decode($user['ins'][$insid]['cron_command']) . '</span> </div> </div><br /> ') . ' </div><!--end of bg class--> <br /><br /> <p align="center"> <input type="hidden" name="editins" id="editins" value="' . $l['editins'] . '" /> <input type="submit" name="softsubmitbut" class="flat-butt" id="softsubmitbut" value="' . $l['editins'] . '" /> </p><br /><br /> <center><b><a href="' . script_link($soft) . '" class="sai_head">' . $l['return'] . '</a></b></center><br /><br /> </div><!--end of bg class--> </form><br /><br /> <script language="javascript" type="text/javascript"><!-- // --><![CDATA[ $(document).ready(function(){ $("#check_all_edit").on("click", function(event){ if(this.checked == true){ $(".soft_filelist").prop("checked", true); }else{ $(".soft_filelist").prop("checked", false); } }); $(".sai_altrowstable tr").mouseover(function(){ var old_class = $(this).attr("class"); //alert(old_class); $(this).attr("class", "sai_tr_bgcolor"); $(this).mouseout(function(){ $(this).attr("class", old_class); }); }); }); // ]]></script>'; } softfooter(); }