Bootswatch, Summernote, and Captcheck mods for Mods for HESK (mods-for-hesk.com). In use at support.netsyms.com.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin_settings.php 261KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298
  1. <?php
  2. /**
  3. *
  4. * This file is part of HESK - PHP Help Desk Software.
  5. *
  6. * (c) Copyright Klemen Stirn. All rights reserved.
  7. * https://www.hesk.com
  8. *
  9. * For the full copyright and license agreement information visit
  10. * https://www.hesk.com/eula.php
  11. *
  12. */
  13. define('IN_SCRIPT', 1);
  14. define('HESK_PATH', '../');
  15. define('PAGE_TITLE', 'ADMIN_SETTINGS');
  16. define('MFH_PAGE_LAYOUT', 'TOP_AND_SIDE');
  17. define('LOAD_TABS', 1);
  18. // Make sure the install folder is deleted
  19. if (is_dir(HESK_PATH . 'install')) {
  20. die('Please delete the <b>install</b> folder from your server for security reasons then refresh this page!');
  21. }
  22. // Get all the required files and functions
  23. require(HESK_PATH . 'hesk_settings.inc.php');
  24. // Save the default language for the settings page before choosing user's preferred one
  25. $hesk_settings['language_default'] = $hesk_settings['language'];
  26. require(HESK_PATH . 'inc/common.inc.php');
  27. $hesk_settings['language'] = $hesk_settings['language_default'];
  28. require(HESK_PATH . 'inc/admin_functions.inc.php');
  29. require(HESK_PATH . 'inc/setup_functions.inc.php');
  30. require(HESK_PATH . 'inc/mail_functions.inc.php');
  31. hesk_load_database_functions();
  32. hesk_session_start();
  33. hesk_dbConnect();
  34. hesk_isLoggedIn();
  35. // Check permissions for this feature
  36. hesk_checkPermission('can_man_settings');
  37. // Load custom fields
  38. require_once(HESK_PATH . 'inc/custom_fields.inc.php');
  39. // Test languages function
  40. if (isset($_GET['test_languages'])) {
  41. hesk_testLanguage(0);
  42. }
  43. $help_folder = '../language/' . $hesk_settings['languages'][$hesk_settings['language']]['folder'] . '/help_files/';
  44. $enable_save_settings = 0;
  45. $enable_use_attachments = 0;
  46. // Print header
  47. require_once(HESK_PATH . 'inc/headerAdmin.inc.php');
  48. // Print main manage users page
  49. require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
  50. // Get the current version of Mods for Hesk
  51. $modsForHeskVersionRS = hesk_dbQuery("SELECT `Value` FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "settings` WHERE `Key` = 'modsForHeskVersion'");
  52. $modsForHeskVersionArray = hesk_dbFetchAssoc($modsForHeskVersionRS);
  53. $modsForHeskVersion = $modsForHeskVersionArray['Value'];
  54. // Demo mode? Hide values of sensitive settings
  55. if (defined('HESK_DEMO')) {
  56. $hesk_settings['smtp_host_name'] = $hesklang['hdemo'];
  57. $hesk_settings['smtp_user'] = $hesklang['hdemo'];
  58. $hesk_settings['smtp_password'] = $hesklang['hdemo'];
  59. $hesk_settings['pop3_host_name'] = $hesklang['hdemo'];
  60. $hesk_settings['pop3_user'] = $hesklang['hdemo'];
  61. $hesk_settings['pop3_password'] = $hesklang['hdemo'];
  62. $hesk_settings['recaptcha_public_key'] = $hesklang['hdemo'];
  63. $hesk_settings['recaptcha_private_key'] = $hesklang['hdemo'];
  64. $hesk_settings['imap_host_name'] = $hesklang['hdemo'];
  65. $hesk_settings['imap_user'] = $hesklang['hdemo'];
  66. $hesk_settings['imap_password'] = $hesklang['hdemo'];
  67. }
  68. $hesklang['err_custname'] = addslashes($hesklang['err_custname']);
  69. $modsForHesk_settings = mfh_getSettings();
  70. ?>
  71. <script language="javascript" type="text/javascript"><!--
  72. function hesk_checkFields() {
  73. d = document.form1;
  74. // GENERAL
  75. if (d.s_site_title.value == '') {
  76. alert('<?php echo addslashes($hesklang['err_sname']); ?>');
  77. return false;
  78. }
  79. if (d.s_site_url.value == '') {
  80. alert('<?php echo addslashes($hesklang['err_surl']); ?>');
  81. return false;
  82. }
  83. if (d.s_webmaster_mail.value == '' || d.s_webmaster_mail.value.indexOf(".") == -1 || d.s_webmaster_mail.value.indexOf("@") == -1) {
  84. alert('<?php echo addslashes($hesklang['err_wmmail']); ?>');
  85. return false;
  86. }
  87. if (d.s_noreply_mail.value == '' || d.s_noreply_mail.value.indexOf(".") == -1 || d.s_noreply_mail.value.indexOf("@") == -1) {
  88. alert('<?php echo addslashes($hesklang['err_nomail']); ?>');
  89. return false;
  90. }
  91. if (d.s_db_host.value == '') {
  92. alert('<?php echo addslashes($hesklang['err_dbhost']); ?>');
  93. return false;
  94. }
  95. if (d.s_db_name.value == '') {
  96. alert('<?php echo addslashes($hesklang['err_dbname']); ?>');
  97. return false;
  98. }
  99. if (d.s_db_user.value == '') {
  100. alert('<?php echo addslashes($hesklang['err_dbuser']); ?>');
  101. return false;
  102. }
  103. if (d.s_db_pass.value == '') {
  104. if (!confirm('<?php echo addslashes($hesklang['mysql_root']); ?>')) {
  105. return false;
  106. }
  107. }
  108. // HELPDESK
  109. if (d.s_hesk_title.value == '') {
  110. alert('<?php echo addslashes($hesklang['err_htitle']); ?>');
  111. return false;
  112. }
  113. if (d.s_hesk_url.value == '') {
  114. alert('<?php echo addslashes($hesklang['err_hurl']); ?>');
  115. return false;
  116. }
  117. if (d.s_max_listings.value == '') {
  118. alert('<?php echo addslashes($hesklang['err_max']); ?>');
  119. return false;
  120. }
  121. if (d.s_print_font_size.value == '') {
  122. alert('<?php echo addslashes($hesklang['err_psize']); ?>');
  123. return false;
  124. }
  125. // KNOWLEDGEBASE
  126. // MISC
  127. // DISABLE SUBMIT BUTTON
  128. d.submitbutton.disabled = true;
  129. d.submitbutton.value = '<?php echo addslashes($hesklang['saving']); ?>';
  130. return true;
  131. }
  132. function hesk_toggleLayer(nr, setto) {
  133. if (document.all)
  134. document.all[nr].style.display = setto;
  135. else if (document.getElementById)
  136. document.getElementById(nr).style.display = setto;
  137. }
  138. function hesk_testLanguage() {
  139. window.open('admin_settings.php?test_languages=1', "Hesk_window", "height=400,width=500,menubar=0,location=0,toolbar=0,status=0,resizable=1,scrollbars=1");
  140. return false;
  141. }
  142. var tabberOptions = {
  143. 'cookie': "tabber",
  144. 'onLoad': function (argsObj) {
  145. var t = argsObj.tabber;
  146. var i;
  147. if (t.id) {
  148. t.cookie = t.id + t.cookie;
  149. }
  150. i = parseInt(getCookie(t.cookie));
  151. if (isNaN(i)) {
  152. return;
  153. }
  154. t.tabShow(i);
  155. },
  156. 'onClick': function (argsObj) {
  157. var c = argsObj.tabber.cookie;
  158. var i = argsObj.index;
  159. setCookie(c, i);
  160. }
  161. };
  162. function checkRequiredEmail(field) {
  163. if (document.getElementById('s_require_email_0').checked && document.getElementById('s_email_view_ticket').checked) {
  164. if (field == 's_require_email_0' && confirm('<?php echo addslashes($hesklang['re_confirm1']); ?>')) {
  165. document.getElementById('s_email_view_ticket').checked = false;
  166. return true;
  167. } else if (field == 's_email_view_ticket' && confirm('<?php echo addslashes($hesklang['re_confirm2']); ?>')) {
  168. document.getElementById('s_require_email_1').checked = true;
  169. return true;
  170. }
  171. return false;
  172. }
  173. return true;
  174. }
  175. //-->
  176. </script>
  177. <aside class="main-sidebar">
  178. <section class="sidebar" style="height: auto">
  179. <ul class="sidebar-menu">
  180. <li class="header text-uppercase"><?php echo $hesklang['settings']; ?></li>
  181. <li>
  182. <a href="#general"><?php echo $hesklang['tab_1']; ?></a>
  183. </li>
  184. <li>
  185. <a href="#helpdesk"><?php echo $hesklang['tab_2']; ?></a>
  186. </li>
  187. <li>
  188. <a href="#knowledgebase"><?php echo $hesklang['tab_3']; ?></a>
  189. </li>
  190. <li>
  191. <a href="#calendar">
  192. <?php echo $hesklang['calendar_title_case']; ?>
  193. <span class="label label-primary" data-toggle="tooltip"
  194. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>">
  195. <?php echo $hesklang['mods_for_hesk_acronym']; ?>
  196. </span>
  197. </a>
  198. </li>
  199. <li>
  200. <a href="#email"><?php echo $hesklang['tab_6']; ?></a>
  201. </li>
  202. <li>
  203. <a href="#ticket-list"><?php echo $hesklang['tab_7']; ?></a>
  204. </li>
  205. <li>
  206. <a href="#miscellaneous"><?php echo $hesklang['tab_5']; ?></a>
  207. </li>
  208. <li>
  209. <a href="#ui-colors">
  210. <?php echo $hesklang['uiColors']; ?>
  211. <span class="label label-primary" data-toggle="tooltip"
  212. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>">
  213. <?php echo $hesklang['mods_for_hesk_acronym']; ?>
  214. </span>
  215. </a>
  216. </li>
  217. </ul>
  218. </section>
  219. </aside>
  220. <div class="content-wrapper">
  221. <section class="content">
  222. <?php
  223. /* This will handle error, success and notice messages */
  224. hesk_handle_messages();
  225. // Check file attachment limits
  226. if ($hesk_settings['attachments']['use'] && !defined('HESK_DEMO')) {
  227. // Check number of attachments per post
  228. if (version_compare(phpversion(), '5.2.12', '>=') && @ini_get('max_file_uploads') && @ini_get('max_file_uploads') < $hesk_settings['attachments']['max_number']) {
  229. hesk_show_notice($hesklang['fatte1']);
  230. }
  231. // Check max attachment size
  232. $tmp = @ini_get('upload_max_filesize');
  233. if ($tmp) {
  234. $last = strtoupper(substr($tmp, -1));
  235. $number = substr($tmp, 0, -1);
  236. switch ($last) {
  237. case 'K':
  238. $tmp = $number * 1024;
  239. break;
  240. case 'M':
  241. $tmp = $number * 1048576;
  242. break;
  243. case 'G':
  244. $tmp = $number * 1073741824;
  245. break;
  246. default:
  247. $tmp = $number;
  248. }
  249. if ($tmp < $hesk_settings['attachments']['max_size']) {
  250. hesk_show_notice($hesklang['fatte2']);
  251. }
  252. }
  253. // Check max post size
  254. $tmp = @ini_get('post_max_size');
  255. if ($tmp) {
  256. $last = strtoupper(substr($tmp, -1));
  257. $number = substr($tmp, 0, -1);
  258. switch ($last) {
  259. case 'K':
  260. $tmp = $number * 1024;
  261. break;
  262. case 'M':
  263. $tmp = $number * 1048576;
  264. break;
  265. case 'G':
  266. $tmp = $number * 1073741824;
  267. break;
  268. default:
  269. $tmp = $number;
  270. }
  271. if ($tmp < ($hesk_settings['attachments']['max_size'] * $hesk_settings['attachments']['max_number'] + 524288)) {
  272. hesk_show_notice($hesklang['fatte3']);
  273. }
  274. }
  275. // If SMTP server is used, "From email" should match SMTP username
  276. if ($hesk_settings['smtp'] && strtolower($hesk_settings['smtp_user']) != strtolower($hesk_settings['noreply_mail']) && hesk_validateEmail($hesk_settings['smtp_user'], 'ERR', 0)) {
  277. hesk_show_notice(sprintf($hesklang['from_warning'], $hesklang['email_noreply'], $hesklang['tab_1'], $hesk_settings['smtp_user']));
  278. }
  279. // If POP3 fetching is active, no user should have the same email address
  280. if ($hesk_settings['pop3'] && hesk_validateEmail($hesk_settings['pop3_user'], 'ERR', 0)) {
  281. $res = hesk_dbQuery("SELECT `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `email` LIKE '".hesk_dbEscape($hesk_settings['pop3_user'])."'");
  282. if (hesk_dbNumRows($res) > 0) {
  283. hesk_show_notice(sprintf($hesklang['pop3_warning'], hesk_dbResult($res,0,0), $hesk_settings['pop3_user']) . "<br /><br />" . $hesklang['fetch_warning'], $hesklang['warn']);
  284. }
  285. }
  286. // If IMAP fetching is active, no user should have the same email address
  287. if ($hesk_settings['imap'] && hesk_validateEmail($hesk_settings['imap_user'], 'ERR', 0)) {
  288. $res = hesk_dbQuery("SELECT `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."users` WHERE `email` LIKE '".hesk_dbEscape($hesk_settings['imap_user'])."'");
  289. if (hesk_dbNumRows($res) > 0) {
  290. hesk_show_notice(sprintf($hesklang['imap_warning'], hesk_dbResult($res,0,0), $hesk_settings['imap_user']) . "<br /><br />" . $hesklang['fetch_warning'], $hesklang['warn']);
  291. }
  292. }
  293. }
  294. ?>
  295. <div class="box">
  296. <div class="box-header with-border">
  297. <h1 class="box-title">
  298. <?php echo $hesklang['installation_information']; ?>
  299. </h1>
  300. <div class="box-tools pull-right">
  301. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  302. <i class="fa fa-minus"></i>
  303. </button>
  304. </div>
  305. </div>
  306. <div class="box-body">
  307. <table class="table table-striped">
  308. <tr>
  309. <td class="text-right">
  310. <?php echo $hesklang['v']; ?>:
  311. </td>
  312. <td class="pad-right-10" id="hesk-version-status">
  313. <?php echo $hesk_settings['hesk_version']; ?>
  314. <?php if ($hesk_settings['check_updates']) : ?>
  315. -
  316. <i class="spinner fa fa-spin fa-spinner"></i>
  317. <span class="up-to-date green" style="display: none">
  318. <?php echo $hesklang['hud']; ?>
  319. </span>
  320. <span class="beta-version orange" style="display: none">
  321. <?php echo $hesklang['beta']; ?>
  322. <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>"
  323. target="_blank"><?php echo $hesklang['check4updates']; ?></a>
  324. </span>
  325. <span class="update-available orange" style="display: none">
  326. <?php echo $hesklang['hnw']; ?>
  327. <a href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>"
  328. target="_blank">
  329. <?php echo $hesklang['getup']; ?>
  330. </a>
  331. </span>
  332. <a class="response-error" href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>"
  333. target="_blank" style="display: none"><?php echo $hesklang['check4updates']; ?></a>
  334. <script>
  335. var heskUrl = $('p#hesk-path').text();
  336. var $versionStatus = $('#hesk-version-status');
  337. $.ajax({
  338. url: heskUrl + 'api/index.php/v1-public/hesk-version',
  339. method: 'GET',
  340. success: function(data) {
  341. if ('<?php echo $hesk_settings['hesk_version']; ?>' === data.version) {
  342. $versionStatus.addClass('success');
  343. $versionStatus.find('.up-to-date').show();
  344. } else if (<?php echo strpos($hesk_settings['hesk_version'], 'beta') ||
  345. strpos($hesk_settings['hesk_version'], 'dev') ||
  346. strpos($hesk_settings['hesk_version'], 'RC') ? 'true' : 'false'; ?>) {
  347. $versionStatus.addClass('warning');
  348. $versionStatus.find('.beta-version').show();
  349. } else {
  350. $versionStatus.addClass('warning');
  351. $versionStatus.find('.update-available').show();
  352. }
  353. },
  354. error: function() {
  355. $versionStatus.find('.response-error').show();
  356. },
  357. complete: function(data) {
  358. $versionStatus.find('.spinner').hide();
  359. }
  360. });
  361. </script>
  362. <?php else: ?>
  363. - <a
  364. href="https://www.hesk.com/update.php?v=<?php echo $hesk_settings['hesk_version']; ?>"
  365. target="_blank"><?php echo $hesklang['check4updates']; ?></a>
  366. <?php endif; ?>
  367. </td>
  368. </tr>
  369. <tr>
  370. <td class="text-right pad-up-5">
  371. <?php echo $hesklang['mods_for_hesk_version']; ?>:
  372. </td>
  373. <td class="pad-right-10 pad-up-5" id="mfh-version-status">
  374. <?php echo $modsForHeskVersion; ?>
  375. <?php if ($hesk_settings['check_updates']) : ?>
  376. -
  377. <i class="spinner fa fa-spin fa-spinner"></i>
  378. <span class="up-to-date green" style="display: none">
  379. <?php echo $hesklang['mfh_up_to_date']; ?>
  380. </span>
  381. <span class="beta-version orange" style="display: none">
  382. <?php echo $hesklang['beta']; ?>
  383. <a href="https://www.mods-for-hesk.com/versioncheck.php?version=<?php echo $modsForHeskVersion; ?>"
  384. target="_blank"><?php echo $hesklang['check4updates']; ?></a>
  385. </span>
  386. <span class="update-available" style="display: none">
  387. <a class="orange" href="https://www.mods-for-hesk.com/versioncheck.php?version=<?php echo $modsForHeskVersion; ?>"
  388. target="_blank">
  389. <?php echo $hesklang['hnw']; ?>
  390. </a>
  391. </span>
  392. <a class="response-error" href="https://www.mods-for-hesk.com/versioncheck.php?version=<?php echo $modsForHeskVersion; ?>"
  393. target="_blank" style="display: none"><?php echo $hesklang['check4updates']; ?></a>
  394. <?php else: ?>
  395. - <a
  396. href="https://www.mods-for-hesk.com/versioncheck.php?version=<?php echo $modsForHeskVersion; ?>"
  397. target="_blank"><?php echo $hesklang['check4updates']; ?></a>
  398. <?php endif; ?>
  399. <script>
  400. var heskUrl = $('p#hesk-path').text();
  401. var $mfhVersionStatus = $('#mfh-version-status');
  402. $.ajax({
  403. url: heskUrl + 'api/index.php/v1-public/mods-for-hesk-version',
  404. method: 'GET',
  405. success: function(data) {
  406. if ('<?php echo $modsForHeskVersion; ?>' === data.version) {
  407. $mfhVersionStatus.addClass('success');
  408. $mfhVersionStatus.find('.up-to-date').show();
  409. } else if (<?php echo strpos($modsForHeskVersion, 'beta') ||
  410. strpos($modsForHeskVersion, 'dev') ||
  411. strpos($modsForHeskVersion, 'RC') ? 'true' : 'false'; ?>) {
  412. $mfhVersionStatus.addClass('warning');
  413. $mfhVersionStatus.find('.beta-version').show();
  414. } else {
  415. $mfhVersionStatus.addClass('warning');
  416. $mfhVersionStatus.find('.update-available').show();
  417. }
  418. },
  419. error: function() {
  420. $mfhVersionStatus.find('.response-error').show();
  421. },
  422. complete: function(data) {
  423. $mfhVersionStatus.find('.spinner').hide();
  424. }
  425. });
  426. </script>
  427. </td>
  428. </tr>
  429. <tr>
  430. <td class="text-right">
  431. <?php echo $hesklang['phpv']; ?>:
  432. </td>
  433. <td class="pad-right-10">
  434. <?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : PHP_VERSION . ' ' . (function_exists('mysqli_connect') ? '(MySQLi)' : '(MySQL)'); ?>
  435. </td>
  436. </tr>
  437. <tr>
  438. <td class="text-right pad-up-5">
  439. <?php echo $hesklang['mysqlv']; ?>:
  440. </td>
  441. <td class="pad-right-10 pad-up-5">
  442. <?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : hesk_dbResult(hesk_dbQuery('SELECT VERSION() AS version')); ?>
  443. </td>
  444. </tr>
  445. <tr>
  446. <td class="text-right">
  447. /hesk_settings.inc.php
  448. </td>
  449. <?php
  450. $heskSettingsWritable = is_writable(HESK_PATH . 'hesk_settings.inc.php');
  451. $cellClass = $heskSettingsWritable ? 'success' : 'danger';
  452. ?>
  453. <td class="pad-right-10 <?php echo $cellClass; ?>">
  454. <?php
  455. if ($heskSettingsWritable) {
  456. $enable_save_settings = 1;
  457. echo '<font class="success">' . $hesklang['exists'] . '</font>, <font class="success">' . $hesklang['writable'] . '</font>';
  458. } else {
  459. echo '<font class="success">' . $hesklang['exists'] . '</font>, <font class="error">' . $hesklang['not_writable'] . '</font><br />' . $hesklang['e_settings'];
  460. }
  461. ?>
  462. </td>
  463. </tr>
  464. <tr>
  465. <td class="text-right">
  466. /<?php echo $hesk_settings['attach_dir']; ?>
  467. </td>
  468. <?php
  469. $attachmentsExist = is_dir(HESK_PATH . $hesk_settings['attach_dir']);
  470. $attachmentsWritable = is_writable(HESK_PATH . $hesk_settings['attach_dir']);
  471. $cellClass = $attachmentsExist && $attachmentsWritable ? 'success' : 'danger';
  472. ?>
  473. <td class="pad-right-10 <?php echo $cellClass; ?>">
  474. <?php
  475. if ($attachmentsExist) {
  476. echo '<font class="success">' . $hesklang['exists'] . '</font>, ';
  477. if (is_writable(HESK_PATH . $hesk_settings['attach_dir'])) {
  478. $enable_use_attachments = 1;
  479. echo '<font class="success">' . $hesklang['writable'] . '</font>';
  480. } else {
  481. echo '<font class="error">' . $hesklang['not_writable'] . '</font><br />' . $hesklang['e_attdir'];
  482. }
  483. } else {
  484. echo '<font class="error">' . $hesklang['no_exists'] . '</font>, <font class="error">' . $hesklang['not_writable'] . '</font><br />' . $hesklang['e_attdir'];
  485. }
  486. ?>
  487. </td>
  488. </tr>
  489. <tr>
  490. <td class="text-right">
  491. /<?php echo $hesk_settings['cache_dir']; ?>
  492. </td>
  493. <?php
  494. $attachmentsExist = is_dir(HESK_PATH . $hesk_settings['cache_dir']);
  495. $attachmentsWritable = is_writable(HESK_PATH . $hesk_settings['cache_dir']);
  496. $cellClass = $attachmentsExist && $attachmentsWritable ? 'success' : 'danger';
  497. ?>
  498. <td class="pad-right-10 <?php echo $cellClass; ?>">
  499. <?php
  500. if ($attachmentsExist) {
  501. echo '<span class="success">' . $hesklang['exists'] . '</span>, ';
  502. if ($attachmentsWritable) {
  503. $enable_use_attachments = 1;
  504. echo '<span class="success">' . $hesklang['writable'] . '</span>';
  505. } else {
  506. echo '<span class="error">' . $hesklang['not_writable'] . '</span><br>' . $hesklang['e_cdir'];
  507. }
  508. } else {
  509. echo '<span class="error">' . $hesklang['no_exists'] . '</span>, <span class="error">' . $hesklang['not_writable'] . '</span><br>' . $hesklang['e_cdir'];
  510. }
  511. ?>
  512. </td>
  513. </tr>
  514. </table>
  515. </div>
  516. </div>
  517. <h2>
  518. <?php echo $hesklang['settings']; ?>
  519. <a href="javascript:void(0)"
  520. onclick="javascript:alert('<?php echo hesk_makeJsString($hesklang['settings_intro']) . '\n\n' . hesk_makeJsString($hesklang['all_req']); ?>')"><i
  521. class="fa fa-question-circle settingsquestionmark"></i></a>
  522. </h2>
  523. <form method="post" enctype="multipart/form-data" action="admin_settings_save.php" name="form1" onsubmit="return hesk_checkFields()"
  524. class="form-horizontal" role="form">
  525. <!-- General Settings -->
  526. <a class="anchor" id="general">&nbsp;</a>
  527. <div class="box">
  528. <div class="box-header with-border">
  529. <h1 class="box-title">
  530. <?php echo $hesklang['tab_1']; ?>
  531. </h1>
  532. <div class="box-tools pull-right">
  533. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  534. <i class="fa fa-minus"></i>
  535. </button>
  536. </div>
  537. </div>
  538. <div class="box-body">
  539. <h4 class="bold"><?php echo $hesklang['gs']; ?></h4>
  540. <div class="form-group">
  541. <label for="s_site_title" class="col-sm-3 control-label"><?php echo $hesklang['wbst_title']; ?>
  542. <a href="Javascript:void(0)"
  543. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#1','400','500')"><i
  544. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  545. <div class="col-sm-9">
  546. <input type="text" class="form-control" name="s_site_title" size="40" maxlength="255"
  547. value="<?php echo $hesk_settings['site_title']; ?>"
  548. placeholder="<?php echo htmlspecialchars($hesklang['wbst_title']); ?>"/>
  549. </div>
  550. </div>
  551. <div class="form-group">
  552. <label for="s_site_url" class="col-sm-3 control-label"><?php echo $hesklang['wbst_url']; ?> <a
  553. href="Javascript:void(0)"
  554. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#2','400','500')"><i
  555. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  556. <div class="col-sm-9">
  557. <input type="text" class="form-control" name="s_site_url" size="40" maxlength="255"
  558. value="<?php echo $hesk_settings['site_url']; ?>"
  559. placeholder="<?php echo htmlspecialchars($hesklang['wbst_url']); ?>"/>
  560. </div>
  561. </div>
  562. <div class="form-group">
  563. <label for="navbar_title_url" class="col-sm-3 control-label">
  564. <span class="label label-primary"
  565. data-toggle="tooltip"
  566. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  567. <?php echo $hesklang['navbar_title_url']; ?>
  568. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  569. title="<?php echo $hesklang['navbar_title_url']; ?>"
  570. data-content="<?php echo $hesklang['navbar_title_url_help']; ?>"></i>
  571. </label>
  572. <div class="col-sm-9">
  573. <input type="text" class="form-control" name="navbar_title_url" size="40" maxlength="255"
  574. value="<?php echo $modsForHesk_settings['navbar_title_url']; ?>"
  575. placeholder="<?php echo htmlspecialchars($hesklang['navbar_title_url']); ?>"/>
  576. </div>
  577. </div>
  578. <div class="form-group">
  579. <label for="s_hesk_title" class="col-sm-3 control-label"><?php echo $hesklang['hesk_title']; ?>
  580. <a href="Javascript:void(0)"
  581. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#6','400','500')"><i
  582. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  583. <div class="col-sm-9">
  584. <input type="text" class="form-control"
  585. placeholder="<?php echo htmlspecialchars($hesklang['hesk_title']); ?>"
  586. name="s_hesk_title" size="40" maxlength="255"
  587. value="<?php echo $hesk_settings['hesk_title']; ?>"/>
  588. </div>
  589. </div>
  590. <div class="form-group">
  591. <label for="s_hesk_url" class="col-sm-3 control-label"><?php echo $hesklang['hesk_url']; ?> <a
  592. href="Javascript:void(0)"
  593. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#7','400','500')"><i
  594. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  595. <div class="col-sm-9">
  596. <input type="text" class="form-control"
  597. placeholder="<?php echo htmlspecialchars($hesklang['hesk_url']); ?>"
  598. name="s_hesk_url" size="40" maxlength="255"
  599. value="<?php echo $hesk_settings['hesk_url']; ?>"/>
  600. </div>
  601. </div>
  602. <div class="form-group">
  603. <label for="s_webmaster_email"
  604. class="col-sm-3 control-label"><?php echo $hesklang['email_wm']; ?> <a
  605. href="Javascript:void(0)"
  606. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#4','400','500')"><i
  607. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  608. <div class="col-sm-9">
  609. <input type="text" class="form-control" name="s_webmaster_mail" size="40" maxlength="255"
  610. value="<?php echo $hesk_settings['webmaster_mail']; ?>"
  611. placeholder="<?php echo htmlspecialchars($hesklang['email_wm']); ?>"/>
  612. </div>
  613. </div>
  614. <div class="form-group">
  615. <label for="s_noreply_mail"
  616. class="col-sm-3 control-label"><?php echo $hesklang['email_noreply']; ?> <a
  617. href="Javascript:void(0)"
  618. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#5','400','500')"><i
  619. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  620. <div class="col-sm-9">
  621. <input type="text" class="form-control" name="s_noreply_mail" size="40" maxlength="255"
  622. value="<?php echo $hesk_settings['noreply_mail']; ?>"
  623. placeholder="<?php echo htmlspecialchars($hesklang['email_noreply']); ?>"/>
  624. </div>
  625. </div>
  626. <div class="form-group">
  627. <label for="s_noreply_name"
  628. class="col-sm-3 control-label"><?php echo $hesklang['email_name']; ?> <a
  629. href="Javascript:void(0)"
  630. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#6','400','500')"><i
  631. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  632. <div class="col-sm-9">
  633. <input type="text" class="form-control" name="s_noreply_name" size="40" maxlength="255"
  634. value="<?php echo $hesk_settings['noreply_name']; ?>"
  635. placeholder="<?php echo htmlspecialchars($hesklang['email_name']); ?>"/>
  636. </div>
  637. </div>
  638. <h4 class="bold"><?php echo $hesklang['lgs']; ?></h4>
  639. <div class="footerWithBorder blankSpace"></div>
  640. <div class="form-group">
  641. <label for="s_language" class="col-sm-3 control-label"><?php echo $hesklang['hesk_lang']; ?> <a
  642. href="Javascript:void(0)"
  643. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#9','400','500')"><i
  644. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  645. <div class="col-sm-9">
  646. <select class="form-control" name="s_language">
  647. <?php echo hesk_testLanguage(1); ?>
  648. </select>
  649. &nbsp;
  650. <a href="Javascript:void(0)"
  651. onclick="Javascript:return hesk_testLanguage()"><?php echo $hesklang['s_inl']; ?></a>
  652. </div>
  653. </div>
  654. <div class="form-group">
  655. <label for="s_mlang" class="col-sm-3 control-label"><?php echo $hesklang['s_mlang']; ?> <a
  656. href="Javascript:void(0)"
  657. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#43','400','500')"><i
  658. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  659. <div class="col-sm-9">
  660. <?php
  661. $on = $hesk_settings['can_sel_lang'] ? 'checked="checked"' : '';
  662. $off = $hesk_settings['can_sel_lang'] ? '' : 'checked="checked"';
  663. echo '
  664. <div class="radio"><label><input type="radio" name="s_can_sel_lang" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>
  665. <div class="radio"><label><input type="radio" name="s_can_sel_lang" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  666. ?>
  667. </div>
  668. </div>
  669. <h4 class="bold"><?php echo $hesklang['db']; ?></h4>
  670. <div class="form-group">
  671. <label for="s_db_host" class="col-sm-3 control-label"><?php echo $hesklang['db_host']; ?> <a
  672. href="Javascript:void(0)"
  673. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#32','400','500')"><i
  674. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  675. <div class="col-sm-9">
  676. <input class="form-control"
  677. placeholder="<?php echo htmlspecialchars($hesklang['db_host']); ?>" type="text"
  678. name="s_db_host" id="m1" size="40" maxlength="255"
  679. value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_host']; ?>"
  680. autocomplete="off"/>
  681. </div>
  682. </div>
  683. <div class="form-group">
  684. <label for="s_db_name" class="col-sm-3 control-label"><?php echo $hesklang['db_name']; ?> <a
  685. href="Javascript:void(0)"
  686. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#33','400','500')"><i
  687. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  688. <div class="col-sm-9">
  689. <input type="text" class="form-control"
  690. placeholder="<?php echo htmlspecialchars($hesklang['db_name']); ?>" name="s_db_name"
  691. id="m2" size="40" maxlength="255"
  692. value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_name']; ?>"
  693. autocomplete="off"/>
  694. </div>
  695. </div>
  696. <div class="form-group">
  697. <label for="s_db_user" class="col-sm-3 control-label"><?php echo $hesklang['db_user']; ?> <a
  698. href="Javascript:void(0)"
  699. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#34','400','500')"><i
  700. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  701. <div class="col-sm-9">
  702. <input type="text" class="form-control"
  703. placeholder="<?php echo htmlspecialchars($hesklang['db_user']); ?>" name="s_db_user"
  704. id="m3" size="40" maxlength="255"
  705. value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_user']; ?>"
  706. autocomplete="off"/>
  707. </div>
  708. </div>
  709. <div class="form-group">
  710. <label for="s_db_pass" class="col-sm-3 control-label"><?php echo $hesklang['db_pass']; ?> <a
  711. href="Javascript:void(0)"
  712. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#35','400','500')"><i
  713. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  714. <div class="col-sm-9">
  715. <input type="password" class="form-control"
  716. placeholder="<?php echo htmlspecialchars($hesklang['db_pass']); ?>" name="s_db_pass"
  717. id="m4" size="40" maxlength="255"
  718. value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_pass']; ?>"
  719. autocomplete="off"/>
  720. </div>
  721. </div>
  722. <div class="form-group">
  723. <label for="s_db_pfix" class="col-sm-3 control-label"><?php echo $hesklang['prefix']; ?> <a
  724. href="Javascript:void(0)"
  725. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>general.html#36','400','500')"><i
  726. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  727. <div class="col-sm-9">
  728. <input type="text" class="form-control"
  729. placeholder="<?php echo htmlspecialchars($hesklang['prefix']); ?>" name="s_db_pfix"
  730. id="m5" size="40" maxlength="255"
  731. value="<?php echo defined('HESK_DEMO') ? $hesklang['hdemo'] : $hesk_settings['db_pfix']; ?>"
  732. autocomplete="off"/>
  733. </div>
  734. </div>
  735. <div class="form-group">
  736. <div class="col-sm-9 col-sm-offset-3">
  737. <input type="button" class="btn btn-default move-down-4" onclick="hesk_testMySQL()"
  738. value="<?php echo $hesklang['mysqltest']; ?>"/>
  739. <!-- START MYSQL TEST -->
  740. <div id="mysql_test" style="display: none">
  741. </div>
  742. <script language="Javascript" type="text/javascript">
  743. function hesk_testMySQL() {
  744. var element = document.getElementById('mysql_test');
  745. element.innerHTML = '<img src="<?php echo HESK_PATH; ?>img/loading.gif" width="24" height="24" alt="" border="0" style="vertical-align:text-bottom" /> <i><?php echo addslashes($hesklang['contest']); ?></i>';
  746. element.style.display = 'block';
  747. var s_db_host = document.getElementById('m1').value;
  748. var s_db_name = document.getElementById('m2').value;
  749. var s_db_user = document.getElementById('m3').value;
  750. var s_db_pass = document.getElementById('m4').value;
  751. var s_db_pfix = document.getElementById('m5').value;
  752. var params = "test=mysql" +
  753. "&s_db_host=" + encodeURIComponent(s_db_host) +
  754. "&s_db_name=" + encodeURIComponent(s_db_name) +
  755. "&s_db_user=" + encodeURIComponent(s_db_user) +
  756. "&s_db_pass=" + encodeURIComponent(s_db_pass) +
  757. "&s_db_pfix=" + encodeURIComponent(s_db_pfix);
  758. xmlHttp = GetXmlHttpObject();
  759. if (xmlHttp == null) {
  760. return;
  761. }
  762. xmlHttp.open('POST', 'test_connection.php', true);
  763. xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  764. xmlHttp.setRequestHeader("Content-length", params.length);
  765. xmlHttp.setRequestHeader("Connection", "close");
  766. xmlHttp.onreadystatechange = function () {
  767. if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
  768. element.innerHTML = xmlHttp.responseText;
  769. }
  770. }
  771. xmlHttp.send(params);
  772. }
  773. </script>
  774. <!-- END MYSQL TEST -->
  775. </div>
  776. </div>
  777. </div>
  778. </div>
  779. <!-- Helpdesk Settings -->
  780. <a class="anchor" id="helpdesk">&nbsp;</a>
  781. <div class="box">
  782. <div class="box-header with-border">
  783. <h1 class="box-title">
  784. <?php echo $hesklang['tab_2']; ?>
  785. </h1>
  786. <div class="box-tools pull-right">
  787. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  788. <i class="fa fa-minus"></i>
  789. </button>
  790. </div>
  791. </div>
  792. <div class="box-body">
  793. <h4 class="bold"><?php echo $hesklang['hd']; ?></h4>
  794. <div class="form-group">
  795. <label for="s_admin_dir" class="col-sm-3 control-label"><?php echo $hesklang['adf']; ?> <a
  796. href="Javascript:void(0)"
  797. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#61','400','500')"><i
  798. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  799. <div class="col-sm-9">
  800. <input type="text" class="form-control"
  801. placeholder="<?php echo htmlspecialchars($hesklang['adf']); ?>" name="s_admin_dir"
  802. size="40" maxlength="255" value="<?php echo $hesk_settings['admin_dir']; ?>"/>
  803. </div>
  804. </div>
  805. <div class="form-group">
  806. <label for="s_attach_dir"
  807. class="col-sm-3 control-label"><?php echo $hesklang['ticket_attach_dir']; ?> <a
  808. href="Javascript:void(0)"
  809. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#62','400','500')"><i
  810. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  811. <div class="col-sm-9">
  812. <input type="text" class="form-control"
  813. placeholder="<?php echo htmlspecialchars($hesklang['ticket_attach_dir']); ?>"
  814. name="s_attach_dir" size="40" maxlength="255"
  815. value="<?php echo $hesk_settings['attach_dir']; ?>"/>
  816. </div>
  817. </div>
  818. <div class="form-group">
  819. <label for="s_cache_dir"
  820. class="col-sm-3 control-label"><?php echo $hesklang['cf']; ?> <a
  821. href="Javascript:void(0)"
  822. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#77','400','500')"><i
  823. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  824. <div class="col-sm-9">
  825. <input type="text" class="form-control"
  826. placeholder="<?php echo htmlspecialchars($hesklang['ticket_attach_dir']); ?>"
  827. name="s_cache_dir" size="40" maxlength="255"
  828. value="<?php echo $hesk_settings['cache_dir']; ?>"/>
  829. </div>
  830. </div>
  831. <div class="form-group">
  832. <label for="s_max_listings"
  833. class="col-sm-3 control-label"><?php echo $hesklang['max_listings']; ?> <a
  834. href="Javascript:void(0)"
  835. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#10','400','500')"><i
  836. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  837. <div class="col-sm-3">
  838. <input type="text" class="form-control"
  839. placeholder="<?php echo htmlspecialchars($hesklang['max_listings']); ?>"
  840. name="s_max_listings" size="5" maxlength="30"
  841. value="<?php echo $hesk_settings['max_listings']; ?>"/>
  842. </div>
  843. </div>
  844. <div class="form-group">
  845. <label for="s_print_font_size"
  846. class="col-sm-3 control-label"><?php echo $hesklang['print_size']; ?> <a
  847. href="Javascript:void(0)"
  848. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#11','400','500')"><i
  849. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  850. <div class="col-sm-3">
  851. <input type="text" class="form-control"
  852. placeholder="<?php echo htmlspecialchars($hesklang['print_size']); ?>"
  853. name="s_print_font_size" size="5" maxlength="3"
  854. value="<?php echo $hesk_settings['print_font_size']; ?>"/>
  855. </div>
  856. </div>
  857. <div class="form-group">
  858. <label for="s_autoclose" class="col-sm-3 control-label"><?php echo $hesklang['aclose']; ?> <a
  859. href="Javascript:void(0)"
  860. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#15','400','500')"><i
  861. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  862. <div class="col-sm-3">
  863. <input type="text" class="form-control"
  864. placeholder="<?php echo htmlspecialchars($hesklang['aclose']); ?>" name="s_autoclose"
  865. size="5" maxlength="3"
  866. value="<?php echo $hesk_settings['autoclose']; ?>"/><?php echo $hesklang['aclose2']; ?>
  867. </div>
  868. </div>
  869. <div class="form-group">
  870. <label for="s_max_open" class="col-sm-3 control-label"><?php echo $hesklang['mop']; ?> <a
  871. href="Javascript:void(0)"
  872. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#58','400','500')"><i
  873. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  874. <div class="col-sm-3">
  875. <input type="text" class="form-control"
  876. placeholder="<?php echo htmlspecialchars($hesklang['mop']); ?>" name="s_max_open"
  877. size="5" maxlength="3" value="<?php echo $hesk_settings['max_open']; ?>"/>
  878. </div>
  879. </div>
  880. <div class="form-group">
  881. <label for="new_top" class="col-sm-3 control-label"><?php echo $hesklang['rord']; ?> <a
  882. href="Javascript:void(0)"
  883. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#59','400','500')"><i
  884. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  885. <div class="col-sm-9">
  886. <?php
  887. $on = $hesk_settings['new_top'] ? 'checked="checked"' : '';
  888. $off = $hesk_settings['new_top'] ? '' : 'checked="checked"';
  889. echo '
  890. <div class="radio"><label><input type="radio" name="s_new_top" value="1" ' . $on . ' /> ' . $hesklang['newtop'] . '</label></div>
  891. <div class="radio"><label><input type="radio" name="s_new_top" value="0" ' . $off . ' /> ' . $hesklang['newbot'] . '</label></div>';
  892. ?>
  893. </div>
  894. </div>
  895. <div class="form-group">
  896. <label for="s_reply_top" class="col-sm-3 control-label"><?php echo $hesklang['ford']; ?> <a
  897. href="Javascript:void(0)"
  898. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#60','400','500')"><i
  899. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  900. <div class="col-sm-9">
  901. <?php
  902. $on = $hesk_settings['reply_top'] ? 'checked="checked"' : '';
  903. $off = $hesk_settings['reply_top'] ? '' : 'checked="checked"';
  904. echo '
  905. <div class="radio"><label><input type="radio" name="s_reply_top" value="1" ' . $on . ' /> ' . $hesklang['formtop'] . '</label></div>
  906. <div class="radio"><label><input type="radio" name="s_reply_top" value="0" ' . $off . ' /> ' . $hesklang['formbot'] . '</label></div>';
  907. ?>
  908. </div>
  909. </div>
  910. <h4 class="bold"><?php echo $hesklang['features']; ?></h4>
  911. <div class="row">
  912. <div class="col-md-6">
  913. <div class="form-group">
  914. <label for="s_autologin" class="col-sm-6 control-label"><?php echo $hesklang['alo']; ?>
  915. <a href="Javascript:void(0)"
  916. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#44','400','500')"><i
  917. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  918. <div class="col-sm-6 form-inline">
  919. <?php
  920. $on = $hesk_settings['autologin'] ? 'checked="checked"' : '';
  921. $off = $hesk_settings['autologin'] ? '' : 'checked="checked"';
  922. echo '
  923. <div class="radio"><label><input type="radio" name="s_autologin" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</div>&nbsp;&nbsp;&nbsp;
  924. <div class="radio"><label><input type="radio" name="s_autologin" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</div>';
  925. ?>
  926. </div>
  927. </div>
  928. <div class="form-group">
  929. <label for="s_require_email" class="col-sm-6 control-label"><?php echo $hesklang['req_email']; ?>
  930. <a href="Javascript:void(0)"
  931. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#73','400','500')"><i
  932. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  933. <div class="col-sm-6 form-inline">
  934. <?php
  935. $on = $hesk_settings['require_email'] ? 'checked="checked"' : '';
  936. $off = $hesk_settings['require_email'] ? '' : 'checked="checked"';
  937. echo '
  938. <div class="radio"><label><input type="radio" id="s_require_email_0" name="s_require_email" value="0" onclick="return checkRequiredEmail(\'s_require_email_0\');" ' . $off . ' /> ' . $hesklang['off'] . '</div>&nbsp;&nbsp;&nbsp;
  939. <div class="radio"><label><input type="radio" id="s_require_email_1" name="s_require_email" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</div>';
  940. ?>
  941. </div>
  942. </div>
  943. <div class="form-group">
  944. <label for="s_require_owner" class="col-sm-6 control-label"><?php echo $hesklang['fass']; ?>
  945. <a href="Javascript:void(0)"
  946. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#70','400','500')"><i
  947. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  948. <div class="col-sm-6 form-inline">
  949. <?php
  950. $on = $hesk_settings['require_owner'] ? 'checked="checked"' : '';
  951. $off = $hesk_settings['require_owner'] ? '' : 'checked="checked"';
  952. echo '
  953. <div class="radio"><label><input type="radio" name="s_require_owner" value="0" ' . $off . '> ' . $hesklang['off'] . '</div>&nbsp;&nbsp;&nbsp;
  954. <div class="radio"><label><input type="radio" name="s_require_owner" value="1" ' . $on . '> ' . $hesklang['on'] . '</div>';
  955. ?>
  956. </div>
  957. </div>
  958. <div class="form-group">
  959. <label for="s_require_message"
  960. class="col-sm-6 control-label"><?php echo $hesklang['req_msg']; ?> <a
  961. href="Javascript:void(0)"
  962. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#74','400','500')"><i
  963. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  964. <div class="col-sm-6 form-inline">
  965. <?php
  966. $on = $hesk_settings['require_message'] == 1 ? 'checked="checked"' : '';
  967. $off = $hesk_settings['require_message'] == 0 ? 'checked="checked"' : '';
  968. $hide = $hesk_settings['require_message'] == -1 ? 'checked="checked"' : '';
  969. echo '
  970. <div class="radio"><label><input type="radio" name="s_require_message" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  971. <div class="radio"><label><input type="radio" name="s_require_message" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>&nbsp;&nbsp;&nbsp;
  972. <div class="radio"><label><input type="radio" name="s_require_message" value="-1" ' . $hide . ' /> ' . $hesklang['off-hide'] . '</label></div>';
  973. ?>
  974. </div>
  975. </div>
  976. <div class="form-group">
  977. <label for="s_custclose" class="col-sm-6 control-label"><?php echo $hesklang['ccct']; ?>
  978. <a href="Javascript:void(0)"
  979. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#67','400','500')"><i
  980. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  981. <div class="col-sm-6 form-inline">
  982. <?php
  983. $on = $hesk_settings['custclose'] ? 'checked="checked"' : '';
  984. $off = $hesk_settings['custclose'] ? '' : 'checked="checked"';
  985. echo '
  986. <div class="radio"><label><input type="radio" name="s_custclose" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  987. <div class="radio"><label><input type="radio" name="s_custclose" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  988. ?>
  989. </div>
  990. </div>
  991. <div class="form-group">
  992. <label for="s_custopen"
  993. class="col-sm-6 control-label"><?php echo $hesklang['s_ucrt']; ?> <a
  994. href="Javascript:void(0)"
  995. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#16','400','500')"><i
  996. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  997. <div class="col-sm-6 form-inline">
  998. <?php
  999. $on = $hesk_settings['custopen'] ? 'checked="checked"' : '';
  1000. $off = $hesk_settings['custopen'] ? '' : 'checked="checked"';
  1001. echo '
  1002. <div class="radio"><label><input type="radio" name="s_custopen" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1003. <div class="radio"><label><input type="radio" name="s_custopen" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1004. ?>
  1005. </div>
  1006. </div>
  1007. <div class="form-group">
  1008. <label for="s_cust_urgency"
  1009. class="col-sm-6 control-label"><?php echo $hesklang['cpri']; ?> <a
  1010. href="Javascript:void(0)"
  1011. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#45','400','500')"><i
  1012. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1013. <div class="col-sm-6 form-inline">
  1014. <?php
  1015. $on = $hesk_settings['cust_urgency'] ? 'checked="checked"' : '';
  1016. $off = $hesk_settings['cust_urgency'] ? '' : 'checked="checked"';
  1017. echo '
  1018. <div class="radio"><label><input type="radio" name="s_cust_urgency" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1019. <div class="radio"><label><input type="radio" name="s_cust_urgency" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1020. ?>
  1021. </div>
  1022. </div>
  1023. <div class="form-group">
  1024. <label for="s_time_worked" class="col-sm-6 control-label"><?php echo $hesklang['ts']; ?>
  1025. <a href="Javascript:void(0)"
  1026. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#66','400','500')"><i
  1027. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1028. <div class="col-sm-6 form-inline">
  1029. <?php
  1030. $on = $hesk_settings['time_worked'] ? 'checked="checked"' : '';
  1031. $off = $hesk_settings['time_worked'] ? '' : 'checked="checked"';
  1032. echo '
  1033. <div class="radio"><label><input type="radio" name="s_time_worked" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1034. <div class="radio"><label><input type="radio" name="s_time_worked" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1035. ?>
  1036. </div>
  1037. </div>
  1038. <div class="form-group">
  1039. <label for="s_spam_notice"
  1040. class="col-sm-6 control-label"><?php echo $hesklang['spamn']; ?> <a
  1041. href="Javascript:void(0)"
  1042. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#68','400','500')"><i
  1043. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1044. <div class="col-sm-6 form-inline">
  1045. <?php
  1046. $on = $hesk_settings['spam_notice'] ? 'checked="checked"' : '';
  1047. $off = $hesk_settings['spam_notice'] ? '' : 'checked="checked"';
  1048. echo '
  1049. <div class="radio"><label><input type="radio" name="s_spam_notice" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1050. <div class="radio"><label><input type="radio" name="s_spam_notice" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1051. ?>
  1052. </div>
  1053. </div>
  1054. <div class="form-group">
  1055. <label for="s_list_users" class="col-sm-6 control-label"><?php echo $hesklang['lu']; ?>
  1056. <a href="Javascript:void(0)"
  1057. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#14','400','500')"><i
  1058. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1059. <div class="col-sm-6 form-inline">
  1060. <?php
  1061. $on = $hesk_settings['list_users'] ? 'checked="checked"' : '';
  1062. $off = $hesk_settings['list_users'] ? '' : 'checked="checked"';
  1063. echo '
  1064. <div class="radio"><label><input type="radio" name="s_list_users" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1065. <div class="radio"><label><input type="radio" name="s_list_users" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1066. ?>
  1067. </div>
  1068. </div>
  1069. <div class="form-group">
  1070. <label for="category_order_column" class="col-sm-6 control-label">
  1071. <span class="label label-primary"
  1072. data-toggle="tooltip"
  1073. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1074. <?php echo $hesklang['category_sort']; ?>
  1075. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1076. title="<?php echo $hesklang['category_sort']; ?>"
  1077. data-content="<?php echo $hesklang['category_sort_help']; ?>"></i>
  1078. </label>
  1079. <div class="col-sm-6">
  1080. <?php
  1081. $on = $modsForHesk_settings['category_order_column'] == 'name' ? 'checked' : '';
  1082. $off = $modsForHesk_settings['category_order_column'] == 'name' ? '' : 'checked';
  1083. echo '
  1084. <div class="radio"><label><input type="radio" name="category_order_column" value="0" ' . $off . '>' . $hesklang['sort_by_user_defined_order'] . '</label></div>
  1085. <div class="radio"><label><input type="radio" name="category_order_column" value="1" ' . $on . '>' . $hesklang['sort_alphabetically'] . '</label></div>
  1086. ';
  1087. ?>
  1088. </div>
  1089. </div>
  1090. <div class="form-group">
  1091. <label for="rich_text_for_tickets" class="col-sm-6 control-label">
  1092. <span class="label label-primary"
  1093. data-toggle="tooltip"
  1094. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1095. <?php echo $hesklang['allow_rich_text_for_tickets']; ?>
  1096. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1097. title="<?php echo $hesklang['allow_rich_text_for_tickets']; ?>"
  1098. data-content="<?php echo $hesklang['allow_rich_text_for_tickets_help']; ?>"></i>
  1099. </label>
  1100. <div class="col-sm-6 form-inline">
  1101. <?php
  1102. $both = $modsForHesk_settings['rich_text_for_tickets'] && $modsForHesk_settings['rich_text_for_tickets_for_customers'] ? 'checked' : '';
  1103. $staff = $modsForHesk_settings['rich_text_for_tickets'] && !$modsForHesk_settings['rich_text_for_tickets_for_customers'] ? 'checked' : '';
  1104. $no = $modsForHesk_settings['rich_text_for_tickets'] && $modsForHesk_settings['rich_text_for_tickets_for_customers'] ? '' : 'checked';
  1105. echo '
  1106. <div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="0" ' . $no . '> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1107. <div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="1" ' . $staff . '> ' . $hesklang['staff_only'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1108. <div class="radio"><label><input type="radio" name="rich_text_for_tickets" value="2" ' . $both . '> ' . $hesklang['on'] . '</label></div>
  1109. ';
  1110. ?>
  1111. </div>
  1112. </div>
  1113. <div class="form-group">
  1114. <label for="statuses_order_column" class="col-sm-6 control-label">
  1115. <span class="label label-primary"
  1116. data-toggle="tooltip"
  1117. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1118. <?php echo $hesklang['status_sort']; ?>
  1119. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1120. title="<?php echo $hesklang['status_sort']; ?>"
  1121. data-content="<?php echo $hesklang['status_sort_help']; ?>"></i>
  1122. </label>
  1123. <div class="col-sm-6">
  1124. <?php
  1125. $on = $modsForHesk_settings['statuses_order_column'] == 'name' ? 'checked' : '';
  1126. $off = $modsForHesk_settings['statuses_order_column'] == 'name' ? '' : 'checked';
  1127. echo '
  1128. <div class="radio"><label><input type="radio" name="statuses_order_column" value="0" ' . $off . '>' . $hesklang['sort_by_user_defined_order'] . '</label></div>
  1129. <div class="radio"><label><input type="radio" name="statuses_order_column" value="1" ' . $on . '>' . $hesklang['sort_alphabetically'] . '</label></div>
  1130. ';
  1131. ?>
  1132. </div>
  1133. </div>
  1134. <div class="form-group">
  1135. <label for="display_user_agent_information" class="col-sm-6 control-label">
  1136. <span class="label label-primary"
  1137. data-toggle="tooltip"
  1138. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1139. <?php echo $hesklang['display_user_agent_information']; ?>
  1140. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1141. title="<?php echo $hesklang['display_user_agent_information']; ?>"
  1142. data-content="<?php echo $hesklang['display_user_agent_information_help']; ?>"></i>
  1143. </label>
  1144. <div class="col-sm-6">
  1145. <?php
  1146. $on = $modsForHesk_settings['display_user_agent_information'] ? 'checked' : '';
  1147. $off = $modsForHesk_settings['display_user_agent_information'] ? '' : 'checked';
  1148. echo '
  1149. <div class="radio"><label><input type="radio" name="display_user_agent_information" value="0" ' . $off . '>' . $hesklang['no'] . '</label></div>
  1150. <div class="radio"><label><input type="radio" name="display_user_agent_information" value="1" ' . $on . '>' . $hesklang['yes'] . '</label></div>
  1151. ';
  1152. ?>
  1153. </div>
  1154. </div>
  1155. </div>
  1156. <!-- Second column -->
  1157. <div class="col-md-6">
  1158. <div class="form-group">
  1159. <label for="s_autoassign"
  1160. class="col-sm-6 control-label"><?php echo $hesklang['saass']; ?> <a
  1161. href="Javascript:void(0)"
  1162. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#51','400','500')"><i
  1163. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1164. <div class="col-sm-6 form-inline">
  1165. <?php
  1166. $on = $hesk_settings['autoassign'] ? 'checked="checked"' : '';
  1167. $off = $hesk_settings['autoassign'] ? '' : 'checked="checked"';
  1168. echo '
  1169. <div class="radio"><label><input type="radio" name="s_autoassign" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1170. <div class="radio"><label><input type="radio" name="s_autoassign" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1171. ?>
  1172. </div>
  1173. </div>
  1174. <div class="form-group">
  1175. <label for="s_require_subject"
  1176. class="col-sm-6 control-label"><?php echo $hesklang['req_sub']; ?> <a
  1177. href="Javascript:void(0)"
  1178. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#72','400','500')"><i
  1179. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1180. <div class="col-sm-6 form-inline">
  1181. <?php
  1182. $on = $hesk_settings['require_subject'] == 1 ? 'checked="checked"' : '';
  1183. $off = $hesk_settings['require_subject'] == 0 ? 'checked="checked"' : '';
  1184. $hide = $hesk_settings['require_subject'] == -1 ? 'checked="checked"' : '';
  1185. echo '
  1186. <div class="radio"><label><input type="radio" name="s_require_subject" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1187. <div class="radio"><label><input type="radio" name="s_require_subject" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1188. <div class="radio"><label><input type="radio" name="s_require_subject" value="-1" ' . $hide . ' /> ' . $hesklang['off-hide'] . '</label></div>';
  1189. ?>
  1190. </div>
  1191. </div>
  1192. <div class="form-group">
  1193. <label for="s_rating" class="col-sm-6 control-label"><?php echo $hesklang['urate']; ?>
  1194. <a href="Javascript:void(0)"
  1195. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#17','400','500')"><i
  1196. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1197. <div class="col-sm-6 form-inline">
  1198. <?php
  1199. $on = $hesk_settings['rating'] ? 'checked="checked"' : '';
  1200. $off = $hesk_settings['rating'] ? '' : 'checked="checked"';
  1201. echo '
  1202. <div class="radio"><label><input type="radio" name="s_rating" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1203. <div class="radio"><label><input type="radio" name="s_rating" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1204. ?>
  1205. </div>
  1206. </div>
  1207. <div class="form-group">
  1208. <label for="s_sequential"
  1209. class="col-sm-6 control-label"><?php echo $hesklang['eseqid']; ?> <a
  1210. href="Javascript:void(0)"
  1211. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#49','400','500')"><i
  1212. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1213. <div class="col-sm-6 form-inline">
  1214. <?php
  1215. $on = $hesk_settings['sequential'] ? 'checked="checked"' : '';
  1216. $off = $hesk_settings['sequential'] ? '' : 'checked="checked"';
  1217. echo '
  1218. <div class="radio"><label><input type="radio" name="s_sequential" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1219. <div class="radio"><label><input type="radio" name="s_sequential" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1220. ?>
  1221. </div>
  1222. </div>
  1223. <div class="form-group">
  1224. <label for="s_debug_mode"
  1225. class="col-sm-6 control-label"><?php echo $hesklang['debug_mode']; ?> <a
  1226. href="Javascript:void(0)"
  1227. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#12','400','500')"><i
  1228. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1229. <div class="col-sm-6 form-inline">
  1230. <?php
  1231. $on = $hesk_settings['debug_mode'] ? 'checked="checked"' : '';
  1232. $off = $hesk_settings['debug_mode'] ? '' : 'checked="checked"';
  1233. echo '
  1234. <div class="radio"><label><input type="radio" name="s_debug_mode" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1235. <div class="radio"><label><input type="radio" name="s_debug_mode" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1236. ?>
  1237. </div>
  1238. </div>
  1239. <div class="form-group">
  1240. <label for="s_short_link" class="col-sm-6 control-label"><?php echo $hesklang['shu']; ?>
  1241. <a href="Javascript:void(0)"
  1242. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#63','400','500')"><i
  1243. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1244. <div class="col-sm-6 form-inline">
  1245. <?php
  1246. $on = $hesk_settings['short_link'] ? 'checked="checked"' : '';
  1247. $off = $hesk_settings['short_link'] ? '' : 'checked="checked"';
  1248. echo '
  1249. <div class="radio"><label><input type="radio" name="s_short_link" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1250. <div class="radio"><label><input type="radio" name="s_short_link" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1251. ?>
  1252. </div>
  1253. </div>
  1254. <div class="form-group">
  1255. <label for="request_location" class="col-sm-6 control-label">
  1256. <span class="label label-primary"
  1257. data-toggle="tooltip"
  1258. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1259. <?php echo $hesklang['request_user_location']; ?>
  1260. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1261. title="<?php echo $hesklang['request_user_location']; ?>"
  1262. data-content="<?php echo $hesklang['request_user_location_help']; ?>"></i>
  1263. </label>
  1264. <div class="col-sm-6 form-inline">
  1265. <?php
  1266. $on = $modsForHesk_settings['request_location'] ? 'checked' : '';
  1267. $off = $modsForHesk_settings['request_location'] ? '' : 'checked';
  1268. echo '
  1269. <div class="radio"><label><input type="radio" name="request_location" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1270. <div class="radio"><label><input type="radio" name="request_location" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  1271. ?>
  1272. </div>
  1273. </div>
  1274. <div class="form-group">
  1275. <label class="col-sm-6 control-label"><?php echo $hesklang['select']; ?> <a
  1276. href="Javascript:void(0)"
  1277. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#65','400','500')"><i
  1278. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1279. <div class="col-sm-6">
  1280. <div class="checkbox">
  1281. <label><input type="checkbox" name="s_select_cat"
  1282. value="1" <?php if ($hesk_settings['select_cat']) {
  1283. echo 'checked="checked"';
  1284. } ?>/> <?php echo $hesklang['category']; ?></label>
  1285. </div>
  1286. <div class="checkbox">
  1287. <label><input type="checkbox" name="s_select_pri"
  1288. value="1" <?php if ($hesk_settings['select_pri']) {
  1289. echo 'checked="checked"';
  1290. } ?>/> <?php echo $hesklang['priority']; ?></label>
  1291. </div>
  1292. </div>
  1293. </div>
  1294. <div class="form-group">
  1295. <label for="quick_help_sections[]" class="col-sm-6 control-label">
  1296. <span class="label label-primary"
  1297. data-toggle="tooltip"
  1298. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1299. <?php echo $hesklang['quick_help_sections']; ?>
  1300. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1301. title="<?php echo $hesklang['quick_help_sections']; ?>"
  1302. data-content="<?php echo htmlspecialchars($hesklang['quick_help_sections_help']); ?>"></i>
  1303. </label>
  1304. <div class="col-sm-6">
  1305. <?php
  1306. $quickHelpRs = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "quick_help_sections`");
  1307. while ($row = hesk_dbFetchAssoc($quickHelpRs)): ?>
  1308. <div class="checkbox">
  1309. <label>
  1310. <input type="checkbox" name="quick_help_sections[]"
  1311. value="<?php echo $row['id']; ?>" <?php if ($row['show']) {
  1312. echo 'checked';
  1313. } ?>>
  1314. <?php echo $hesklang[$row['location']]; ?>
  1315. </label>
  1316. </div>
  1317. <?php
  1318. endwhile;
  1319. ?>
  1320. </div>
  1321. </div>
  1322. <div class="form-group">
  1323. <label for="s_cat_show_select" class="col-sm-6 control-label"><?php echo $hesklang['scat']; ?> <a
  1324. href="Javascript:void(0)"
  1325. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#71','400','500')"><i
  1326. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1327. <div class="col-sm-6">
  1328. <input type="text" class="form-control"
  1329. placeholder="<?php echo htmlspecialchars($hesklang['scat']); ?>" name="s_cat_show_select"
  1330. size="5" maxlength="3" value="<?php echo $hesk_settings['cat_show_select']; ?>">
  1331. <?php echo $hesklang['scat2']; ?>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. </div>
  1336. <h4 class="bold"><?php echo $hesklang['sp']; ?></h4>
  1337. <div class="form-group">
  1338. <label for="s_secimg_use" class="col-sm-3 control-label"><?php echo $hesklang['use_secimg']; ?>
  1339. <a href="Javascript:void(0)"
  1340. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#13','400','500')"><i
  1341. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1342. <div class="col-sm-9 form-inline">
  1343. <?php
  1344. $onc = $hesk_settings['secimg_use'] == 1 ? 'checked="checked"' : '';
  1345. $ons = $hesk_settings['secimg_use'] == 2 ? 'checked="checked"' : '';
  1346. $off = $hesk_settings['secimg_use'] ? '' : 'checked="checked"';
  1347. $div = $hesk_settings['secimg_use'] ? 'block' : 'none';
  1348. echo '
  1349. <div class="radio"><label><input type="radio" name="s_secimg_use" value="0" ' . $off . ' onclick="javascript:hesk_toggleLayer(\'captcha\',\'none\')" /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1350. <div class="radio"><label><input type="radio" name="s_secimg_use" value="1" ' . $onc . ' onclick="javascript:hesk_toggleLayer(\'captcha\',\'block\')" /> ' . $hesklang['onc'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1351. <div class="radio"><label><input type="radio" name="s_secimg_use" value="2" ' . $ons . ' onclick="javascript:hesk_toggleLayer(\'captcha\',\'block\')" /> ' . $hesklang['ons'] . '</label></div>
  1352. ';
  1353. ?>
  1354. <div id="captcha" style="display: <?php echo $div; ?>;">
  1355. &nbsp;<br/>
  1356. <b><?php echo $hesklang['sit']; ?>:</b><br/>
  1357. <?php
  1358. $on = '';
  1359. $on2 = '';
  1360. $on3 = '';
  1361. $off = '';
  1362. $div = 'block';
  1363. if ($hesk_settings['recaptcha_use'] == 1) {
  1364. $on = 'checked="checked"';
  1365. } elseif ($hesk_settings['recaptcha_use'] == 2) {
  1366. $on2 = 'checked="checked"';
  1367. } elseif ($hesk_settings['recaptcha_use'] == 3) {
  1368. $on3 = 'checked="checked"';
  1369. $div = 'none';
  1370. } else {
  1371. $off = 'checked="checked"';
  1372. $div = 'none';
  1373. }
  1374. ?>
  1375. <div class="radio"><label><input type="radio" name="s_recaptcha_use" value="0"
  1376. onclick="javascript:hesk_toggleLayer('recaptcha','none')" <?php echo $off; ?> /> <?php echo $hesklang['sis']; ?>
  1377. </label></div>
  1378. <br/>
  1379. <div class="radio"><label><input type="radio" name="s_recaptcha_use" value="2"
  1380. onclick="javascript:hesk_toggleLayer('recaptcha','block')" <?php echo $on2; ?> /> <?php echo $hesklang['recaptcha']; ?>
  1381. </label> <a href="Javascript:void(0)"
  1382. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#64','400','500')"><i
  1383. class="fa fa-question-circle settingsquestionmark"></i></a></div>
  1384. <br/>
  1385. <div class="radio"><label><input type="radio" name="s_recaptcha_use" value="1"
  1386. onclick="javascript:hesk_toggleLayer('recaptcha','block')" <?php echo $on; ?> /> <?php echo $hesklang['sir3']; ?>
  1387. </label> <a href="Javascript:void(0)"
  1388. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#64','400','500')"><i
  1389. class="fa fa-question-circle settingsquestionmark"></i></a></div>
  1390. <br/>
  1391. <div class="radio"><label><input type="radio" name="s_recaptcha_use" value="3"
  1392. onclick="javascript:hesk_toggleLayer('recaptcha','none')" <?php echo $on3; ?> /> <?php echo $hesklang['sir3']; ?>
  1393. </label>
  1394. </div>
  1395. <br/>
  1396. <div id="recaptcha" style="display: <?php echo $div; ?>;">
  1397. &nbsp;<br/>
  1398. <label for="s_recaptcha_public_key"
  1399. class="control-label"><?php echo $hesklang['rcpb']; ?> <a
  1400. href="Javascript:void(0)"
  1401. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#64','400','500')"><i
  1402. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1403. <input type="text" class="form-control"
  1404. placeholder="<?php echo htmlspecialchars($hesklang['rcpb']); ?>"
  1405. name="s_recaptcha_public_key" size="50" maxlength="255"
  1406. value="<?php echo $hesk_settings['recaptcha_public_key']; ?>"/><br/>
  1407. &nbsp;<br/>
  1408. <label for="s_recaptcha_private_key"
  1409. class="control-label"><?php echo $hesklang['rcpv']; ?> <a
  1410. href="Javascript:void(0)"
  1411. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#64','400','500')"><i
  1412. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1413. <input type="text" class="form-control"
  1414. placeholder="<?php echo htmlspecialchars($hesklang['rcpv']); ?>"
  1415. name="s_recaptcha_private_key" size="50" maxlength="255"
  1416. value="<?php echo $hesk_settings['recaptcha_private_key']; ?>"/><br/>
  1417. &nbsp;<br/>
  1418. </div>
  1419. </div>
  1420. </div>
  1421. </div>
  1422. <div class="form-group">
  1423. <label for="s_question_use" class="col-sm-3 control-label"><?php echo $hesklang['use_q']; ?> <a
  1424. href="Javascript:void(0)"
  1425. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#42','400','500')"><i
  1426. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1427. <div class="col-sm-9 form-inline">
  1428. <?php
  1429. $on = '';
  1430. $off = '';
  1431. $div = 'block';
  1432. if ($hesk_settings['question_use']) {
  1433. $on = 'checked="checked"';
  1434. } else {
  1435. $off = 'checked="checked"';
  1436. $div = 'none';
  1437. }
  1438. echo '
  1439. <div class="radio"><label><input type="radio" name="s_question_use" value="0" ' . $off . ' onclick="javascript:hesk_toggleLayer(\'question\',\'none\')" /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1440. <div class="radio"><label><input type="radio" name="s_question_use" value="1" ' . $on . ' onclick="javascript:hesk_toggleLayer(\'question\',\'block\')" /> ' . $hesklang['on'] . '</label></div>';
  1441. ?>
  1442. <div id="question" style="display: <?php echo $div; ?>;">
  1443. &nbsp;<br/>
  1444. <a href="Javascript:void(0)"
  1445. onclick="Javascript:hesk_rate('generate_spam_question.php','question')"><?php echo $hesklang['genq']; ?></a><br/>
  1446. <label for="s_question_ask"
  1447. class="control-label"><?php echo $hesklang['q_q']; ?></label><br/>
  1448. <textarea name="s_question_ask" class="form-control" rows="3"
  1449. cols="40"><?php echo hesk_htmlentities($hesk_settings['question_ask']); ?></textarea><br/>
  1450. &nbsp;<br/>
  1451. <label for="s_question_ans"
  1452. class="control-label"><?php echo $hesklang['q_a']; ?></label><br/>
  1453. <input type="text" class="form-control" name="s_question_ans"
  1454. value="<?php echo $hesk_settings['question_ans']; ?>" size="10"/><br/>
  1455. &nbsp;<br/>
  1456. </div>
  1457. </div>
  1458. </div>
  1459. <h4 class="bold"><?php echo $hesklang['security']; ?></h4>
  1460. <div class="form-group">
  1461. <label for="s_attempt_limit" class="col-sm-4 control-label"><?php echo $hesklang['banlim']; ?>
  1462. <a href="Javascript:void(0)"
  1463. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#47','400','500')"><i
  1464. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1465. <div class="col-sm-3">
  1466. <input type="text" class="form-control"
  1467. placeholder="<?php echo htmlspecialchars($hesklang['banlim']); ?>"
  1468. name="s_attempt_limit" size="5" maxlength="30"
  1469. value="<?php echo($hesk_settings['attempt_limit'] ? ($hesk_settings['attempt_limit'] - 1) : 0); ?>"/>
  1470. </div>
  1471. </div>
  1472. <div class="form-group">
  1473. <label for="s_attempt_banmin" class="col-sm-4 control-label"><?php echo $hesklang['banmin']; ?>
  1474. <a href="Javascript:void(0)"
  1475. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#47','400','500')"><i
  1476. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1477. <div class="col-sm-3">
  1478. <input type="text" class="form-control"
  1479. placeholder="<?php echo htmlspecialchars($hesklang['banmin']); ?>"
  1480. name="s_attempt_banmin" size="5" maxlength="3"
  1481. value="<?php echo $hesk_settings['attempt_banmin']; ?>"/>
  1482. </div>
  1483. </div>
  1484. <div class="form-group">
  1485. <label for="s_reset_pass" class="col-sm-4 control-label"><?php echo $hesklang['passr']; ?> <a
  1486. href="Javascript:void(0)"
  1487. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#69','400','500')"><i
  1488. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1489. <div class="col-sm-8">
  1490. <div class="checkbox">
  1491. <label><input type="checkbox" name="s_reset_pass"
  1492. value="1" <?php if ($hesk_settings['reset_pass']) {
  1493. echo 'checked="checked"';
  1494. } ?>/> <?php echo $hesklang['passa']; ?></label>
  1495. </div>
  1496. </div>
  1497. </div>
  1498. <div class="form-group">
  1499. <label for="s_email_view_ticket"
  1500. class="col-sm-4 control-label"><?php echo $hesklang['viewvtic']; ?> <a
  1501. href="Javascript:void(0)"
  1502. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#46','400','500')"><i
  1503. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1504. <div class="col-sm-8">
  1505. <div class="checkbox">
  1506. <label><input type="checkbox" name="s_email_view_ticket"
  1507. id="s_email_view_ticket" onclick="return checkRequiredEmail('s_email_view_ticket');"
  1508. value="1" <?php if ($hesk_settings['email_view_ticket']) {
  1509. echo 'checked="checked"';
  1510. } ?>/> <?php echo $hesklang['reqetv']; ?></label>
  1511. </div>
  1512. </div>
  1513. </div>
  1514. <div class="form-group">
  1515. <label for="s_x_frame_opt"
  1516. class="col-sm-4 control-label"><?php echo $hesklang['frames']; ?> <a
  1517. href="Javascript:void(0)"
  1518. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#76','400','500')"><i
  1519. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1520. <div class="col-sm-8">
  1521. <div class="checkbox">
  1522. <label><input type="checkbox" name="s_x_frame_opt"
  1523. value="1" <?php if ($hesk_settings['x_frame_opt']) {
  1524. echo 'checked="checked"';} ?>> <?php echo $hesklang['frames2']; ?></label>
  1525. </div>
  1526. </div>
  1527. </div>
  1528. <div class="form-group">
  1529. <label for="s_force_ssl"
  1530. class="col-sm-4 control-label"><?php echo $hesklang['ssl']; ?> <a
  1531. href="Javascript:void(0)"
  1532. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#75','400','500')"><i
  1533. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1534. <div class="col-sm-8">
  1535. <div class="checkbox">
  1536. <?php if (HESK_SSL): ?>
  1537. <label><input type="checkbox" name="s_force_ssl"
  1538. value="1" <?php if ($hesk_settings['force_ssl']) {
  1539. echo 'checked="checked"';} ?>>
  1540. <?php echo $hesklang['frames2']; ?>
  1541. </label>
  1542. <?php else: echo $hesklang['d_ssl']; ?>
  1543. <?php endif ?>
  1544. </div>
  1545. </div>
  1546. </div>
  1547. <div class="form-group">
  1548. <label for="email-verification" class="col-sm-4 col-xs-12 control-label">
  1549. <span class="label label-primary"
  1550. data-toggle="tooltip"
  1551. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1552. <?php echo $hesklang['customer_email_verification']; ?>
  1553. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1554. title="<?php echo $hesklang['customer_email_verification']; ?>"
  1555. data-content="<?php echo $hesklang['customer_email_verification_help']; ?>"></i>
  1556. </label>
  1557. <div class="col-sm-8 col-xs-12">
  1558. <div class="checkbox">
  1559. <label>
  1560. <input id="email-verification" name="email-verification"
  1561. type="checkbox" <?php if ($modsForHesk_settings['customer_email_verification_required']) {
  1562. echo 'checked';
  1563. } ?>> <?php echo $hesklang['require_customer_validate_email']; ?>
  1564. </label>
  1565. </div>
  1566. </div>
  1567. </div>
  1568. <h4 class="bold"><?php echo $hesklang['attachments']; ?></h4>
  1569. <div class="form-group">
  1570. <label for="s_attach_use" class="col-sm-3 control-label"><?php echo $hesklang['attach_use'];
  1571. $onload_status = ''; ?> <a href="Javascript:void(0)"
  1572. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#37','400','500')"><i
  1573. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1574. <div class="col-sm-9 form-inline">
  1575. <?php
  1576. if ($enable_use_attachments) {
  1577. ?>
  1578. <div class="radio"><label><input type="radio" name="s_attach_use" value="0"
  1579. onclick="hesk_attach_disable(new Array('a1','a2','a3','a4'))" <?php if (!$hesk_settings['attachments']['use']) {
  1580. echo ' checked="checked" ';
  1581. $onload_status = ' disabled="disabled" ';
  1582. } ?> />
  1583. <?php echo $hesklang['no']; ?></label></div>&nbsp;&nbsp;&nbsp;
  1584. <div class="radio"><label><input type="radio" name="s_attach_use" value="1"
  1585. onclick="hesk_attach_enable(new Array('a1','a2','a3','a4'))" <?php if ($hesk_settings['attachments']['use']) {
  1586. echo ' checked="checked" ';
  1587. } ?> />
  1588. <?php echo $hesklang['yes'] . '</label>'; ?></div>
  1589. <?php
  1590. if (!defined('HESK_DEMO')) {
  1591. ?>
  1592. &nbsp; (<a href="javascript:void(0);"
  1593. onclick="hesk_toggleLayerDisplay('attachments_limits');"><?php echo $hesklang['vscl']; ?></a>)
  1594. <div id="attachments_limits" style="display:none">
  1595. upload_max_filesize: <?php echo @ini_get('upload_max_filesize'); ?><br/>
  1596. <?php
  1597. if (version_compare(phpversion(), '5.2.12', '>=')) {
  1598. echo 'max_file_uploads: ' . @ini_get('max_file_uploads') . '<br />';
  1599. }
  1600. ?>
  1601. post_max_size: <?php echo @ini_get('post_max_size'); ?><br/>
  1602. </div>
  1603. <?php
  1604. }
  1605. } else {
  1606. $onload_status = ' disabled="disabled" ';
  1607. echo '<input type="hidden" name="s_attach_use" value="0" /><font class="notice">' . $hesklang['e_attach'] . '</font>';
  1608. }
  1609. ?>
  1610. </div>
  1611. </div>
  1612. <div class="form-group">
  1613. <label for="s_max_num" class="col-sm-3 control-label"><?php echo $hesklang['attach_num']; ?> <a
  1614. href="Javascript:void(0)"
  1615. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#38','400','500')"><i
  1616. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1617. <div class="col-sm-3">
  1618. <input type="text" class="form-control"
  1619. placeholder="<?php echo htmlspecialchars($hesklang['attach_num']); ?>"
  1620. name="s_max_number" size="5" maxlength="2" id="a1"
  1621. value="<?php echo $hesk_settings['attachments']['max_number']; ?>" <?php echo $onload_status; ?> />
  1622. </div>
  1623. </div>
  1624. <div class="form-group">
  1625. <?php
  1626. $suffixes = array(
  1627. 'B' => $hesklang['B'] . ' (' . $hesklang['bytes'] . ')',
  1628. 'kB' => $hesklang['kB'] . ' (' . $hesklang['kilobytes'] . ')',
  1629. 'MB' => $hesklang['MB'] . ' (' . $hesklang['megabytes'] . ')',
  1630. 'GB' => $hesklang['GB'] . ' (' . $hesklang['gigabytes'] . ')',
  1631. );
  1632. $tmp = hesk_formatBytes($hesk_settings['attachments']['max_size'], 0);
  1633. list($size, $unit) = explode(' ', $tmp);
  1634. ?>
  1635. <label for="s_max_size" class="col-sm-3 control-label"><?php echo $hesklang['attach_size']; ?>
  1636. <a href="Javascript:void(0)"
  1637. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#39','400','500')"><i
  1638. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1639. <div class="col-sm-3">
  1640. <input type="text" class="form-control"
  1641. placeholder="<?php echo htmlspecialchars($hesklang['attach_size']); ?>"
  1642. name="s_max_size" size="5" maxlength="6" id="a2"
  1643. value="<?php echo $size; ?>" <?php echo $onload_status; ?> />
  1644. </div>
  1645. <div class="col-sm-6">
  1646. <select name="s_max_unit" class="form-control" id="a4" <?php echo $onload_status; ?> >
  1647. <?php
  1648. foreach ($suffixes as $k => $v) {
  1649. if ($k == $unit) {
  1650. echo '<option value="' . $k . '" selected="selected">' . $v . '</option>';
  1651. } else {
  1652. echo '<option value="' . $k . '">' . $v . '</option>';
  1653. }
  1654. }
  1655. ?>
  1656. </select>
  1657. </div>
  1658. </div>
  1659. <div class="form-group">
  1660. <label for="s_allowed_types"
  1661. class="col-sm-3 control-label"><?php echo $hesklang['attach_type']; ?> <a
  1662. href="Javascript:void(0)"
  1663. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>helpdesk.html#40','400','500')"><i
  1664. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1665. <div class="col-sm-9">
  1666. <input type="text" class="form-control"
  1667. placeholder="<?php echo htmlspecialchars($hesklang['attach_type']); ?>"
  1668. name="s_allowed_types" size="40" maxlength="255" id="a3"
  1669. value="<?php echo implode(',', $hesk_settings['attachments']['allowed_types']); ?>" <?php echo $onload_status; ?> />
  1670. </div>
  1671. </div>
  1672. </div>
  1673. </div>
  1674. <!-- Knowledgebase Settings -->
  1675. <a class="anchor" id="knowledgebase">&nbsp;</a>
  1676. <div class="box">
  1677. <div class="box-header with-border">
  1678. <h1 class="box-title">
  1679. <?php echo $hesklang['tab_3']; ?>
  1680. </h1>
  1681. <div class="box-tools pull-right">
  1682. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  1683. <i class="fa fa-minus"></i>
  1684. </button>
  1685. </div>
  1686. </div>
  1687. <div class="box-body">
  1688. <div class="form-group">
  1689. <label for="s_kb_enable" class="col-sm-4 control-label"><?php echo $hesklang['s_ekb']; ?> <a
  1690. href="Javascript:void(0)"
  1691. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#22','400','500')"><i
  1692. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1693. <div class="col-sm-8 form-inline">
  1694. <?php
  1695. $on = $hesk_settings['kb_enable'] == 1 ? 'checked="checked"' : '';
  1696. $off = $hesk_settings['kb_enable'] ? '' : 'checked="checked"';
  1697. $only = $hesk_settings['kb_enable'] == 2 ? 'checked="checked"' : '';
  1698. echo '
  1699. <div class="radio"><label><input type="radio" name="s_kb_enable" value="1" ' . $on . ' /> ' . $hesklang['ekb_y'] . '</label></div><br>
  1700. <div class="radio"><label><input type="radio" name="s_kb_enable" value="2" ' . $only . ' /> ' . $hesklang['ekb_o'] . '</label></div><br>
  1701. <div class="radio"><label><input type="radio" name="s_kb_enable" value="0" ' . $off . ' /> ' . $hesklang['ekb_n'] . '</label></div>';
  1702. ?>
  1703. </div>
  1704. </div>
  1705. <div class="form-group">
  1706. <label for="kb_attach_dir" class="col-sm-4 control-label">
  1707. <span class="label label-primary"
  1708. data-toggle="tooltip"
  1709. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1710. <?php echo $hesklang['kb_attach_dir']; ?>
  1711. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  1712. title="<?php echo $hesklang['kb_attach_dir']; ?>"
  1713. data-content="<?php echo $hesklang['kb_attach_dir_help']; ?>"></i>
  1714. </label>
  1715. <div class="col-sm-8">
  1716. <input type="text" class="form-control"
  1717. placeholder="<?php echo htmlspecialchars($hesklang['kb_attach_dir']); ?>"
  1718. name="kb_attach_dir" size="40" maxlength="255"
  1719. value="<?php echo $modsForHesk_settings['kb_attach_dir']; ?>">
  1720. </div>
  1721. </div>
  1722. <div class="form-group">
  1723. <label for="knowledgebase-visibility-setting" class="col-sm-4 col-xs-12 control-label">
  1724. <span class="label label-primary"
  1725. data-toggle="tooltip"
  1726. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  1727. <?php echo $hesklang['new_article_default_type']; ?>
  1728. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  1729. title="<?php echo $hesklang['new_article_default_type']; ?>"
  1730. data-content="<?php echo $hesklang['new_article_default_type_help']; ?>"></i>
  1731. </label>
  1732. <div class="col-sm-8 col-xs-12">
  1733. <div class="radio">
  1734. <label>
  1735. <input type="radio" name="new_kb_article_visibility"
  1736. value="0" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 0 ? 'checked' : ''; ?>>
  1737. <?php echo $hesklang['kb_published']; ?>
  1738. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  1739. title="<?php echo $hesklang['kb_published']; ?>"
  1740. data-content="<?php echo $hesklang['kb_published2']; ?>"></i>
  1741. </label>
  1742. </div>
  1743. <div class="radio">
  1744. <label>
  1745. <input type="radio" name="new_kb_article_visibility"
  1746. value="1" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 1 ? 'checked' : ''; ?>>
  1747. <?php echo $hesklang['kb_private']; ?>
  1748. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  1749. title="<?php echo $hesklang['kb_private']; ?>"
  1750. data-content="<?php echo $hesklang['kb_private2']; ?>"></i>
  1751. </label>
  1752. </div>
  1753. <div class="radio">
  1754. <label>
  1755. <input type="radio" name="new_kb_article_visibility"
  1756. value="2" <?php echo $modsForHesk_settings['new_kb_article_visibility'] == 2 ? 'checked' : ''; ?>>
  1757. <?php echo $hesklang['kb_draft']; ?>
  1758. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  1759. title="<?php echo $hesklang['kb_draft']; ?>"
  1760. data-content="<?php echo $hesklang['kb_draft3']; ?>"></i>
  1761. </label>
  1762. </div>
  1763. </div>
  1764. </div>
  1765. <div class="form-group">
  1766. <label for="s_kb_wysiwyg" class="col-sm-4 control-label"><?php echo $hesklang['swyse']; ?> <a
  1767. href="Javascript:void(0)"
  1768. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#52','400','500')"><i
  1769. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1770. <div class="col-sm-8 form-inline">
  1771. <?php
  1772. $on = $hesk_settings['kb_wysiwyg'] ? 'checked="checked"' : '';
  1773. $off = $hesk_settings['kb_wysiwyg'] ? '' : 'checked="checked"';
  1774. echo '
  1775. <div class="radio"><label><input type="radio" name="s_kb_wysiwyg" value="0" ' . $off . ' /> ' . $hesklang['no'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1776. <div class="radio"><label><input type="radio" name="s_kb_wysiwyg" value="1" ' . $on . ' /> ' . $hesklang['yes'] . '</label></div>';
  1777. ?>
  1778. </div>
  1779. </div>
  1780. <div class="form-group">
  1781. <label for="s_kb_recommend_answers"
  1782. class="col-sm-4 control-label"><?php echo $hesklang['s_suggest']; ?> <a
  1783. href="Javascript:void(0)"
  1784. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#23','400','500')"><i
  1785. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1786. <div class="col-sm-8 form-inline">
  1787. <?php
  1788. $on = $hesk_settings['kb_recommendanswers'] ? 'checked="checked"' : '';
  1789. $off = $hesk_settings['kb_recommendanswers'] ? '' : 'checked="checked"';
  1790. echo '
  1791. <div class="radio"><label><input type="radio" name="s_kb_recommendanswers" value="0" ' . $off . ' /> ' . $hesklang['no'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1792. <div class="radio"><label><input type="radio" name="s_kb_recommendanswers" value="1" ' . $on . ' /> ' . $hesklang['yes'] . '</label></div>';
  1793. ?>
  1794. </div>
  1795. </div>
  1796. <div class="form-group">
  1797. <label for="s_kb_rating" class="col-sm-4 control-label"><?php echo $hesklang['s_kbr']; ?> <a
  1798. href="Javascript:void(0)"
  1799. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#24','400','500')"><i
  1800. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1801. <div class="col-sm-8 form-inline">
  1802. <?php
  1803. $on = $hesk_settings['kb_rating'] ? 'checked="checked"' : '';
  1804. $off = $hesk_settings['kb_rating'] ? '' : 'checked="checked"';
  1805. echo '
  1806. <div class="radio"><label><input type="radio" name="s_kb_rating" value="0" ' . $off . ' /> ' . $hesklang['no'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1807. <div class="radio"><label><input type="radio" name="s_kb_rating" value="1" ' . $on . ' /> ' . $hesklang['yes'] . '</label></div>';
  1808. ?>
  1809. </div>
  1810. </div>
  1811. <div class="form-group">
  1812. <label for="s_kb_views" class="col-sm-4 control-label"><?php echo $hesklang['sav']; ?> <a
  1813. href="Javascript:void(0)"
  1814. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#58','400','500')"><i
  1815. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1816. <div class="col-sm-8 form-inline">
  1817. <?php
  1818. $on = $hesk_settings['kb_views'] ? 'checked="checked"' : '';
  1819. $off = $hesk_settings['kb_views'] ? '' : 'checked="checked"';
  1820. echo '
  1821. <div class="radio"><label><input type="radio" name="s_kb_views" value="0" ' . $off . ' /> ' . $hesklang['no'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1822. <div class="radio"><label><input type="radio" name="s_kb_views" value="1" ' . $on . ' /> ' . $hesklang['yes'] . '</label></div>';
  1823. ?>
  1824. </div>
  1825. </div>
  1826. <div class="form-group">
  1827. <label for="s_kb_date" class="col-sm-4 control-label"><?php echo $hesklang['sad']; ?> <a
  1828. href="Javascript:void(0)"
  1829. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#59','400','500')"><i
  1830. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1831. <div class="col-sm-8 form-inline">
  1832. <?php
  1833. $on = $hesk_settings['kb_date'] ? 'checked="checked"' : '';
  1834. $off = $hesk_settings['kb_date'] ? '' : 'checked="checked"';
  1835. echo '
  1836. <div class="radio"><label><input type="radio" name="s_kb_date" value="0" ' . $off . ' /> ' . $hesklang['no'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1837. <div class="radio"><label><input type="radio" name="s_kb_date" value="1" ' . $on . ' /> ' . $hesklang['yes'] . '</label></div>';
  1838. ?>
  1839. </div>
  1840. </div>
  1841. <div class="form-group">
  1842. <label for="s_kb_search" class="col-sm-4 control-label"><?php echo $hesklang['s_kbs']; ?> <a
  1843. href="Javascript:void(0)"
  1844. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#25','400','500')"><i
  1845. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1846. <div class="col-sm-8 form-inline">
  1847. <?php
  1848. $off = $hesk_settings['kb_search'] ? '' : 'checked="checked"';
  1849. $small = $hesk_settings['kb_search'] == 1 ? 'checked="checked"' : '';
  1850. $large = $hesk_settings['kb_search'] == 2 ? 'checked="checked"' : '';
  1851. echo '
  1852. <div class="radio"><label><input type="radio" name="s_kb_search" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1853. <div class="radio"><label><input type="radio" name="s_kb_search" value="1" ' . $small . ' /> ' . $hesklang['small'] . '</label></div>&nbsp;&nbsp;&nbsp;
  1854. <div class="radio"><label><input type="radio" name="s_kb_search" value="2" ' . $large . ' /> ' . $hesklang['large'] . '</label></div>
  1855. ';
  1856. ?>
  1857. </div>
  1858. </div>
  1859. <div class="form-group">
  1860. <label for="s_kb_search_limit"
  1861. class="col-sm-4 control-label"><?php echo $hesklang['s_maxsr']; ?> <a
  1862. href="Javascript:void(0)"
  1863. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#26','400','500')"><i
  1864. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1865. <div class="col-sm-3">
  1866. <input type="text" class="form-control"
  1867. placeholder="<?php echo htmlspecialchars($hesklang['s_maxsr']); ?>"
  1868. name="s_kb_search_limit" size="5" maxlength="3"
  1869. value="<?php echo $hesk_settings['kb_search_limit']; ?>"/>
  1870. </div>
  1871. </div>
  1872. <div class="form-group">
  1873. <label for="s_kb_substrart" class="col-sm-4 control-label"><?php echo $hesklang['s_ptxt']; ?> <a
  1874. href="Javascript:void(0)"
  1875. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#27','400','500')"><i
  1876. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1877. <div class="col-sm-3">
  1878. <input type="text" class="form-control"
  1879. placeholder="<?php echo htmlspecialchars($hesklang['s_ptxt']); ?>"
  1880. name="s_kb_substrart" size="5" maxlength="5"
  1881. value="<?php echo $hesk_settings['kb_substrart']; ?>"/>
  1882. </div>
  1883. </div>
  1884. <div class="form-group">
  1885. <label for="s_kb_cols" class="col-sm-4 control-label"><?php echo $hesklang['s_scol']; ?> <a
  1886. href="Javascript:void(0)"
  1887. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#28','400','500')"><i
  1888. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1889. <div class="col-sm-3">
  1890. <input type="text" class="form-control"
  1891. placeholder="<?php echo htmlspecialchars($hesklang['s_scol']); ?>" name="s_kb_cols"
  1892. size="5" maxlength="2" value="<?php echo $hesk_settings['kb_cols']; ?>"/>
  1893. </div>
  1894. </div>
  1895. <div class="form-group">
  1896. <label for="s_kb_numshow" class="col-sm-4 control-label"><?php echo $hesklang['s_psubart']; ?>
  1897. <a href="Javascript:void(0)"
  1898. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#29','400','500')"><i
  1899. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1900. <div class="col-sm-3">
  1901. <input type="text" class="form-control"
  1902. placeholder="<?php echo htmlspecialchars($hesklang['s_psubart']); ?>"
  1903. name="s_kb_numshow" size="5" maxlength="2"
  1904. value="<?php echo $hesk_settings['kb_numshow']; ?>"/>
  1905. </div>
  1906. </div>
  1907. <div class="form-group">
  1908. <label for="s_kb_index_popart" class="col-sm-4 control-label"><?php echo $hesklang['s_spop']; ?>
  1909. <a href="Javascript:void(0)"
  1910. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#30','400','500')"><i
  1911. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1912. <div class="col-sm-3">
  1913. <input type="text" class="form-control"
  1914. placeholder="<?php echo htmlspecialchars($hesklang['s_spop']); ?>"
  1915. name="s_kb_index_popart" size="5" maxlength="2"
  1916. value="<?php echo $hesk_settings['kb_index_popart']; ?>"/>
  1917. </div>
  1918. <div class="col-sm-5 pad-right-0">
  1919. <p class="form-control-static"><?php echo $hesklang['s_onin']; ?></p>
  1920. </div>
  1921. </div>
  1922. <div class="form-group">
  1923. <div class="col-sm-3 col-sm-offset-4">
  1924. <input type="text" class="form-control"
  1925. placeholder="<?php echo htmlspecialchars($hesklang['s_spop']); ?>" name="s_kb_popart"
  1926. size="5" maxlength="2" value="<?php echo $hesk_settings['kb_popart']; ?>"/>
  1927. </div>
  1928. <div class="col-sm-5 pad-right-0">
  1929. <p class="form-control-static"><?php echo $hesklang['s_onkb']; ?></p>
  1930. </div>
  1931. </div>
  1932. <div class="form-group">
  1933. <label for="s_kb_latest" class="col-sm-4 control-label"><?php echo $hesklang['s_slat']; ?> <a
  1934. href="Javascript:void(0)"
  1935. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#31','400','500')"><i
  1936. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1937. <div class="col-sm-3">
  1938. <input type="text" class="form-control"
  1939. placeholder="<?php echo htmlspecialchars($hesklang['s_slat']); ?>"
  1940. name="s_kb_index_latest" size="5" maxlength="2"
  1941. value="<?php echo $hesk_settings['kb_index_latest']; ?>"/>
  1942. </div>
  1943. <div class="col-sm-5 pad-right-0">
  1944. <p class="form-control-static"><?php echo $hesklang['s_onin']; ?></p>
  1945. </div>
  1946. </div>
  1947. <div class="form-group">
  1948. <div class="col-sm-3 col-sm-offset-4">
  1949. <input type="text" class="form-control"
  1950. placeholder="<?php echo htmlspecialchars($hesklang['s_slat']); ?>" name="s_kb_latest"
  1951. size="5" maxlength="2" value="<?php echo $hesk_settings['kb_latest']; ?>"/>
  1952. </div>
  1953. <div class="col-sm-5 pad-right-0">
  1954. <p class="form-control-static"><?php echo $hesklang['s_onkb']; ?></p>
  1955. </div>
  1956. </div>
  1957. <div class="form-group">
  1958. <label for="s_kb_related" class="col-sm-4 control-label"><?php echo $hesklang['s_relart']; ?> <a
  1959. href="Javascript:void(0)"
  1960. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>knowledgebase.html#60','400','500')"><i
  1961. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  1962. <div class="col-sm-3">
  1963. <input type="text" class="form-control"
  1964. placeholder="<?php echo htmlspecialchars($hesklang['s_relart']); ?>"
  1965. name="s_kb_related" size="5" maxlength="2"
  1966. value="<?php echo $hesk_settings['kb_related']; ?>"/>
  1967. </div>
  1968. <div class="col-sm-5 pad-right-0">
  1969. <p class="form-control-static"><?php echo $hesklang['s_onin']; ?></p>
  1970. </div>
  1971. </div>
  1972. </div>
  1973. </div>
  1974. <!-- Calendar Settings -->
  1975. <a class="anchor" id="calendar">&nbsp;</a>
  1976. <div class="box">
  1977. <div class="box-header with-border">
  1978. <h1 class="box-title">
  1979. <?php echo $hesklang['calendar_title_case']; ?>
  1980. <span class="label label-primary" data-toggle="tooltip"
  1981. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>">
  1982. <?php echo $hesklang['mods_for_hesk_acronym']; ?>
  1983. </span>
  1984. </h1>
  1985. <div class="box-tools pull-right">
  1986. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  1987. <i class="fa fa-minus"></i>
  1988. </button>
  1989. </div>
  1990. </div>
  1991. <div class="box-body">
  1992. <h4 class="bold"><?php echo $hesklang['calendar_settings']; ?></h4>
  1993. <div class="form-group">
  1994. <label for="enable_calendar" class="col-sm-4 col-xs-12 control-label">
  1995. <?php echo $hesklang['enable_calendar']; ?>
  1996. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  1997. title="<?php echo $hesklang['enable_calendar']; ?>"
  1998. data-content="<?php echo $hesklang['enable_calendar_help']; ?>"></i>
  1999. </label>
  2000. <div class="col-sm-8 form-inline">
  2001. <?php
  2002. $on = $modsForHesk_settings['enable_calendar'] == 1 ? 'checked="checked"' : '';
  2003. $off = $modsForHesk_settings['enable_calendar'] ? '' : 'checked="checked"';
  2004. $only = $modsForHesk_settings['enable_calendar'] == 2 ? 'checked="checked"' : '';
  2005. echo '
  2006. <div class="radio"><label><input type="radio" name="enable_calendar" value="1" ' . $on . ' /> ' . $hesklang['yes_enable_calendar'] . '</label></div><br>
  2007. <div class="radio"><label><input type="radio" name="enable_calendar" value="2" ' . $only . ' /> ' . $hesklang['yes_enable_calendar_staff_only'] . '</label></div><br>
  2008. <div class="radio"><label><input type="radio" name="enable_calendar" value="0" ' . $off . ' /> ' . $hesklang['no_disable_calendar'] . '</label></div>';
  2009. ?>
  2010. </div>
  2011. </div>
  2012. <div class="form-group">
  2013. <label for="first-day-of-week" class="col-sm-4 col-xs-12 control-label">
  2014. <?php echo $hesklang['first_day_of_week']; ?>
  2015. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  2016. title="<?php echo $hesklang['first_day_of_week']; ?>"
  2017. data-content="<?php echo $hesklang['first_day_of_week_help']; ?>"></i>
  2018. </label>
  2019. <div class="col-sm-8 col-xs-12">
  2020. <select name="first-day-of-week" class="form-control">
  2021. <option value="0" <?php if ($modsForHesk_settings['first_day_of_week'] == '0') { echo 'selected'; } ?>>
  2022. <?php echo $hesklang['d0']; ?>
  2023. </option>
  2024. <option value="1" <?php if ($modsForHesk_settings['first_day_of_week'] == '1') { echo 'selected'; } ?>>
  2025. <?php echo $hesklang['d1']; ?>
  2026. </option>
  2027. <option value="2" <?php if ($modsForHesk_settings['first_day_of_week'] == '2') { echo 'selected'; } ?>>
  2028. <?php echo $hesklang['d2']; ?>
  2029. </option>
  2030. <option value="3" <?php if ($modsForHesk_settings['first_day_of_week'] == '3') { echo 'selected'; } ?>>
  2031. <?php echo $hesklang['d3']; ?>
  2032. </option>
  2033. <option value="4" <?php if ($modsForHesk_settings['first_day_of_week'] == '4') { echo 'selected'; } ?>>
  2034. <?php echo $hesklang['d4']; ?>
  2035. </option>
  2036. <option value="5" <?php if ($modsForHesk_settings['first_day_of_week'] == '5') { echo 'selected'; } ?>>
  2037. <?php echo $hesklang['d5']; ?>
  2038. </option>
  2039. <option value="6" <?php if ($modsForHesk_settings['first_day_of_week'] == '6') { echo 'selected'; } ?>>
  2040. <?php echo $hesklang['d6']; ?>
  2041. </option>
  2042. </select>
  2043. </div>
  2044. </div>
  2045. <div class="form-group">
  2046. <label for="default-view" class="col-sm-4 col-xs-12 control-label">
  2047. <?php echo $hesklang['default_view']; ?>
  2048. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  2049. title="<?php echo $hesklang['default_view']; ?>"
  2050. data-content="<?php echo $hesklang['default_view_help']; ?>"></i>
  2051. </label>
  2052. <div class="col-sm-8 col-xs-12">
  2053. <select name="default-view" class="form-control">
  2054. <option value="month" <?php if ($modsForHesk_settings['default_calendar_view'] == 'month') { echo 'selected'; } ?>>
  2055. <?php echo $hesklang['month']; ?>
  2056. </option>
  2057. <option value="agendaWeek" <?php if ($modsForHesk_settings['default_calendar_view'] == 'week') { echo 'selected'; } ?>>
  2058. <?php echo $hesklang['week']; ?>
  2059. </option>
  2060. <option value="agendaDay" <?php if ($modsForHesk_settings['default_calendar_view'] == 'agenda') { echo 'selected'; } ?>>
  2061. <?php echo $hesklang['calendar_day']; ?>
  2062. </option>
  2063. </select>
  2064. </div>
  2065. </div>
  2066. <div class="form-group">
  2067. <label for="show-start-time" class="col-sm-4 col-xs-12 control-label">
  2068. <?php echo $hesklang['show_event_start_time']; ?>
  2069. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  2070. title="<?php echo $hesklang['show_event_start_time']; ?>"
  2071. data-content="<?php echo $hesklang['show_event_start_time_help']; ?>"></i>
  2072. </label>
  2073. <div class="col-sm-8 form-inline">
  2074. <?php
  2075. $on = $modsForHesk_settings['calendar_show_start_time'] == 'true' ? 'checked="checked"' : '';
  2076. $off = $modsForHesk_settings['calendar_show_start_time'] == 'false' ? 'checked="checked"' : '';
  2077. echo '
  2078. <div class="radio"><label><input type="radio" name="calendar-show-start-time" value="true" ' . $on . ' /> ' . $hesklang['yes'] . '</label></div><br>
  2079. <div class="radio"><label><input type="radio" name="calendar-show-start-time" value="false" ' . $off . ' /> ' . $hesklang['no'] . '</label></div><br>'; ?>
  2080. </div>
  2081. </div>
  2082. <h4 class="bold">
  2083. <?php echo $hesklang['business_hours']; ?>
  2084. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  2085. title="<?php echo $hesklang['business_hours']; ?>"
  2086. data-content="<?php echo $hesklang['business_hours_help']; ?>"></i>
  2087. </h4>
  2088. <?php
  2089. $rs = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mfh_calendar_business_hours`");
  2090. $business_hours = array();
  2091. while ($row = hesk_dbFetchAssoc($rs)) {
  2092. $business_hours[intval($row['day_of_week'])]['start'] = $row['start_time'];
  2093. $business_hours[intval($row['day_of_week'])]['end'] = $row['end_time'];
  2094. }
  2095. ?>
  2096. <div class="form-group">
  2097. <label for="business-hours-sunday" class="col-sm-4 col-xs-12 control-label">
  2098. <?php echo $hesklang['d0']; ?>
  2099. </label>
  2100. <div class="col-sm-8 col-xs-12 form-inline">
  2101. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-sunday[0]" value="<?php echo $business_hours[0]['start']; ?>">
  2102. <?php echo $hesklang['to']; ?>
  2103. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-sunday[1]" value="<?php echo $business_hours[0]['end']; ?>">
  2104. </div>
  2105. </div>
  2106. <div class="form-group">
  2107. <label for="business-hours-monday" class="col-sm-4 col-xs-12 control-label">
  2108. <?php echo $hesklang['d1']; ?>
  2109. </label>
  2110. <div class="col-sm-8 col-xs-12 form-inline">
  2111. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-monday[0]" value="<?php echo $business_hours[1]['start']; ?>">
  2112. <?php echo $hesklang['to']; ?>
  2113. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-monday[1]" value="<?php echo $business_hours[1]['end']; ?>">
  2114. </div>
  2115. </div>
  2116. <div class="form-group">
  2117. <label for="business-hours-tuesday" class="col-sm-4 col-xs-12 control-label">
  2118. <?php echo $hesklang['d2']; ?>
  2119. </label>
  2120. <div class="col-sm-8 col-xs-12 form-inline">
  2121. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-tuesday[0]" value="<?php echo $business_hours[2]['start']; ?>">
  2122. <?php echo $hesklang['to']; ?>
  2123. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-tuesday[1]" value="<?php echo $business_hours[2]['end']; ?>">
  2124. </div>
  2125. </div>
  2126. <div class="form-group">
  2127. <label for="business-hours-wednesday" class="col-sm-4 col-xs-12 control-label">
  2128. <?php echo $hesklang['d3']; ?>
  2129. </label>
  2130. <div class="col-sm-8 col-xs-12 form-inline">
  2131. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-wednesday[0]" value="<?php echo $business_hours[3]['start']; ?>">
  2132. <?php echo $hesklang['to']; ?>
  2133. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-wednesday[1]" value="<?php echo $business_hours[3]['end']; ?>">
  2134. </div>
  2135. </div>
  2136. <div class="form-group">
  2137. <label for="business-hours-thursday" class="col-sm-4 col-xs-12 control-label">
  2138. <?php echo $hesklang['d4']; ?>
  2139. </label>
  2140. <div class="col-sm-8 col-xs-12 form-inline">
  2141. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-thursday[0]" value="<?php echo $business_hours[4]['start']; ?>">
  2142. <?php echo $hesklang['to']; ?>
  2143. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-thursday[1]" value="<?php echo $business_hours[4]['end']; ?>">
  2144. </div>
  2145. </div>
  2146. <div class="form-group">
  2147. <label for="business-hours-friday" class="col-sm-4 col-xs-12 control-label">
  2148. <?php echo $hesklang['d5']; ?>
  2149. </label>
  2150. <div class="col-sm-8 col-xs-12 form-inline">
  2151. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-friday[0]" value="<?php echo $business_hours[5]['start']; ?>">
  2152. <?php echo $hesklang['to']; ?>
  2153. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-friday[1]" value="<?php echo $business_hours[5]['end']; ?>">
  2154. </div>
  2155. </div>
  2156. <div class="form-group">
  2157. <label for="business-hours-saturday" class="col-sm-4 col-xs-12 control-label">
  2158. <?php echo $hesklang['d6']; ?>
  2159. </label>
  2160. <div class="col-sm-8 col-xs-12 form-inline">
  2161. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-saturday[0]" value="<?php echo $business_hours[6]['start']; ?>">
  2162. <?php echo $hesklang['to']; ?>
  2163. <input type="text" class="form-control clockpicker" data-autoclose="true" name="business-hours-saturday[1]" value="<?php echo $business_hours[6]['end']; ?>">
  2164. </div>
  2165. </div>
  2166. </div>
  2167. </div>
  2168. <!-- Email Settings -->
  2169. <a class="anchor" id="email">&nbsp;</a>
  2170. <div class="box">
  2171. <div class="box-header with-border">
  2172. <h1 class="box-title">
  2173. <?php echo $hesklang['tab_6']; ?>
  2174. </h1>
  2175. <div class="box-tools pull-right">
  2176. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  2177. <i class="fa fa-minus"></i>
  2178. </button>
  2179. </div>
  2180. </div>
  2181. <div class="box-body">
  2182. <h4 class="bold"><?php echo $hesklang['emlsend']; ?></h4>
  2183. <div class="form-group">
  2184. <label for="s_smtp" class="col-sm-3 control-label"><?php echo $hesklang['emlsend2']; ?> <a
  2185. href="Javascript:void(0)"
  2186. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2187. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2188. <div class="col-sm-9">
  2189. <?php
  2190. $on = '';
  2191. $off = '';
  2192. $mailgunOn = '';
  2193. $onload_div = 'none';
  2194. $onload_mailgun = 'none';
  2195. $onload_status = '';
  2196. if ($hesk_settings['smtp']) {
  2197. $on = 'checked="checked"';
  2198. $onload_div = 'block';
  2199. } elseif ($modsForHesk_settings['use_mailgun']) {
  2200. $mailgunOn = 'checked="checked"';
  2201. $onload_mailgun = 'block';
  2202. } else {
  2203. $off = 'checked="checked"';
  2204. $onload_status = ' disabled="disabled" ';
  2205. }
  2206. echo '
  2207. <div class="radio">
  2208. <label>
  2209. <input type="radio" name="s_smtp" value="0"
  2210. onclick="hesk_attach_disable(new Array(\'s1\',\'s2\',\'s3\',\'s4\',\'s5\',\'s6\',\'s7\',\'s8\',\'s9\'));toggleContainers([],[\'smtp_settings\',\'mailgun_settings\']);" ' . $off . ' />
  2211. ' . $hesklang['phpmail'] . '
  2212. </label>
  2213. </div>
  2214. <div class="radio">
  2215. <label>
  2216. <input type="radio" name="s_smtp" value="1"
  2217. onclick="hesk_attach_enable(new Array(\'s1\',\'s2\',\'s3\',\'s4\',\'s5\',\'s6\',\'s7\',\'s8\',\'s9\'));toggleContainers([\'smtp_settings\'],[\'mailgun_settings\']);" ' . $on . ' />
  2218. ' . $hesklang['smtp'] . '
  2219. </label>
  2220. </div>
  2221. <div class="radio">
  2222. <label>
  2223. <input type="radio" name="s_smtp" value="2"
  2224. onclick="toggleContainers([\'mailgun_settings\'],[\'smtp_settings\']);" ' . $mailgunOn . '>
  2225. <span class="label label-primary"
  2226. data-toggle="tooltip"
  2227. title="' . $hesklang['added_in_mods_for_hesk'] . '">' . $hesklang['mods_for_hesk_acronym'] . '</span>
  2228. ' . $hesklang['mailgun'] . '
  2229. <i class="fa fa-question-circle settingsquestionmark"
  2230. data-toggle="popover" title="' . $hesklang['mailgun'] . '"
  2231. data-content="' . $hesklang['mailgun_help'] . '">
  2232. </i>
  2233. </label>
  2234. </div>';
  2235. ?>
  2236. <input type="hidden" name="tmp_smtp_host_name"
  2237. value="<?php echo $hesk_settings['smtp_host_name']; ?>"/>
  2238. <input type="hidden" name="tmp_smtp_host_port"
  2239. value="<?php echo $hesk_settings['smtp_host_port']; ?>"/>
  2240. <input type="hidden" name="tmp_smtp_timeout"
  2241. value="<?php echo $hesk_settings['smtp_timeout']; ?>"/>
  2242. <input type="hidden" name="tmp_smtp_user"
  2243. value="<?php echo $hesk_settings['smtp_user']; ?>"/>
  2244. <input type="hidden" name="tmp_smtp_password"
  2245. value="<?php echo $hesk_settings['smtp_password']; ?>"/>
  2246. <input type="hidden" name="tmp_smtp_ssl" value="<?php echo $hesk_settings['smtp_ssl']; ?>"/>
  2247. <input type="hidden" name="tmp_smtp_tls" value="<?php echo $hesk_settings['smtp_tls']; ?>"/>
  2248. </div>
  2249. </div>
  2250. <div id="mailgun_settings" style="display:<?php echo $onload_mailgun; ?>">
  2251. <div class="form-group">
  2252. <label for="mailgun_api_key" class="col-sm-3 control-label">
  2253. <span class="label label-primary"
  2254. data-toggle="tooltip"
  2255. title="<?php echo $hesklang['added_in_mods_for_hesk'] ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  2256. <?php echo $hesklang['mailgun_api_key']; ?>
  2257. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  2258. title="<?php echo $hesklang['mailgun_api_key']; ?>"
  2259. data-content="<?php echo $hesklang['mailgun_api_key_help']; ?>">
  2260. </i>
  2261. </label>
  2262. <div class="col-sm-9">
  2263. <input type="text" class="form-control"
  2264. placeholder="<?php echo htmlspecialchars($hesklang['mailgun_api_key']); ?>"
  2265. id="mailgun_api_key" name="mailgun_api_key"
  2266. value="<?php echo $modsForHesk_settings['mailgun_api_key']; ?>">
  2267. </div>
  2268. </div>
  2269. <div class="form-group">
  2270. <label for="mailgun_domain" class="col-sm-3 control-label">
  2271. <span class="label label-primary"
  2272. data-toggle="tooltip"
  2273. title="<?php echo $hesklang['added_in_mods_for_hesk'] ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  2274. <?php echo $hesklang['mailgun_domain']; ?>
  2275. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  2276. title="<?php echo $hesklang['mailgun_domain']; ?>"
  2277. data-content="<?php echo $hesklang['mailgun_domain_help']; ?>"></i>
  2278. </label>
  2279. <div class="col-sm-9">
  2280. <input type="text" class="form-control"
  2281. placeholder="<?php echo htmlspecialchars($hesklang['mailgun_domain']); ?>"
  2282. id="mailgun_domain" name="mailgun_domain"
  2283. value="<?php echo $modsForHesk_settings['mailgun_domain']; ?>">
  2284. </div>
  2285. </div>
  2286. </div>
  2287. <div id="smtp_settings" style="display:<?php echo $onload_div; ?>">
  2288. <div class="form-group">
  2289. <label for="s_smtp_host_name"
  2290. class="col-sm-3 control-label"><?php echo $hesklang['smtph']; ?> <a
  2291. href="Javascript:void(0)"
  2292. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2293. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2294. <div class="col-sm-9">
  2295. <input type="text" class="form-control"
  2296. placeholder="<?php echo htmlspecialchars($hesklang['smtph']); ?>" id="s1"
  2297. name="s_smtp_host_name" size="40" maxlength="255"
  2298. value="<?php echo $hesk_settings['smtp_host_name']; ?>" <?php echo $onload_status; ?> />
  2299. </div>
  2300. </div>
  2301. <div class="form-group">
  2302. <label for="s_smtp_host_port"
  2303. class="col-sm-3 control-label"><?php echo $hesklang['smtpp']; ?> <a
  2304. href="Javascript:void(0)"
  2305. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2306. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2307. <div class="col-sm-3">
  2308. <input type="text" class="form-control"
  2309. placeholder="<?php echo htmlspecialchars($hesklang['smtpp']); ?>" id="s2"
  2310. name="s_smtp_host_port" size="5" maxlength="255"
  2311. value="<?php echo $hesk_settings['smtp_host_port']; ?>" <?php echo $onload_status; ?> />
  2312. </div>
  2313. </div>
  2314. <div class="form-group">
  2315. <label for="s_smtp_timeout" class="col-sm-3 control-label"><?php echo $hesklang['smtpt']; ?>
  2316. <a href="Javascript:void(0)"
  2317. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2318. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2319. <div class="col-sm-3">
  2320. <input type="text" class="form-control"
  2321. placeholder="<?php echo htmlspecialchars($hesklang['smtpt']); ?>" id="s3"
  2322. name="s_smtp_timeout" size="5" maxlength="255"
  2323. value="<?php echo $hesk_settings['smtp_timeout']; ?>" <?php echo $onload_status; ?> />
  2324. </div>
  2325. </div>
  2326. <div class="form-group">
  2327. <label for="s_smtp_ssl" class="col-sm-3 control-label"><?php echo $hesklang['smtpssl']; ?>
  2328. <a href="Javascript:void(0)"
  2329. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2330. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2331. <div class="col-sm-9 form-inline">
  2332. <?php
  2333. $on = $hesk_settings['smtp_ssl'] ? 'checked="checked"' : '';
  2334. $off = $hesk_settings['smtp_ssl'] ? '' : 'checked="checked"';
  2335. echo '
  2336. <div class="radio"><label><input type="radio" name="s_smtp_ssl" value="0" id="s6" ' . $off . ' ' . $onload_status . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2337. <div class="radio"><label><input type="radio" name="s_smtp_ssl" value="1" id="s7" ' . $on . ' ' . $onload_status . ' /> ' . $hesklang['on'] . '</label></div>';
  2338. ?>
  2339. </div>
  2340. </div>
  2341. <div class="form-group">
  2342. <label for="s_smtp_tls" class="col-sm-3 control-label"><?php echo $hesklang['smtptls']; ?>
  2343. <a href="Javascript:void(0)"
  2344. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2345. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2346. <div class="col-sm-9 form-inline">
  2347. <?php
  2348. $on = $hesk_settings['smtp_tls'] ? 'checked="checked"' : '';
  2349. $off = $hesk_settings['smtp_tls'] ? '' : 'checked="checked"';
  2350. echo '
  2351. <div class="radio"><label><input type="radio" name="s_smtp_tls" value="0" id="s8" ' . $off . ' ' . $onload_status . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2352. <div class="radio"><label><input type="radio" name="s_smtp_tls" value="1" id="s9" ' . $on . ' ' . $onload_status . ' /> ' . $hesklang['on'] . '</label></div>';
  2353. ?>
  2354. </div>
  2355. </div>
  2356. <div class="form-group">
  2357. <label for="s_smtp_user" class="col-sm-3 control-label"><?php echo $hesklang['smtpu']; ?> <a
  2358. href="Javascript:void(0)"
  2359. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2360. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2361. <div class="col-sm-9">
  2362. <input type="text" class="form-control"
  2363. placeholder="<?php echo htmlspecialchars($hesklang['smtpu']); ?>" id="s4"
  2364. name="s_smtp_user" size="40" maxlength="255"
  2365. value="<?php echo $hesk_settings['smtp_user']; ?>" <?php echo $onload_status; ?>
  2366. autocomplete="off"/>
  2367. </div>
  2368. </div>
  2369. <div class="form-group">
  2370. <label for="s_smtp_password"
  2371. class="col-sm-3 control-label"><?php echo $hesklang['smtpw']; ?> <a
  2372. href="Javascript:void(0)"
  2373. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#55','400','500')"><i
  2374. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2375. <div class="col-sm-9">
  2376. <input type="password" class="form-control"
  2377. placeholder="<?php echo htmlspecialchars($hesklang['smtpw']); ?>" id="s5"
  2378. name="s_smtp_password" size="40" maxlength="255"
  2379. value="<?php echo $hesk_settings['smtp_password']; ?>" <?php echo $onload_status; ?>
  2380. autocomplete="off"/>
  2381. </div>
  2382. </div>
  2383. <div class="form-group">
  2384. <div class="col-sm-9 col-sm-offset-3">
  2385. <input type="button" class="btn btn-default" onclick="hesk_testSMTP()"
  2386. value="<?php echo $hesklang['smtptest']; ?>"/>
  2387. </div>
  2388. </div>
  2389. <!-- START SMTP TEST -->
  2390. <div id="smtp_test" style="display:none">
  2391. </div>
  2392. <script language="Javascript" type="text/javascript"><!--
  2393. function hesk_testSMTP() {
  2394. var element = document.getElementById('smtp_test');
  2395. element.innerHTML = '<img src="<?php echo HESK_PATH; ?>img/loading.gif" width="24" height="24" alt="" border="0" style="vertical-align:text-bottom" /> <i><?php echo addslashes($hesklang['contest']); ?></i>';
  2396. element.style.display = 'block';
  2397. var s_smtp_host_name = document.getElementById('s1').value;
  2398. var s_smtp_host_port = document.getElementById('s2').value;
  2399. var s_smtp_timeout = document.getElementById('s3').value;
  2400. var s_smtp_user = document.getElementById('s4').value;
  2401. var s_smtp_password = document.getElementById('s5').value;
  2402. var s_smtp_ssl = document.getElementById('s7').checked ? 1 : 0;
  2403. var s_smtp_tls = document.getElementById('s9').checked ? 1 : 0;
  2404. var params = "test=smtp" +
  2405. "&s_smtp_host_name=" + encodeURIComponent(s_smtp_host_name) +
  2406. "&s_smtp_host_port=" + encodeURIComponent(s_smtp_host_port) +
  2407. "&s_smtp_timeout=" + encodeURIComponent(s_smtp_timeout) +
  2408. "&s_smtp_user=" + encodeURIComponent(s_smtp_user) +
  2409. "&s_smtp_password=" + encodeURIComponent(s_smtp_password) +
  2410. "&s_smtp_ssl=" + encodeURIComponent(s_smtp_ssl) +
  2411. "&s_smtp_tls=" + encodeURIComponent(s_smtp_tls);
  2412. xmlHttp = GetXmlHttpObject();
  2413. if (xmlHttp == null) {
  2414. return;
  2415. }
  2416. xmlHttp.open('POST', 'test_connection.php', true);
  2417. xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  2418. xmlHttp.setRequestHeader("Content-length", params.length);
  2419. xmlHttp.setRequestHeader("Connection", "close");
  2420. xmlHttp.onreadystatechange = function () {
  2421. if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
  2422. element.innerHTML = xmlHttp.responseText;
  2423. }
  2424. }
  2425. xmlHttp.send(params);
  2426. }
  2427. //-->
  2428. </script>
  2429. <!-- END SMTP TEST -->
  2430. </div>
  2431. <!-- END SMTP SETTINGS DIV -->
  2432. <h4 class="bold"><?php echo $hesklang['emlpipe']; ?></h4>
  2433. <div class="form-group">
  2434. <label for="s_email_piping" class="col-sm-3 control-label"><?php echo $hesklang['emlpipe']; ?>
  2435. <a href="Javascript:void(0)"
  2436. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#54','400','500')"><i
  2437. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2438. <div class="col-sm-9 form-inline">
  2439. <?php
  2440. $on = $hesk_settings['email_piping'] ? 'checked="checked"' : '';
  2441. $off = $hesk_settings['email_piping'] ? '' : 'checked="checked"';
  2442. echo '
  2443. <div class="radio"><label><input type="radio" name="s_email_piping" value="0" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2444. <div class="radio"><label><input type="radio" name="s_email_piping" value="1" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  2445. ?>
  2446. </div>
  2447. </div>
  2448. <h4 class="bold"><?php echo $hesklang['pop3']; ?></h4>
  2449. <div class="form-group">
  2450. <label for="s_pop3" class="col-sm-3 control-label"><?php echo $hesklang['pop3']; ?> <a
  2451. href="Javascript:void(0)"
  2452. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2453. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2454. <div class="col-sm-9 form-inline">
  2455. <?php
  2456. $on = '';
  2457. $off = '';
  2458. $onload_div = 'none';
  2459. $onload_status = '';
  2460. if ($hesk_settings['pop3']) {
  2461. $on = 'checked="checked"';
  2462. $onload_div = 'block';
  2463. } else {
  2464. $off = 'checked="checked"';
  2465. $onload_status = ' disabled="disabled" ';
  2466. }
  2467. echo '
  2468. <div class="radio"><label><input type="radio" name="s_pop3" value="0" onclick="hesk_attach_disable(new Array(\'p0\',\'p1\',\'p2\',\'p3\',\'p4\',\'p5\',\'p6\',\'p7\',\'p8\'))" onchange="hesk_toggleLayerDisplay(\'pop3_settings\');" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2469. <div class="radio"><label><input type="radio" name="s_pop3" value="1" onclick="hesk_attach_enable(new Array(\'p0\',\'p1\',\'p2\',\'p3\',\'p4\',\'p5\',\'p6\',\'p7\',\'p8\'))" onchange="hesk_toggleLayerDisplay(\'pop3_settings\');" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  2470. ?>
  2471. <input type="hidden" name="tmp_pop3_host_name"
  2472. value="<?php echo $hesk_settings['pop3_host_name']; ?>"/>
  2473. <input type="hidden" name="tmp_pop3_host_port"
  2474. value="<?php echo $hesk_settings['pop3_host_port']; ?>"/>
  2475. <input type="hidden" name="tmp_pop3_user"
  2476. value="<?php echo $hesk_settings['pop3_user']; ?>"/>
  2477. <input type="hidden" name="tmp_pop3_password"
  2478. value="<?php echo $hesk_settings['pop3_password']; ?>"/>
  2479. <input type="hidden" name="tmp_pop3_tls" value="<?php echo $hesk_settings['pop3_tls']; ?>"/>
  2480. <input type="hidden" name="tmp_pop3_keep"
  2481. value="<?php echo $hesk_settings['pop3_keep']; ?>"/>
  2482. </div>
  2483. </div>
  2484. <div id="pop3_settings" style="display:<?php echo $onload_div; ?>">
  2485. <div class="form-group">
  2486. <label for="s_pop3_job_wait" class="col-sm-3 control-label"><?php echo $hesklang['pjt']; ?>
  2487. <a href="Javascript:void(0)"
  2488. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2489. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2490. <div class="col-sm-9">
  2491. <input type="text" class="form-control"
  2492. placeholder="<?php echo htmlspecialchars($hesklang['pjt']); ?>" id="p0"
  2493. name="s_pop3_job_wait" size="40" maxlength="255"
  2494. value="<?php echo $hesk_settings['pop3_job_wait']; ?>" <?php echo $onload_status; ?> /> <?php echo $hesklang['pjt2']; ?>
  2495. </div>
  2496. </div>
  2497. <div class="form-group">
  2498. <label for="s_pop3_host_name"
  2499. class="col-sm-3 control-label"><?php echo $hesklang['pop3h']; ?> <a
  2500. href="Javascript:void(0)"
  2501. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2502. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2503. <div class="col-sm-9">
  2504. <input type="text" class="form-control"
  2505. placeholder="<?php echo htmlspecialchars($hesklang['pop3h']); ?>" id="p1"
  2506. name="s_pop3_host_name" size="40" maxlength="255"
  2507. value="<?php echo $hesk_settings['pop3_host_name']; ?>" <?php echo $onload_status; ?> />
  2508. </div>
  2509. </div>
  2510. <div class="form-group">
  2511. <label for="s_pop3_host_port"
  2512. class="col-sm-3 control-label"><?php echo $hesklang['pop3p']; ?> <a
  2513. href="Javascript:void(0)"
  2514. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2515. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2516. <div class="col-sm-3">
  2517. <input type="text" class="form-control"
  2518. placeholder="<?php echo htmlspecialchars($hesklang['pop3p']); ?>" id="p2"
  2519. name="s_pop3_host_port" size="5" maxlength="255"
  2520. value="<?php echo $hesk_settings['pop3_host_port']; ?>" <?php echo $onload_status; ?> />
  2521. </div>
  2522. </div>
  2523. <div class="form-group">
  2524. <label for="s_pop3_tls" class="col-sm-3 control-label"><?php echo $hesklang['pop3tls']; ?>
  2525. <a href="Javascript:void(0)"
  2526. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2527. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2528. <div class="col-sm-9 form-inline">
  2529. <?php
  2530. $on = $hesk_settings['pop3_tls'] ? 'checked="checked"' : '';
  2531. $off = $hesk_settings['pop3_tls'] ? '' : 'checked="checked"';
  2532. echo '
  2533. <div class="radio"><label><input type="radio" name="s_pop3_tls" value="0" id="p3" ' . $off . ' ' . $onload_status . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2534. <div class="radio"><label><input type="radio" name="s_pop3_tls" value="1" id="p4" ' . $on . ' ' . $onload_status . ' /> ' . $hesklang['on'] . '</label></div>';
  2535. ?>
  2536. </div>
  2537. </div>
  2538. <div class="form-group">
  2539. <label for="s_pop3_keep" class="col-sm-3 control-label"><?php echo $hesklang['pop3keep']; ?>
  2540. <a href="Javascript:void(0)"
  2541. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2542. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2543. <div class="col-sm-9 form-inline">
  2544. <?php
  2545. $on = $hesk_settings['pop3_keep'] ? 'checked="checked"' : '';
  2546. $off = $hesk_settings['pop3_keep'] ? '' : 'checked="checked"';
  2547. echo '
  2548. <div class="radio"><label><input type="radio" name="s_pop3_keep" value="0" id="p7" ' . $off . ' ' . $onload_status . ' /> ' . $hesklang['off'] . '</label></div>
  2549. <div class="radio"><label><input type="radio" name="s_pop3_keep" value="1" id="p8" ' . $on . ' ' . $onload_status . ' /> ' . $hesklang['on'] . '</label></div>';
  2550. ?>
  2551. </div>
  2552. </div>
  2553. <div class="form-group">
  2554. <label for="s_pop3_user" class="col-sm-3 control-label"><?php echo $hesklang['pop3u']; ?> <a
  2555. href="Javascript:void(0)"
  2556. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2557. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2558. <div class="col-sm-9">
  2559. <input type="text" class="form-control"
  2560. placeholder="<?php echo htmlspecialchars($hesklang['pop3u']); ?>" id="p5"
  2561. name="s_pop3_user" size="40" maxlength="255"
  2562. value="<?php echo $hesk_settings['pop3_user']; ?>" <?php echo $onload_status; ?>
  2563. autocomplete="off"/>
  2564. </div>
  2565. </div>
  2566. <div class="form-group">
  2567. <label for="s_pop3_password"
  2568. class="col-sm-3 control-label"><?php echo $hesklang['pop3w']; ?> <a
  2569. href="Javascript:void(0)"
  2570. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#59','400','500')"><i
  2571. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2572. <div class="col-sm-9">
  2573. <input type="password" class="form-control"
  2574. placeholder="<?php echo htmlspecialchars($hesklang['pop3w']); ?>" id="p6"
  2575. name="s_pop3_password" size="40" maxlength="255"
  2576. value="<?php echo $hesk_settings['pop3_password']; ?>" <?php echo $onload_status; ?>
  2577. autocomplete="off"/>
  2578. </div>
  2579. </div>
  2580. <div class="form-group">
  2581. <div class="col-sm-9 col-sm-offset-3">
  2582. <input type="button" class="btn btn-default move-down-4" onclick="hesk_testPOP3()"
  2583. value="<?php echo $hesklang['pop3test']; ?>"/>
  2584. </div>
  2585. </div>
  2586. <table border="0" width="100%">
  2587. <tr>
  2588. <td class="text-right" width="200"></td>
  2589. <td></td>
  2590. </tr>
  2591. <tr>
  2592. <td class="text-right" width="200">&nbsp;</td>
  2593. <td></td>
  2594. </tr>
  2595. </table>
  2596. <!-- START POP3 TEST -->
  2597. <div id="pop3_test" style="display:none">
  2598. </div>
  2599. <script language="Javascript" type="text/javascript"><!--
  2600. function hesk_testPOP3() {
  2601. var element = document.getElementById('pop3_test');
  2602. element.innerHTML = '<img src="<?php echo HESK_PATH; ?>img/loading.gif" width="24" height="24" alt="" border="0" style="vertical-align:text-bottom" /> <i><?php echo addslashes($hesklang['contest']); ?></i>';
  2603. element.style.display = 'block';
  2604. var s_pop3_host_name = document.getElementById('p1').value;
  2605. var s_pop3_host_port = document.getElementById('p2').value;
  2606. var s_pop3_user = document.getElementById('p5').value;
  2607. var s_pop3_password = document.getElementById('p6').value;
  2608. var s_pop3_tls = document.getElementById('p4').checked ? 1 : 0;
  2609. var params = "test=pop3" +
  2610. "&s_pop3_host_name=" + encodeURIComponent(s_pop3_host_name) +
  2611. "&s_pop3_host_port=" + encodeURIComponent(s_pop3_host_port) +
  2612. "&s_pop3_user=" + encodeURIComponent(s_pop3_user) +
  2613. "&s_pop3_password=" + encodeURIComponent(s_pop3_password) +
  2614. "&s_pop3_tls=" + encodeURIComponent(s_pop3_tls);
  2615. xmlHttp = GetXmlHttpObject();
  2616. if (xmlHttp == null) {
  2617. return;
  2618. }
  2619. xmlHttp.open('POST', 'test_connection.php', true);
  2620. xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  2621. xmlHttp.setRequestHeader("Content-length", params.length);
  2622. xmlHttp.setRequestHeader("Connection", "close");
  2623. xmlHttp.onreadystatechange = function () {
  2624. if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
  2625. element.innerHTML = xmlHttp.responseText;
  2626. }
  2627. }
  2628. xmlHttp.send(params);
  2629. }
  2630. //-->
  2631. </script>
  2632. <!-- END POP3 TEST -->
  2633. </div>
  2634. <!-- END POP3 SETTINGS DIV -->
  2635. <!-- IMAP Fetching -->
  2636. <h4 class="bold"><?php echo $hesklang['imap']; ?></h4>
  2637. <div class="form-group">
  2638. <label for="s_pop3" class="col-sm-3 control-label"><?php echo $hesklang['imap']; ?> <a
  2639. href="Javascript:void(0)"
  2640. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2641. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2642. <div class="col-sm-9 form-inline">
  2643. <?php
  2644. $on = '';
  2645. $off = '';
  2646. $onload_div = 'none';
  2647. $onload_status = '';
  2648. if ($hesk_settings['imap']) {
  2649. $on = 'checked';
  2650. $onload_div = 'block';
  2651. } else {
  2652. $off = 'checked';
  2653. $onload_status = ' disabled ';
  2654. }
  2655. // Is IMAP extension loaded?
  2656. if ( ! function_exists('imap_open')) {
  2657. echo '<i>'. $hesklang['disabled'] . '</i> - ' . $hesklang['imap_not'];
  2658. $onload_div = 'none';
  2659. } else {
  2660. echo '
  2661. <div class="radio"><label><input type="radio" name="s_imap" value="0" onclick="hesk_attach_disable(new Array(\'i0\',\'i1\',\'i2\',\'i3\',\'i4\',\'i5\',\'i6\',\'i7\',\'i8\',\'i9\'))" onchange="hesk_toggleLayerDisplay(\'imap_settings\');" ' . $off . '> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2662. <div class="radio"><label><input type="radio" name="s_imap" value="1" onclick="hesk_attach_enable(new Array(\'i0\',\'i1\',\'i2\',\'i3\',\'i4\',\'i5\',\'i6\',\'i7\',\'i8\',\'i9\'))" onchange="hesk_toggleLayerDisplay(\'imap_settings\');" ' . $on . '> ' . $hesklang['on'] . '</label></div>';
  2663. }
  2664. ?>
  2665. <input type="hidden" name="tmp_imap_job_wait" value="<?php echo $hesk_settings['imap_job_wait']; ?>" />
  2666. <input type="hidden" name="tmp_imap_host_name" value="<?php echo $hesk_settings['imap_host_name']; ?>">
  2667. <input type="hidden" name="tmp_imap_host_port" value="<?php echo $hesk_settings['imap_host_port']; ?>">
  2668. <input type="hidden" name="tmp_imap_user" value="<?php echo $hesk_settings['imap_user']; ?>">
  2669. <input type="hidden" name="tmp_imap_password" value="<?php echo $hesk_settings['imap_password']; ?>">
  2670. <input type="hidden" name="tmp_imap_enc" value="<?php echo $hesk_settings['imap_enc']; ?>">
  2671. <input type="hidden" name="tmp_imap_keep" value="<?php echo $hesk_settings['imap_keep']; ?>">
  2672. </div>
  2673. </div>
  2674. <div id="imap_settings" style="display:<?php echo $onload_div; ?>">
  2675. <div class="form-group">
  2676. <label for="s_imap_job_wait" class="col-sm-3 control-label"><?php echo $hesklang['pjt']; ?>
  2677. <a href="Javascript:void(0)"
  2678. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2679. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2680. <div class="col-sm-9">
  2681. <input type="text" class="form-control"
  2682. placeholder="<?php echo htmlspecialchars($hesklang['pjt']); ?>" id="i0"
  2683. name="s_imap_job_wait" size="5" maxlength="5"
  2684. value="<?php echo $hesk_settings['imap_job_wait']; ?>" <?php echo $onload_status; ?>> <?php echo $hesklang['pjt2']; ?>
  2685. </div>
  2686. </div>
  2687. <div class="form-group">
  2688. <label for="s_imap_host_name" class="col-sm-3 control-label"><?php echo $hesklang['imaph']; ?>
  2689. <a href="Javascript:void(0)"
  2690. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2691. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2692. <div class="col-sm-9">
  2693. <input type="text" class="form-control"
  2694. placeholder="<?php echo htmlspecialchars($hesklang['imaph']); ?>" id="i1"
  2695. name="s_imap_host_name" size="40" maxlength="255"
  2696. value="<?php echo $hesk_settings['imap_host_name']; ?>" <?php echo $onload_status; ?>>
  2697. </div>
  2698. </div>
  2699. <div class="form-group">
  2700. <label for="s_imap_host_port" class="col-sm-3 control-label"><?php echo $hesklang['imapp']; ?>
  2701. <a href="Javascript:void(0)"
  2702. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2703. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2704. <div class="col-sm-9">
  2705. <input type="text" class="form-control"
  2706. placeholder="<?php echo htmlspecialchars($hesklang['imapp']); ?>" id="i2"
  2707. name="s_imap_host_port" size="5" maxlength="255"
  2708. value="<?php echo $hesk_settings['imap_host_port']; ?>" <?php echo $onload_status; ?>>
  2709. </div>
  2710. </div>
  2711. <div class="form-group">
  2712. <label for="s_imap_enc" class="col-sm-3 control-label"><?php echo $hesklang['enc']; ?>
  2713. <a href="Javascript:void(0)"
  2714. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2715. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2716. <div class="col-sm-9 form-inline">
  2717. <?php
  2718. $none = $hesk_settings['imap_enc'] == '' ? 'checked' : '';
  2719. $ssl = $hesk_settings['imap_enc'] == 'ssl' ? 'checked' : '';
  2720. $tls = $hesk_settings['imap_enc'] == 'tls' ? 'checked' : '';
  2721. echo '
  2722. <div class="radio"><label><input type="radio" name="s_imap_enc" value="ssl" id="i9" '.$ssl.' '.$onload_status.'> '.$hesklang['ssl'].'</label></div>&nbsp;&nbsp;&nbsp;
  2723. <div class="radio"><label><input type="radio" name="s_imap_enc" value="tls" id="i4" '.$tls.' '.$onload_status.'> '.$hesklang['tls'].'</label></div>&nbsp;&nbsp;&nbsp;
  2724. <div class="radio"><label><input type="radio" name="s_imap_enc" value="" id="i3" '.$none.' '.$onload_status.'> '.$hesklang['none'].'</label></div>
  2725. ';
  2726. ?>
  2727. </div>
  2728. </div>
  2729. <div class="form-group">
  2730. <label for="s_imap_keep" class="col-sm-3 control-label"><?php echo $hesklang['pop3keep']; ?>
  2731. <a href="Javascript:void(0)"
  2732. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2733. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2734. <div class="col-sm-9 form-inline">
  2735. <?php
  2736. $on = $hesk_settings['imap_keep'] ? 'checked="checked"' : '';
  2737. $off = $hesk_settings['imap_keep'] ? '' : 'checked="checked"';
  2738. echo '
  2739. <div class="radio"><label><input type="radio" name="s_imap_keep" value="0" id="i7" '.$off.' '.$onload_status.'> '.$hesklang['off'].'</label></div>&nbsp;&nbsp;&nbsp;
  2740. <div class="radio"><label><input type="radio" name="s_imap_keep" value="1" id="i8" '.$on.' '.$onload_status.'> '.$hesklang['on'].'</label></div>
  2741. ';
  2742. ?>
  2743. </div>
  2744. </div>
  2745. <div class="form-group">
  2746. <label for="s_imap_user" class="col-sm-3 control-label"><?php echo $hesklang['imapu']; ?>
  2747. <a href="Javascript:void(0)"
  2748. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2749. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2750. <div class="col-sm-9">
  2751. <input type="text" class="form-control"
  2752. placeholder="<?php echo htmlspecialchars($hesklang['imapu']); ?>" id="i5"
  2753. name="s_imap_user" size="40" maxlength="255"
  2754. value="<?php echo $hesk_settings['imap_user']; ?>" <?php echo $onload_status; ?> autocomplete="off">
  2755. </div>
  2756. </div>
  2757. <div class="form-group">
  2758. <label for="s_imap_password" class="col-sm-3 control-label"><?php echo $hesklang['imapw']; ?>
  2759. <a href="Javascript:void(0)"
  2760. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#67','400','500')"><i
  2761. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2762. <div class="col-sm-9">
  2763. <input type="password" class="form-control"
  2764. placeholder="<?php echo htmlspecialchars($hesklang['imapw']); ?>" id="i6"
  2765. name="s_imap_password" size="40" maxlength="255"
  2766. value="<?php echo $hesk_settings['imap_password']; ?>" <?php echo $onload_status; ?> autocomplete="off">
  2767. </div>
  2768. </div>
  2769. <div class="form-group">
  2770. <div class="col-sm-9 col-sm-offset-3">
  2771. <input type="button" class="btn btn-default"
  2772. onclick="hesk_testIMAP()" value="<?php echo $hesklang['imaptest']; ?>">
  2773. </div>
  2774. </div>
  2775. <!-- START IMAP TEST -->
  2776. <div id="imap_test" style="display:none">
  2777. </div>
  2778. <script language="Javascript" type="text/javascript"><!--
  2779. function hesk_testIMAP()
  2780. {
  2781. var element = document.getElementById('imap_test');
  2782. element.innerHTML = '<img src="<?php echo HESK_PATH; ?>img/loading.gif" width="24" height="24" alt="" border="0" style="vertical-align:text-bottom" /> <i><?php echo addslashes($hesklang['contest']); ?></i>';
  2783. element.style.display = 'block';
  2784. var s_imap_host_name = document.getElementById('i1').value;
  2785. var s_imap_host_port = document.getElementById('i2').value;
  2786. var s_imap_user = document.getElementById('i5').value;
  2787. var s_imap_password = document.getElementById('i6').value;
  2788. var s_imap_enc = document.getElementById('i4').checked ? 'tls' : (document.getElementById('i9').checked ? 'ssl' : '');
  2789. var params = "test=imap" +
  2790. "&s_imap_host_name=" + encodeURIComponent( s_imap_host_name ) +
  2791. "&s_imap_host_port=" + encodeURIComponent( s_imap_host_port ) +
  2792. "&s_imap_user=" + encodeURIComponent( s_imap_user ) +
  2793. "&s_imap_password=" + encodeURIComponent( s_imap_password ) +
  2794. "&s_imap_enc=" + encodeURIComponent( s_imap_enc );
  2795. xmlHttp=GetXmlHttpObject();
  2796. if (xmlHttp==null)
  2797. {
  2798. return;
  2799. }
  2800. xmlHttp.open('POST','test_connection.php',true);
  2801. xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  2802. xmlHttp.setRequestHeader("Content-length", params.length);
  2803. xmlHttp.setRequestHeader("Connection", "close");
  2804. xmlHttp.onreadystatechange = function()
  2805. {
  2806. if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
  2807. {
  2808. element.innerHTML = xmlHttp.responseText;
  2809. }
  2810. }
  2811. xmlHttp.send(params);
  2812. }
  2813. //-->
  2814. </script>
  2815. <!-- END IMAP TEST -->
  2816. </div> <!-- END IMAP SETTINGS DIV -->
  2817. <h4 class="bold"><?php echo $hesklang['loops']; ?></h4>
  2818. <div class="form-group">
  2819. <label for="s_loop_hits" class="col-sm-3 control-label"><?php echo $hesklang['looph']; ?> <a
  2820. href="Javascript:void(0)"
  2821. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#60','400','500')"><i
  2822. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2823. <div class="col-sm-3">
  2824. <input type="text" class="form-control"
  2825. placeholder="<?php echo htmlspecialchars($hesklang['looph']); ?>" name="s_loop_hits"
  2826. size="5" maxlength="5" value="<?php echo $hesk_settings['loop_hits']; ?>"/>
  2827. </div>
  2828. </div>
  2829. <div class="form-group">
  2830. <label for="s_loop_time" class="col-sm-3 control-label"><?php echo $hesklang['loopt']; ?> <a
  2831. href="Javascript:void(0)"
  2832. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#60','400','500')"><i
  2833. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2834. <div class="col-sm-3">
  2835. <input type="text" class="form-control"
  2836. placeholder="<?php echo htmlspecialchars($hesklang['loopt']); ?>" name="s_loop_time"
  2837. size="5" maxlength="5" value="<?php echo $hesk_settings['loop_time']; ?>"/>
  2838. </div>
  2839. <div class="col-sm-6 pad-right-0">
  2840. <p class="form-control-static"><?php echo $hesklang['ss']; ?></p>
  2841. </div>
  2842. </div>
  2843. <h4 class="bold"><?php echo $hesklang['suge']; ?></h4>
  2844. <div class="form-group">
  2845. <label for="s_detect_typos" class="col-sm-3 control-label"><?php echo $hesklang['suge']; ?> <a
  2846. href="Javascript:void(0)"
  2847. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#62','400','500')"><i
  2848. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2849. <div class="col-sm-9 form-inline">
  2850. <?php
  2851. $on = '';
  2852. $off = '';
  2853. $onload_div = 'none';
  2854. $onload_status = '';
  2855. if ($hesk_settings['detect_typos']) {
  2856. $on = 'checked="checked"';
  2857. $onload_div = 'block';
  2858. } else {
  2859. $off = 'checked="checked"';
  2860. $onload_status = ' disabled="disabled" ';
  2861. }
  2862. echo '
  2863. <div class="radio"><label><input type="radio" name="s_detect_typos" value="0" onclick="hesk_attach_disable(new Array(\'d1\'))" onchange="hesk_toggleLayerDisplay(\'detect_typos\');" ' . $off . ' /> ' . $hesklang['off'] . '</label></div>&nbsp;&nbsp;&nbsp;
  2864. <div class="radio"><label><input type="radio" name="s_detect_typos" value="1" onclick="hesk_attach_enable(new Array(\'d1\'))" onchange="hesk_toggleLayerDisplay(\'detect_typos\');" ' . $on . ' /> ' . $hesklang['on'] . '</label></div>';
  2865. ?>
  2866. </div>
  2867. </div>
  2868. <div id="detect_typos" style="display:<?php echo $onload_div; ?>">
  2869. <div class="form-group">
  2870. <label for="s_email_providers"
  2871. class="col-sm-3 control-label"><?php echo $hesklang['epro']; ?> <a
  2872. href="Javascript:void(0)"
  2873. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#63','400','500')"><i
  2874. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2875. <div class="col-sm-9">
  2876. <textarea name="s_email_providers" class="form-control"
  2877. placeholder="<?php echo htmlspecialchars($hesklang['epro']); ?>" id="d1"
  2878. rows="5"
  2879. cols="40"><?php echo implode("\n", $hesk_settings['email_providers']); ?></textarea>
  2880. </div>
  2881. </div>
  2882. <table border="0" width="100%">
  2883. <tr>
  2884. <td class="text-right" style="vertical-align:top" width="200"></td>
  2885. <td></td>
  2886. </tr>
  2887. </table>
  2888. </div>
  2889. <h4 class="bold"><?php echo $hesklang['custnot']; ?> <a href="Javascript:void(0)"
  2890. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#65','400','500')"><i
  2891. class="fa fa-question-circle settingsquestionmark"></i></a></h4>
  2892. <div class="form-group">
  2893. <label for="s_notify_new"
  2894. class="col-sm-3 control-label"><?php echo $hesklang['notnew']; ?></label>
  2895. <div class="col-sm-9">
  2896. <div class="checkbox">
  2897. <label><input type="checkbox" name="s_notify_new" value="1"
  2898. onchange="hesk_toggleLayerDisplay('skip_notify');" <?php if ($hesk_settings['notify_new']) {
  2899. echo 'checked="checked"';
  2900. } ?>/> <?php echo $hesklang['enable']; ?></label>
  2901. </div>
  2902. </div>
  2903. </div>
  2904. <div id="skip_notify"
  2905. style="display:<?php echo $hesk_settings['notify_new'] ? 'block' : 'none'; ?>">
  2906. <div class="form-group">
  2907. <div class="col-sm-9 col-sm-offset-3">
  2908. <div class="checkbox">
  2909. <label><input type="checkbox" name="s_notify_skip_spam"
  2910. value="1" <?php if ($hesk_settings['notify_skip_spam']) {
  2911. echo 'checked="checked"';
  2912. } ?>/> <?php echo $hesklang['enn']; ?></label>
  2913. </div>
  2914. <textarea name="s_notify_spam_tags" rows="5" cols="40"
  2915. class="form-control"><?php echo hesk_htmlspecialchars(implode("\n", $hesk_settings['notify_spam_tags'])); ?></textarea>
  2916. </div>
  2917. </div>
  2918. </div>
  2919. <div class="form-group">
  2920. <label for="s_notify_closed"
  2921. class="col-sm-3 control-label"><?php echo $hesklang['notclo']; ?></label>
  2922. <div class="col-sm-9">
  2923. <div class="checkbox">
  2924. <label><input type="checkbox" name="s_notify_closed"
  2925. value="1" <?php if ($hesk_settings['notify_closed']) {
  2926. echo 'checked="checked"';
  2927. } ?>/> <?php echo $hesklang['enable']; ?></label>
  2928. </div>
  2929. </div>
  2930. </div>
  2931. <h4 class="bold"><?php echo $hesklang['other']; ?></h4>
  2932. <div class="form-group">
  2933. <label for="s_strip_quoted" class="col-sm-3 control-label"><?php echo $hesklang['remqr']; ?> <a
  2934. href="Javascript:void(0)"
  2935. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#61','400','500')"><i
  2936. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2937. <div class="col-sm-9">
  2938. <div class="checkbox">
  2939. <label><input type="checkbox" name="s_strip_quoted"
  2940. value="1" <?php if ($hesk_settings['strip_quoted']) {
  2941. echo 'checked="checked"';
  2942. } ?>/> <?php echo $hesklang['remqr2']; ?></label>
  2943. </div>
  2944. </div>
  2945. </div>
  2946. <div class="form-group">
  2947. <label for="s_eml_req_msg" class="col-sm-3 control-label"><?php echo $hesklang['emlreqmsg']; ?>
  2948. <a href="Javascript:void(0)"
  2949. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#66','400','500')"><i
  2950. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2951. <div class="col-sm-9">
  2952. <div class="checkbox">
  2953. <label><input type="checkbox" name="s_eml_req_msg"
  2954. value="1" <?php if ($hesk_settings['eml_req_msg']) {
  2955. echo 'checked="checked"';
  2956. } ?>/> <?php echo $hesklang['emlreqmsg2']; ?></label>
  2957. </div>
  2958. </div>
  2959. </div>
  2960. <div class="form-group">
  2961. <label for="s_save_embedded" class="col-sm-3 control-label"><?php echo $hesklang['embed']; ?> <a
  2962. href="Javascript:void(0)"
  2963. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#64','400','500')"><i
  2964. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2965. <div class="col-sm-9">
  2966. <div class="checkbox">
  2967. <label><input type="checkbox" name="s_save_embedded"
  2968. value="1" <?php if ($hesk_settings['save_embedded']) {
  2969. echo 'checked="checked"';
  2970. } ?>/> <?php echo $hesklang['embed2']; ?></label>
  2971. </div>
  2972. </div>
  2973. </div>
  2974. <div class="form-group">
  2975. <label for="s_multi_eml" class="col-sm-3 control-label"><?php echo $hesklang['meml']; ?> <a
  2976. href="Javascript:void(0)"
  2977. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#57','400','500')"><i
  2978. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  2979. <div class="col-sm-9">
  2980. <div class="checkbox">
  2981. <?php
  2982. if ($modsForHesk_settings['customer_email_verification_required']) {
  2983. ?>
  2984. <label>
  2985. <i class="fa fa-ban bold red font-size-120" style="margin-left: -20px;"
  2986. data-toggle="popover"
  2987. title="<?php echo $hesklang['feature_disabled']; ?>"
  2988. data-content="<?php echo $hesklang['multi_eml_disabled']; ?>"></i> <?php echo $hesklang['meml2']; ?>
  2989. </label>
  2990. <input type="hidden" name="s_multi_eml" value="0">
  2991. <?php
  2992. } else {
  2993. ?>
  2994. <label><input type="checkbox" name="s_multi_eml"
  2995. value="1" <?php if ($hesk_settings['multi_eml']) {
  2996. echo 'checked="checked"';
  2997. } ?>/> <?php echo $hesklang['meml2']; ?></label>
  2998. <?php
  2999. }
  3000. ?>
  3001. </div>
  3002. </div>
  3003. </div>
  3004. <div class="form-group">
  3005. <label for="s_confirm_email" class="col-sm-3 control-label"><?php echo $hesklang['sconfe']; ?>
  3006. <a href="Javascript:void(0)"
  3007. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#50','400','500')"><i
  3008. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3009. <div class="col-sm-9">
  3010. <div class="checkbox">
  3011. <label><input type="checkbox" name="s_confirm_email"
  3012. value="1" <?php if ($hesk_settings['confirm_email']) {
  3013. echo 'checked="checked"';
  3014. } ?>/> <?php echo $hesklang['sconfe2']; ?></label>
  3015. </div>
  3016. </div>
  3017. </div>
  3018. <div class="form-group">
  3019. <label for="s_open_only" class="col-sm-3 control-label"><?php echo $hesklang['oo']; ?> <a
  3020. href="Javascript:void(0)"
  3021. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>email.html#58','400','500')"><i
  3022. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3023. <div class="col-sm-9">
  3024. <div class="checkbox">
  3025. <label><input type="checkbox" name="s_open_only"
  3026. value="1" <?php if ($hesk_settings['open_only']) {
  3027. echo 'checked="checked"';
  3028. } ?>/> <?php echo $hesklang['ool']; ?></label>
  3029. </div>
  3030. </div>
  3031. </div>
  3032. <div class="form-group">
  3033. <label for="html_emails" class="col-sm-3 col-xs-12 control-label">
  3034. <span class="label label-primary"
  3035. data-toggle="tooltip"
  3036. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  3037. <?php echo $hesklang['html_emails']; ?>
  3038. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  3039. title="<?php echo $hesklang['html_emails']; ?>"
  3040. data-content="<?php echo $hesklang['html_emails_help']; ?>"></i>
  3041. </label>
  3042. <div class="col-sm-9 col-xs-12">
  3043. <div class="checkbox">
  3044. <label>
  3045. <input id="html_emails" name="html_emails"
  3046. type="checkbox" <?php if ($modsForHesk_settings['html_emails']) {
  3047. echo 'checked';
  3048. } ?>> <?php echo $hesklang['html_emails_text']; ?>
  3049. </label>
  3050. </div>
  3051. </div>
  3052. </div>
  3053. <div class="form-group">
  3054. <label for="email_attachments" class="col-sm-3 col-xs-12 control-label">
  3055. <span class="label label-primary"
  3056. data-toggle="tooltip"
  3057. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  3058. <?php echo $hesklang['email_attachments']; ?>
  3059. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  3060. title="<?php echo $hesklang['email_attachments']; ?>"
  3061. data-content="<?php echo $hesklang['email_attachments_help']; ?>"></i>
  3062. </label>
  3063. <div class="col-sm-9 col-xs-12">
  3064. <div class="radio">
  3065. <label>
  3066. <input type="radio" name="email_attachments"
  3067. value="0" <?php echo $modsForHesk_settings['attachments'] == 0 ? 'checked' : ''; ?>>
  3068. <?php echo $hesklang['show_attachments_as_links']; ?>
  3069. </label>
  3070. </div>
  3071. <div class="radio">
  3072. <label>
  3073. <input type="radio" name="email_attachments"
  3074. value="1" <?php echo $modsForHesk_settings['attachments'] == 1 ? 'checked' : ''; ?>>
  3075. <?php echo $hesklang['attach_directly_to_email']; ?>
  3076. </label>
  3077. </div>
  3078. </div>
  3079. </div>
  3080. </div>
  3081. </div>
  3082. <!-- Ticket List Settings -->
  3083. <a class="anchor" id="ticket-list">&nbsp;</a>
  3084. <div class="box">
  3085. <div class="box-header with-border">
  3086. <h1 class="box-title">
  3087. <?php echo $hesklang['tab_7']; ?>
  3088. </h1>
  3089. <div class="box-tools pull-right">
  3090. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  3091. <i class="fa fa-minus"></i>
  3092. </button>
  3093. </div>
  3094. </div>
  3095. <div class="box-body">
  3096. <div class="form-group">
  3097. <label for="s_open_only" class="col-sm-4 control-label"><?php echo $hesklang['fitl']; ?> <a
  3098. href="Javascript:void(0)"
  3099. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#1','400','500')"><i
  3100. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3101. <div class="col-sm-8">
  3102. <?php
  3103. // List available fields
  3104. foreach ($hesk_settings['possible_ticket_list'] as $key => $title) {
  3105. echo '
  3106. <div class="checkbox">
  3107. <label><input type="checkbox" name="s_tl_' . $key . '" value="1" ' . (in_array($key, $hesk_settings['ticket_list']) ? 'checked="checked"' : '') . '/> ' . $title . '</label>
  3108. </div>
  3109. ';
  3110. }
  3111. ?>
  3112. </div>
  3113. </div>
  3114. <div class="form-group">
  3115. <label for="show_number_merged" class="col-sm-4 control-label">
  3116. <span class="label label-primary"
  3117. data-toggle="tooltip"
  3118. title="<?php echo $hesklang['added_in_mods_for_hesk'] ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  3119. <?php echo $hesklang['show_number_merged']; ?>
  3120. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3121. title="<?php echo $hesklang['show_number_merged']; ?>"
  3122. data-content="<?php echo $hesklang['show_number_merged_help']; ?>"></i>
  3123. </label>
  3124. <div class="col-sm-8">
  3125. <div class="checkbox">
  3126. <label>
  3127. <input type="checkbox"
  3128. name="show_number_merged" <?php if ($modsForHesk_settings['show_number_merged']) {
  3129. echo 'checked';
  3130. } ?>> <?php echo $hesklang['show_number_merged_descr']; ?>
  3131. </label>
  3132. </div>
  3133. </div>
  3134. </div>
  3135. <div class="form-group">
  3136. <label for="show_number_merged" class="col-sm-4 control-label">
  3137. <span class="label label-primary"
  3138. data-toggle="tooltip"
  3139. title="<?php echo $hesklang['added_in_mods_for_hesk'] ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  3140. <?php echo $hesklang['highlight_ticket_rows_based_on_priority']; ?>
  3141. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3142. title="<?php echo $hesklang['highlight_ticket_rows_based_on_priority']; ?>"
  3143. data-content="<?php echo $hesklang['highlight_ticket_rows_based_on_priority_help']; ?>"></i>
  3144. </label>
  3145. <div class="col-sm-8">
  3146. <div class="checkbox">
  3147. <label>
  3148. <input type="checkbox"
  3149. name="highlight_ticket_rows_based_on_priority" <?php if ($modsForHesk_settings['highlight_ticket_rows_based_on_priority']) {
  3150. echo 'checked';
  3151. } ?>> <?php echo $hesklang['highlight_ticket_rows_based_on_priority_descr']; ?>
  3152. </label>
  3153. </div>
  3154. </div>
  3155. </div>
  3156. <div class="form-group">
  3157. <label for="s_submittedformat" class="col-sm-4 control-label"><?php echo $hesklang['sdf']; ?> <a
  3158. href="Javascript:void(0)"
  3159. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#2','400','500')"><i
  3160. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3161. <div class="col-sm-8 form-inline">
  3162. <?php
  3163. $off = $hesk_settings['new_top'] ? '' : 'checked="checked"';
  3164. echo '
  3165. <div class="radio"><label><input type="radio" name="s_submittedformat" value="2" ' . ($hesk_settings['submittedformat'] == 2 ? 'checked="checked"' : '') . ' /> ' . $hesklang['lcf2'] . '</label></div><br>
  3166. <div class="radio"><label><input type="radio" name="s_submittedformat" value="1" ' . ($hesk_settings['submittedformat'] == 1 ? 'checked="checked"' : '') . ' /> ' . $hesklang['lcf1'] . '</label></div><br>
  3167. <div class="radio"><label><input type="radio" name="s_submittedformat" value="0" ' . ($hesk_settings['submittedformat'] == 0 ? 'checked="checked"' : '') . ' /> ' . $hesklang['lcf0'] . '</label></div>';
  3168. ?>
  3169. </div>
  3170. </div>
  3171. <div class="form-group">
  3172. <label for="s_updatedformat" class="col-sm-4 control-label"><?php echo $hesklang['lcf']; ?> <a
  3173. href="Javascript:void(0)"
  3174. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>ticket_list.html#2','400','500')"><i
  3175. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3176. <div class="col-sm-8 form-inline">
  3177. <?php
  3178. echo '
  3179. <div class="radio"><label><input type="radio" name="s_updatedformat" value="2" ' . ($hesk_settings['updatedformat'] == 2 ? 'checked="checked"' : '') . ' /> ' . $hesklang['lcf2'] . '</label></div><br>
  3180. <div class="radio"><label><input type="radio" name="s_updatedformat" value="1" ' . ($hesk_settings['updatedformat'] == 1 ? 'checked="checked"' : '') . ' /> ' . $hesklang['lcf1'] . '</label></div><br>
  3181. <div class="radio"><label><input type="radio" name="s_updatedformat" value="0" ' . ($hesk_settings['updatedformat'] == 0 ? 'checked="checked"' : '') . ' /> ' . $hesklang['lcf0'] . '</label></div>';
  3182. ?>
  3183. </div>
  3184. </div>
  3185. </div>
  3186. </div>
  3187. <!-- Misc Settings -->
  3188. <a class="anchor" id="miscellaneous">&nbsp;</a>
  3189. <div class="box">
  3190. <div class="box-header with-border">
  3191. <h1 class="box-title">
  3192. <?php echo $hesklang['tab_5']; ?>
  3193. </h1>
  3194. <div class="box-tools pull-right">
  3195. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  3196. <i class="fa fa-minus"></i>
  3197. </button>
  3198. </div>
  3199. </div>
  3200. <div class="box-body">
  3201. <h4 class="bold"><?php echo $hesklang['dat']; ?></h4>
  3202. <div class="form-group">
  3203. <label for="s_timezone" class="col-sm-4 control-label"><?php echo $hesklang['TZ']; ?> <a
  3204. href="Javascript:void(0)"
  3205. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#63','400','500')"><i
  3206. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3207. <div class="col-sm-8">
  3208. <?php
  3209. // Get list of supported timezones
  3210. $timezone_list = hesk_generate_timezone_list();
  3211. // Do we need to localize month names?
  3212. if ($hesk_settings['language'] != 'English') {
  3213. $timezone_list = hesk_translate_timezone_list($timezone_list);
  3214. }
  3215. ?>
  3216. <select class="form-control" name="s_timezone">
  3217. <?php foreach ($timezone_list as $timezone => $description): ?>
  3218. <option value="<?php echo $timezone; ?>" <?php if ($hesk_settings['timezone'] == $timezone) {echo 'selected';} ?>>
  3219. <?php echo $description; ?>
  3220. </option>
  3221. <?php endforeach; ?>
  3222. </select>
  3223. </div>
  3224. </div>
  3225. <div class="form-group">
  3226. <label for="s_timeformat" class="col-sm-4 control-label"><?php echo $hesklang['tfor']; ?> <a
  3227. href="Javascript:void(0)"
  3228. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#20','400','500')"><i
  3229. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3230. <div class="col-sm-8">
  3231. <input type="text" class="form-control"
  3232. placeholder="<?php echo htmlspecialchars($hesklang['tfor']); ?>" name="s_timeformat"
  3233. size="40" maxlength="255" value="<?php echo $hesk_settings['timeformat']; ?>"/>
  3234. </div>
  3235. </div>
  3236. <h4 class="bold"><?php echo $hesklang['other']; ?></h4>
  3237. <div class="form-group">
  3238. <label for="s_ip_whois_url" class="col-sm-4 control-label"><?php echo $hesklang['ip_whois']; ?> <a
  3239. href="Javascript:void(0)"
  3240. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#61','400','500')"><i
  3241. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3242. <div class="col-sm-8">
  3243. <input type="text" class="form-control" name="s_ip_whois_url" size="40" maxlength="255"
  3244. value="<?php echo $hesk_settings['ip_whois']; ?>"/>
  3245. </div>
  3246. </div>
  3247. <div class="form-group">
  3248. <label for="s_maintenance_mode" class="col-sm-4 control-label"><?php echo $hesklang['mms']; ?>
  3249. <a href="Javascript:void(0)"
  3250. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#62','400','500')"><i
  3251. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3252. <div class="col-sm-8">
  3253. <div class="checkbox">
  3254. <label><input type="checkbox" name="s_maintenance_mode"
  3255. value="1" <?php if ($hesk_settings['maintenance_mode']) {
  3256. echo 'checked="checked"';
  3257. } ?>/> <?php echo $hesklang['mmd']; ?></label>
  3258. </div>
  3259. </div>
  3260. </div>
  3261. <div class="form-group">
  3262. <label for="s_alink" class="col-sm-4 control-label"><?php echo $hesklang['al']; ?> <a
  3263. href="Javascript:void(0)"
  3264. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#21','400','500')"><i
  3265. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3266. <div class="col-sm-8">
  3267. <div class="checkbox">
  3268. <label><input type="checkbox" name="s_alink"
  3269. value="1" <?php if ($hesk_settings['alink']) {
  3270. echo 'checked="checked"';
  3271. } ?>/> <?php echo $hesklang['dap']; ?></label>
  3272. </div>
  3273. </div>
  3274. </div>
  3275. <div class="form-group">
  3276. <label for="s_submit_notice" class="col-sm-4 control-label"><?php echo $hesklang['subnot']; ?>
  3277. <a href="Javascript:void(0)"
  3278. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#48','400','500')"><i
  3279. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3280. <div class="col-sm-8">
  3281. <div class="checkbox">
  3282. <label><input type="checkbox" name="s_submit_notice"
  3283. value="1" <?php if ($hesk_settings['submit_notice']) {
  3284. echo 'checked="checked"';
  3285. } ?>/> <?php echo $hesklang['subnot2']; ?></label>
  3286. </div>
  3287. </div>
  3288. </div>
  3289. <div class="form-group">
  3290. <label for="s_online" class="col-sm-4 control-label"><?php echo $hesklang['sonline']; ?> <a
  3291. href="Javascript:void(0)"
  3292. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#56','400','500')"><i
  3293. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3294. <div class="col-sm-4">
  3295. <div class="checkbox">
  3296. <label><input type="checkbox" name="s_online"
  3297. value="1" <?php if ($hesk_settings['online']) {
  3298. echo 'checked="checked"';
  3299. } ?>/> <?php echo $hesklang['sonline2']; ?></label>
  3300. </div>
  3301. </div>
  3302. <div class="col-sm-2 pad-right-0">
  3303. <input type="text" class="form-control" name="s_online_min" size="5" maxlength="4"
  3304. value="<?php echo $hesk_settings['online_min']; ?>"/>
  3305. </div>
  3306. </div>
  3307. <div class="form-group">
  3308. <label for="show-icons" class="col-sm-4 col-xs-12 control-label">
  3309. <span class="label label-primary"
  3310. data-toggle="tooltip"
  3311. title="<?php echo $hesklang['added_in_mods_for_hesk'] ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  3312. <?php echo $hesklang['showIcons']; ?>
  3313. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3314. title="<?php echo $hesklang['showIcons']; ?>"
  3315. data-content="<?php echo $hesklang['showIconsHelp']; ?>"></i>
  3316. </label>
  3317. <div class="col-sm-8 col-xs-12">
  3318. <div class="checkbox">
  3319. <label>
  3320. <input id="show-icons" name="show-icons"
  3321. type="checkbox" <?php if ($modsForHesk_settings['show_icons']) {
  3322. echo 'checked';
  3323. } ?>> <?php echo $hesklang['show_icons_navigation']; ?>
  3324. </label>
  3325. </div>
  3326. </div>
  3327. </div>
  3328. <div class="form-group">
  3329. <label for="use_bootstrap_theme" class="col-sm-4 col-xs-12 control-label">
  3330. <span class="label label-primary"
  3331. data-toggle="tooltip"
  3332. title="<?php echo $hesklang['added_in_mods_for_hesk'] ?>"><?php echo $hesklang['mods_for_hesk_acronym']; ?></span>
  3333. <?php echo $hesklang['use_bootstrap_theme']; ?>
  3334. <i class="fa fa-question-circle settingsquestionmark" data-toggle="htmlpopover"
  3335. title="<?php echo $hesklang['use_bootstrap_theme']; ?>"
  3336. data-content="<?php echo $hesklang['use_bootstrap_theme_help']; ?>"></i>
  3337. </label>
  3338. <div class="col-sm-8 col-xs-12">
  3339. <div class="checkbox">
  3340. <label>
  3341. <input id="use_boostrap_theme" name="use_bootstrap_theme"
  3342. type="checkbox" <?php if ($modsForHesk_settings['use_bootstrap_theme']) {
  3343. echo 'checked';
  3344. } ?>> <?php echo $hesklang['use_bootstrap_theme']; ?>
  3345. </label>
  3346. </div>
  3347. </div>
  3348. </div>
  3349. <div class="form-group">
  3350. <label for="s_check_updates" class="col-sm-4 control-label"><?php echo $hesklang['updates']; ?>
  3351. <a href="Javascript:void(0)"
  3352. onclick="Javascript:hesk_window('<?php echo $help_folder; ?>misc.html#59','400','500')"><i
  3353. class="fa fa-question-circle settingsquestionmark"></i></a></label>
  3354. <div class="col-sm-8">
  3355. <div class="checkbox">
  3356. <label><input type="checkbox" name="s_check_updates"
  3357. value="1" <?php if ($hesk_settings['check_updates']) {
  3358. echo 'checked="checked"';
  3359. } ?>/> <?php echo $hesklang['updates2']; ?></label>
  3360. </div>
  3361. </div>
  3362. </div>
  3363. </div>
  3364. </div>
  3365. <!-- UI Colors -->
  3366. <a class="anchor" id="ui-colors">&nbsp;</a>
  3367. <div class="box">
  3368. <div class="box-header with-border">
  3369. <h1 class="box-title">
  3370. <?php echo $hesklang['uiColors']; ?>
  3371. <span class="label label-primary" data-toggle="tooltip"
  3372. title="<?php echo $hesklang['added_in_mods_for_hesk']; ?>">
  3373. <?php echo $hesklang['mods_for_hesk_acronym']; ?>
  3374. </span>
  3375. </h1>
  3376. <div class="box-tools pull-right">
  3377. <button type="button" class="btn btn-box-tool" data-widget="collapse">
  3378. <i class="fa fa-minus"></i>
  3379. </button>
  3380. </div>
  3381. </div>
  3382. <div class="box-body">
  3383. <h4><?php echo $hesklang['common_properties']; ?></h4>
  3384. <div class="row">
  3385. <div class="col-sm-6 col-xs-12">
  3386. <div class="form-group">
  3387. <label for="questionMarkColor"
  3388. class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['questionMarkColor']; ?>
  3389. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3390. data-placement="left"
  3391. title="<?php echo $hesklang['questionMarkColor']; ?>"
  3392. data-content="<?php echo $hesklang['questionMarkColorHelp']; ?>"></i>
  3393. </label>
  3394. <div class="col-sm-5 col-xs-12">
  3395. <input type="text" id="questionMarkColor" name="questionMarkColor"
  3396. class="form-control"
  3397. value="<?php echo $modsForHesk_settings['questionMarkColor']; ?>">
  3398. </div>
  3399. </div>
  3400. </div>
  3401. </div>
  3402. <h4><?php echo $hesklang['customer_view']; ?></h4>
  3403. <div class="row">
  3404. <div class="col-sm-6 col-xs-12">
  3405. <?php
  3406. buildColorSchemeColorpicker('navbarBackgroundColor', 'navbarBackgroundColor', $modsForHesk_settings['navbarBackgroundColor'], 'Help');
  3407. ?>
  3408. </div>
  3409. <div class="col-sm-6 col-xs-12">
  3410. <?php
  3411. buildColorSchemeColorpicker('navbarBrandColor', 'navbarBrandColor', $modsForHesk_settings['navbarBrandColor'], 'Help');
  3412. ?>
  3413. </div>
  3414. </div>
  3415. <div class="row">
  3416. <div class="col-sm-6 col-xs-12">
  3417. <?php
  3418. buildColorSchemeColorpicker('navbarBrandHoverColor', 'navbarBrandHoverColor', $modsForHesk_settings['navbarBrandHoverColor'], 'Help');
  3419. ?>
  3420. </div>
  3421. <div class="col-sm-6 col-xs-12">
  3422. <?php
  3423. buildColorSchemeColorpicker('navbarItemTextColor', 'navbarItemTextColor', $modsForHesk_settings['navbarItemTextColor'], 'Help');
  3424. ?>
  3425. </div>
  3426. </div>
  3427. <div class="row">
  3428. <div class="col-sm-6 col-xs-12">
  3429. <?php
  3430. buildColorSchemeColorpicker('navbarItemTextHoverColor', 'navbarItemTextHoverColor', $modsForHesk_settings['navbarItemTextHoverColor'], 'Help');
  3431. ?>
  3432. </div>
  3433. <div class="col-sm-6 col-xs-12">
  3434. <?php
  3435. buildColorSchemeColorpicker('navbarItemTextSelectedColor', 'navbarItemTextSelectedColor', $modsForHesk_settings['navbarItemTextSelectedColor'], 'Help');
  3436. ?>
  3437. </div>
  3438. </div>
  3439. <div class="row">
  3440. <div class="col-sm-6 col-xs-12">
  3441. <?php
  3442. buildColorSchemeColorpicker('navbarItemSelectedBackgroundColor', 'navbarItemSelectedBackgroundColor', $modsForHesk_settings['navbarItemSelectedBackgroundColor'], 'Help');
  3443. ?>
  3444. </div>
  3445. <div class="col-sm-6 col-xs-12">
  3446. <?php
  3447. buildColorSchemeColorpicker('dropdownItemTextColor', 'dropdownItemTextColor', $modsForHesk_settings['dropdownItemTextColor'], 'Help');
  3448. ?>
  3449. </div>
  3450. </div>
  3451. <div class="row">
  3452. <div class="col-sm-6 col-xs-12">
  3453. <?php
  3454. buildColorSchemeColorpicker('dropdownItemTextHoverColor', 'dropdownItemTextHoverColor', $modsForHesk_settings['dropdownItemTextHoverColor'], 'Help');
  3455. ?>
  3456. </div>
  3457. <div class="col-sm-6 col-xs-12">
  3458. <div class="form-group">
  3459. <label for="bootswatch-theme"
  3460. class="col-sm-4 col-xs-6 control-label"><?php echo $hesklang['bootswatch_theme']; ?>
  3461. </label>
  3462. <div class="col-sm-8 col-xs-6">
  3463. <select name="bootswatch-theme" id="bootswatch-theme" class="form-control">
  3464. <option value="DEFAULT">Default</option>
  3465. <?php
  3466. $bootswatch_themes = json_decode(file_get_contents("https://bootswatch.com/api/3.json"), TRUE)['themes'];
  3467. foreach ($bootswatch_themes as $theme) {
  3468. $themename = $theme['name'];
  3469. $themedesc = $theme['description'];
  3470. $themeurl = $theme['cssCdn'];
  3471. $selected = "";
  3472. if ($modsForHesk_settings['bootswatch_theme'] == $themeurl) {
  3473. $selected = " selected";
  3474. }
  3475. echo "<option value=\"$themeurl\"$selected>$themename: $themedesc</option>";
  3476. }
  3477. ?>
  3478. </select>
  3479. </div>
  3480. </div>
  3481. </div>
  3482. </div>
  3483. <div class="row">
  3484. <div class="col-sm-6 col-xs-12">
  3485. <?php
  3486. buildColorSchemeColorpicker('dropdownItemTextHoverBackgroundColor', 'dropdownItemTextHoverBackgroundColor', $modsForHesk_settings['dropdownItemTextHoverBackgroundColor'], 'Help');
  3487. ?>
  3488. </div>
  3489. </div>
  3490. <h4><?php echo $hesklang['admin_panel']; ?></h4>
  3491. <div class="row">
  3492. <div class="col-xs-12">
  3493. <div class="form-group">
  3494. <label for="admin-color-scheme"
  3495. class="col-sm-3 col-xs-5 control-label"><?php echo $hesklang['color_preset']; ?>
  3496. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3497. data-placement="left"
  3498. title="<?php echo $hesklang['color_preset']; ?>"
  3499. data-content="<?php echo $hesklang['color_preset_help']; ?>"></i>
  3500. </label>
  3501. <div class="col-sm-9 col-xs-7">
  3502. <select name="admin-color-scheme" id="admin-color-scheme" class="form-control">
  3503. <option value="SELECT"><?php echo $hesklang['select_a_preset']; ?></option>
  3504. <option value="blue"><?php echo $hesklang['preset_blue']; ?></option>
  3505. <option value="blue-light"><?php echo $hesklang['preset_blue_light']; ?></option>
  3506. <option value="yellow"><?php echo $hesklang['preset_yellow']; ?></option>
  3507. <option value="yellow-light"><?php echo $hesklang['preset_yellow_light']; ?></option>
  3508. <option value="green"><?php echo $hesklang['preset_green']; ?></option>
  3509. <option value="green-light"><?php echo $hesklang['preset_green_light']; ?></option>
  3510. <option value="purple"><?php echo $hesklang['preset_purple']; ?></option>
  3511. <option value="purple-light"><?php echo $hesklang['preset_purple_light']; ?></option>
  3512. <option value="red"><?php echo $hesklang['preset_red']; ?></option>
  3513. <option value="red-light"><?php echo $hesklang['preset_red_light']; ?></option>
  3514. <option value="black"><?php echo $hesklang['preset_black']; ?></option>
  3515. <option value="black-light"><?php echo $hesklang['preset_black_light']; ?></option>
  3516. </select>
  3517. </div>
  3518. <script>
  3519. $('select[name="admin-color-scheme"]').change(function() {
  3520. var val = $(this).val();
  3521. if (val === 'SELECT') {
  3522. return;
  3523. }
  3524. var lightTheme = val.match(/.+-light/i);
  3525. $('#cpadmin-sidebar-background-color').colorpicker('setValue', lightTheme ? '#f9fafc' : '#222d32');
  3526. $('#cpadmin-sidebar-header-background-color').colorpicker('setValue', lightTheme ? '#f9fafc' : '#1a2226');
  3527. $('#cpadmin-sidebar-text-color').colorpicker('setValue', lightTheme ? '#444' : '#b8c7ce');
  3528. $('#cpadmin-sidebar-header-text-color').colorpicker('setValue', lightTheme ? '#848484' : '#4b646f');
  3529. $('#cpadmin-sidebar-text-hover-color').colorpicker('setValue', lightTheme ? '#444' : '#fff');
  3530. $('#cpadmin-sidebar-background-hover-color').colorpicker('setValue', lightTheme ? '#f4f4f5' : '#1e282c');
  3531. $('input[name="admin-sidebar-font-weight"]').val(lightTheme ? ['bold'] : ['normal']);
  3532. $('#cpadmin-navbar-text-color').colorpicker('setValue', '#fff');
  3533. $('#cpadmin-navbar-text-hover-color').colorpicker('setValue', '#fff');
  3534. $('#cpadmin-navbar-brand-text-color').colorpicker('setValue', '#fff');
  3535. $('#cpadmin-navbar-brand-text-hover-color').colorpicker('setValue', '#fff');
  3536. if (val.match(/blue.*/i)) {
  3537. $('#cpadmin-navbar-background-color').colorpicker('setValue', '#3c8dbc');
  3538. $('#cpadmin-navbar-background-hover-color').colorpicker('setValue', '#367fa9');
  3539. $('#cpadmin-navbar-brand-background-color').colorpicker('setValue', lightTheme ? '#3c8dbc' : '#367fa9');
  3540. $('#cpadmin-navbar-brand-background-hover-color').colorpicker('setValue', lightTheme ? '#3b8ab8' : '#357ca5');
  3541. } else if (val.match(/yellow.*/i)) {
  3542. $('#cpadmin-navbar-background-color').colorpicker('setValue', '#f39c12');
  3543. $('#cpadmin-navbar-background-hover-color').colorpicker('setValue', '#da8c10');
  3544. $('#cpadmin-navbar-brand-background-color').colorpicker('setValue', lightTheme ? '#f39c12' : '#e08e0b');
  3545. $('#cpadmin-navbar-brand-background-hover-color').colorpicker('setValue', lightTheme ? '#f39a0d' : '#db8b0b');
  3546. } else if (val.match(/green.*/i)) {
  3547. $('#cpadmin-navbar-background-color').colorpicker('setValue', '#00a65a');
  3548. $('#cpadmin-navbar-background-hover-color').colorpicker('setValue', '#009551');
  3549. $('#cpadmin-navbar-brand-background-color').colorpicker('setValue', lightTheme ? '#00a65a' : '#008d4c');
  3550. $('#cpadmin-navbar-brand-background-hover-color').colorpicker('setValue', lightTheme ? '#00a157' : '#008749');
  3551. } else if (val.match(/purple.*/i)) {
  3552. $('#cpadmin-navbar-background-color').colorpicker('setValue', '#605ca8');
  3553. $('#cpadmin-navbar-background-hover-color').colorpicker('setValue', '#565397');
  3554. $('#cpadmin-navbar-brand-background-color').colorpicker('setValue', lightTheme ? '#605ca8' : '#555299');
  3555. $('#cpadmin-navbar-brand-background-hover-color').colorpicker('setValue', lightTheme ? '#5d59a6' : '#545096');
  3556. } else if (val.match(/red.*/i)) {
  3557. $('#cpadmin-navbar-background-color').colorpicker('setValue', '#dd4b39');
  3558. $('#cpadmin-navbar-background-hover-color').colorpicker('setValue', '#c64333');
  3559. $('#cpadmin-navbar-brand-background-color').colorpicker('setValue', lightTheme ? '#dd4b39' : '#d73925');
  3560. $('#cpadmin-navbar-brand-background-hover-color').colorpicker('setValue', lightTheme ? '#dc4735' : '#d33724');
  3561. } else {
  3562. //-- Black
  3563. $('#cpadmin-navbar-background-color').colorpicker('setValue', '#fff');
  3564. $('#cpadmin-navbar-background-hover-color').colorpicker('setValue', '#eee');
  3565. $('#cpadmin-navbar-brand-background-color').colorpicker('setValue', '#fff');
  3566. $('#cpadmin-navbar-brand-background-hover-color').colorpicker('setValue', '#fcfcfc');
  3567. }
  3568. });
  3569. </script>
  3570. </div>
  3571. </div>
  3572. </div>
  3573. <div class="row">
  3574. <div class="col-sm-6 col-xs-12">
  3575. <div class="col-sm-5 col-sm-offset-7 col-xs-12">
  3576. <h4><?php echo $hesklang['navbar']; ?></h4>
  3577. </div>
  3578. <?php
  3579. buildColorSchemeColorpicker('admin-navbar-background-color', 'background_color', $modsForHesk_settings['admin_navbar_background']);
  3580. ?>
  3581. </div>
  3582. <div class="col-sm-6 col-xs-12">
  3583. <div class="col-sm-5 col-sm-offset-7 col-xs-12">
  3584. <h4><?php echo $hesklang['navbar_brand']; ?></h4>
  3585. </div>
  3586. <?php
  3587. buildColorSchemeColorpicker('admin-navbar-brand-background-color', 'background_color', $modsForHesk_settings['admin_navbar_brand_background']);
  3588. ?>
  3589. </div>
  3590. </div>
  3591. <div class="row">
  3592. <div class="col-sm-6 col-xs-12">
  3593. <?php
  3594. buildColorSchemeColorpicker('admin-navbar-text-color', 'text_color', $modsForHesk_settings['admin_navbar_text']);
  3595. ?>
  3596. </div>
  3597. <div class="col-sm-6 col-xs-12">
  3598. <?php
  3599. buildColorSchemeColorpicker('admin-navbar-brand-text-color', 'text_color', $modsForHesk_settings['admin_navbar_brand_text']);
  3600. ?>
  3601. </div>
  3602. </div>
  3603. <div class="row">
  3604. <div class="col-sm-6 col-xs-12">
  3605. <?php
  3606. buildColorSchemeColorpicker('admin-navbar-text-hover-color', 'text_hover_color', $modsForHesk_settings['admin_navbar_text_hover']);
  3607. ?>
  3608. </div>
  3609. <div class="col-sm-6 col-xs-12">
  3610. <?php
  3611. buildColorSchemeColorpicker('admin-navbar-brand-text-hover-color', 'text_hover_color', $modsForHesk_settings['admin_navbar_brand_text_hover']);
  3612. ?>
  3613. </div>
  3614. </div>
  3615. <div class="row">
  3616. <div class="col-sm-6 col-xs-12">
  3617. <?php
  3618. buildColorSchemeColorpicker('admin-navbar-background-hover-color', 'background_hover_color', $modsForHesk_settings['admin_navbar_background_hover']);
  3619. ?>
  3620. </div>
  3621. <div class="col-sm-6 col-xs-12">
  3622. <?php
  3623. buildColorSchemeColorpicker('admin-navbar-brand-background-hover-color', 'background_hover_color', $modsForHesk_settings['admin_navbar_brand_background_hover']);
  3624. ?>
  3625. </div>
  3626. </div>
  3627. <div class="row">
  3628. <div class="col-sm-6 col-xs-12">
  3629. <div class="col-sm-5 col-sm-offset-7 col-xs-12">
  3630. <h4><?php echo $hesklang['sidebar']; ?></h4>
  3631. </div>
  3632. <?php
  3633. buildColorSchemeColorpicker('admin-sidebar-background-color', 'background_color', $modsForHesk_settings['admin_sidebar_background']);
  3634. ?>
  3635. </div>
  3636. <div class="col-sm-6 col-xs-12">
  3637. <div class="col-sm-5 col-sm-offset-7 col-xs-12">
  3638. <h4><?php echo $hesklang['sidebar_header']; ?></h4>
  3639. </div>
  3640. <?php
  3641. buildColorSchemeColorpicker('admin-sidebar-header-background-color', 'background_color', $modsForHesk_settings['admin_sidebar_header_background']);
  3642. ?>
  3643. </div>
  3644. </div>
  3645. <div class="row">
  3646. <div class="col-sm-6 col-xs-12">
  3647. <?php
  3648. buildColorSchemeColorpicker('admin-sidebar-text-color', 'text_color', $modsForHesk_settings['admin_sidebar_text']);
  3649. ?>
  3650. </div>
  3651. <div class="col-sm-6 col-xs-12">
  3652. <?php
  3653. buildColorSchemeColorpicker('admin-sidebar-header-text-color', 'text_color', $modsForHesk_settings['admin_sidebar_header_text']);
  3654. ?>
  3655. </div>
  3656. </div>
  3657. <div class="row">
  3658. <div class="col-sm-6 col-xs-12">
  3659. <?php
  3660. buildColorSchemeColorpicker('admin-sidebar-text-hover-color', 'text_hover_color', $modsForHesk_settings['admin_sidebar_text_hover']);
  3661. ?>
  3662. </div>
  3663. </div>
  3664. <div class="row">
  3665. <div class="col-sm-6 col-xs-12">
  3666. <?php
  3667. buildColorSchemeColorpicker('admin-sidebar-background-hover-color', 'background_hover_color', $modsForHesk_settings['admin_sidebar_background_hover']);
  3668. ?>
  3669. </div>
  3670. </div>
  3671. <div class="row">
  3672. <div class="col-sm-6 col-xs-12">
  3673. <div class="form-group">
  3674. <label for="admin-sidebar-font-weight"
  3675. class="col-sm-7 col-xs-12 control-label"><?php echo $hesklang['font_weight']; ?>
  3676. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3677. data-placement="top"
  3678. title="<?php echo $hesklang['font_weight']; ?>"
  3679. data-content="<?php echo $hesklang['font_weight_help']; ?>"></i>
  3680. </label>
  3681. <div class="col-sm-5 col-xs-12 form-inline">
  3682. <div class="radio">
  3683. <label>
  3684. <input type="radio" name="admin-sidebar-font-weight" value="normal"
  3685. <?php echo $modsForHesk_settings['admin_sidebar_font_weight'] == 'normal' ? 'checked' : ''; ?>>
  3686. <?php echo $hesklang['normal']; ?>
  3687. </label>
  3688. </div><br>
  3689. <div class="radio">
  3690. <label>
  3691. <input type="radio" name="admin-sidebar-font-weight" value="bold"
  3692. <?php echo $modsForHesk_settings['admin_sidebar_font_weight'] == 'bold' ? 'checked' : ''; ?>>
  3693. <?php echo $hesklang['bold']; ?>
  3694. </label>
  3695. </div>
  3696. </div>
  3697. </div>
  3698. </div>
  3699. </div>
  3700. <h4><?php echo $hesklang['login_page']; ?></h4>
  3701. <div class="row">
  3702. <div class="col-xs-12">
  3703. <div class="form-group">
  3704. <label for="login-background" class="col-sm-3 col-xs-5 control-label">
  3705. <?php echo $hesklang['login_background']; ?>
  3706. </label>
  3707. <div class="col-sm-9 col-xs-7 form-inline">
  3708. <div class="radio">
  3709. <label>
  3710. <input type="radio" name="login-background"
  3711. data-activate="input[name='login-background-color']" data-deactivate="input[name='login-background-image']"
  3712. value="color" <?php if ($modsForHesk_settings['login_background_type'] == 'color') { echo 'checked'; } ?>>
  3713. <?php echo $hesklang['solid_color']; ?>
  3714. </label>
  3715. </div>&nbsp;&nbsp;&nbsp;
  3716. <input title="<?php echo $hesklang['login_background_color']; ?>" type="text"
  3717. name="login-background-color" class="form-control"
  3718. <?php if ($modsForHesk_settings['login_background_type'] == 'image') { echo 'disabled'; } ?>>
  3719. <br>
  3720. <div class="radio">
  3721. <label>
  3722. <input type="radio" name="login-background"
  3723. data-activate="input[name='login-background-image']" data-deactivate="input[name='login-background-color']"
  3724. value="image" <?php if ($modsForHesk_settings['login_background_type'] == 'image') { echo 'checked'; } ?>>
  3725. <?php echo $hesklang['image']; ?>
  3726. </label>
  3727. </div>
  3728. <input title="<?php echo $hesklang['login_background_image']; ?>" type="file" name="login-background-image" style="display: inline;vertical-align: bottom" <?php if ($modsForHesk_settings['login_background_type'] == 'color') { echo 'disabled'; } ?>>
  3729. <?php if ($modsForHesk_settings['login_background_type'] == 'image'): ?>
  3730. <br>
  3731. <img src="<?php echo HESK_PATH . $hesk_settings['cache_dir']; ?>/lb_<?php echo $modsForHesk_settings['login_background']; ?>" alt="<?php echo $hesklang['login_background']; ?>" title="<?php echo $hesklang['login_background']; ?>" height="125" width="125" class="push-down-10">
  3732. <?php endif; ?>
  3733. <script type="text/javascript">
  3734. $('input[name="login-background-color"]').colorpicker({
  3735. format: 'hex',
  3736. color: <?php if ($modsForHesk_settings['login_background_type'] == 'color') { echo "'{$modsForHesk_settings['login_background']}'"; } else { echo 'false'; } ?>
  3737. });
  3738. </script>
  3739. </div>
  3740. </div>
  3741. </div>
  3742. </div>
  3743. <div class="row">
  3744. <div class="col-xs-12">
  3745. <div class="form-group">
  3746. <label for="login-box-header" class="col-sm-3 col-xs-5 control-label">
  3747. <?php echo $hesklang['login_box_header']; ?>
  3748. </label>
  3749. <div class="col-sm-9 col-xs-7 form-inline">
  3750. <div class="radio">
  3751. <label>
  3752. <input type="radio" name="login-box-header" value="helpdesk-title" data-deactivate="input[name='login-box-header-image']" <?php if ($modsForHesk_settings['login_box_header'] == 'helpdesk-title') { echo 'checked'; } ?>>
  3753. <?php echo $hesklang['hesk_title']; ?>
  3754. </label>
  3755. </div><br>
  3756. <div class="radio">
  3757. <label>
  3758. <input type="radio" name="login-box-header" value="image" data-activate="input[name='login-box-header-image']" <?php if ($modsForHesk_settings['login_box_header'] == 'image') { echo 'checked'; } ?>>
  3759. <?php echo $hesklang['image']; ?>
  3760. </label>
  3761. <input title="<?php echo $hesklang['login_header_image']; ?>" type="file" name="login-box-header-image" style="display: inline;vertical-align: bottom" <?php if ($modsForHesk_settings['login_box_header'] == 'helpdesk-title') { echo 'disabled'; } ?>>
  3762. <?php if ($modsForHesk_settings['login_box_header'] == 'image'): ?>
  3763. <br>
  3764. <img src="<?php echo HESK_PATH . $hesk_settings['cache_dir']; ?>/lbh_<?php echo $modsForHesk_settings['login_box_header_image']; ?>" title="<?php echo $modsForHesk_settings['login_box_header_image']; ?>" alt="<?php echo $modsForHesk_settings['login_box_header_image']; ?>" style="height: 75px" class="push-down-10">
  3765. <?php endif; ?>
  3766. </div>
  3767. </div>
  3768. </div>
  3769. </div>
  3770. </div>
  3771. </div>
  3772. </div>
  3773. <div class="form-group" style="margin-left: 10px">
  3774. <input type="hidden" name="token" value="<?php hesk_token_echo(); ?>"/>
  3775. <?php
  3776. if ($enable_save_settings) {
  3777. echo '<input type="submit" id="submitbutton" value="' . $hesklang['save_changes'] . '" class="btn btn-default" />';
  3778. } else {
  3779. echo '<input type="button" value="' . $hesklang['save_changes'] . ' (' . $hesklang['disabled'] . ')" class="btn btn-default" disabled="disabled" /><br /><font class="error">' . $hesklang['e_save_settings'] . '</font>';
  3780. }
  3781. ?>
  3782. </div>
  3783. </form>
  3784. </section>
  3785. </div>
  3786. <?php
  3787. require_once(HESK_PATH . 'inc/footer.inc.php');
  3788. exit();
  3789. function buildColorSchemeColorpicker($field_name, $label_key, $color, $help_suffix = '_help') {
  3790. global $hesklang;
  3791. echo '
  3792. <div class="form-group">
  3793. <label for="admin-navbar-background-color"
  3794. class="col-sm-7 col-xs-12 control-label">'. $hesklang[$label_key] . '
  3795. <i class="fa fa-question-circle settingsquestionmark" data-toggle="popover"
  3796. data-placement="top"
  3797. title="' . htmlspecialchars($hesklang[$label_key]) . '"
  3798. data-content="' . htmlspecialchars($hesklang[$label_key . $help_suffix]) . '"></i>
  3799. </label>
  3800. <div class="col-sm-5 col-xs-12">
  3801. <div id="cp' . $field_name . '" class="input-group">
  3802. <input type="text" id="' . $field_name . '" name="' . $field_name . '"
  3803. class="form-control"
  3804. value="' . $color . '">
  3805. <span class="input-group-addon"><i></i></span>
  3806. </div>
  3807. </div>
  3808. </div>
  3809. <script>
  3810. $("#cp' . $field_name . '").colorpicker({
  3811. color: "' . $color . '",
  3812. format: "hex"
  3813. });
  3814. </script>
  3815. ';
  3816. }
  3817. function hesk_testLanguage($return_options = 0)
  3818. {
  3819. global $hesk_settings, $hesklang, $modsForHesk_settings;
  3820. /* Get a list of valid emails */
  3821. include_once(HESK_PATH . 'inc/email_functions.inc.php');
  3822. $valid_emails = array_keys(hesk_validEmails());
  3823. $dir = HESK_PATH . 'language/';
  3824. $path = opendir($dir);
  3825. $text = '';
  3826. $html = '';
  3827. $text .= "/language\n";
  3828. /* Test all folders inside the language folder */
  3829. while (false !== ($subdir = readdir($path))) {
  3830. if ($subdir == "." || $subdir == "..") {
  3831. continue;
  3832. }
  3833. if (filetype($dir . $subdir) == 'dir') {
  3834. $add = 1;
  3835. $langu = $dir . $subdir . '/text.php';
  3836. $email = $dir . $subdir . '/emails';
  3837. /* Check the text.php */
  3838. $text .= " |-> /$subdir\n";
  3839. $text .= " |-> text.php: ";
  3840. if (file_exists($langu)) {
  3841. $tmp = file_get_contents($langu);
  3842. // Some servers add slashes to file_get_contents output
  3843. if (strpos($tmp, '[\\\'LANGUAGE\\\']') !== false) {
  3844. $tmp = stripslashes($tmp);
  3845. }
  3846. $err = '';
  3847. if (!preg_match('/\$hesklang\[\'LANGUAGE\'\]\=\'(.*)\'\;/', $tmp, $l)) {
  3848. $err .= " |----> MISSING: \$hesklang['LANGUAGE']\n";
  3849. }
  3850. if (strpos($tmp, '$hesklang[\'ENCODING\']') === false) {
  3851. $err .= " |----> MISSING: \$hesklang['ENCODING']\n";
  3852. }
  3853. if (strpos($tmp, '$hesklang[\'_COLLATE\']') === false) {
  3854. $err .= " |----> MISSING: \$hesklang['_COLLATE']\n";
  3855. }
  3856. if (strpos($tmp, '$hesklang[\'EMAIL_HR\']') === false) {
  3857. $err .= " |----> MISSING: \$hesklang['EMAIL_HR']\n";
  3858. }
  3859. /* Check if language file is for current version */
  3860. if (strpos($tmp, '$hesklang[\'LANGUAGE_EN\']') === false) {
  3861. $err .= " |----> WRONG VERSION (not " . $hesk_settings['hesk_version'] . ")\n";
  3862. }
  3863. if ($err) {
  3864. $text .= "ERROR\n" . $err;
  3865. $add = 0;
  3866. } else {
  3867. $l[1] = hesk_input($l[1]);
  3868. $l[1] = str_replace('|', ' ', $l[1]);
  3869. $text .= "OK ($l[1])\n";
  3870. }
  3871. } else {
  3872. $text .= "ERROR\n";
  3873. $text .= " |----> MISSING: text.php\n";
  3874. $add = 0;
  3875. }
  3876. /* Check emails folder */
  3877. $text .= " |-> /emails: ";
  3878. if (file_exists($email) && filetype($email) == 'dir') {
  3879. $err = '';
  3880. foreach ($valid_emails as $eml) {
  3881. if (!file_exists($email . '/' . $eml . '.txt')) {
  3882. $err .= " |----> MISSING: $eml.txt\n";
  3883. }
  3884. }
  3885. if ($err) {
  3886. $text .= "ERROR\n" . $err;
  3887. $add = 0;
  3888. } else {
  3889. $text .= "OK\n";
  3890. }
  3891. } else {
  3892. $text .= "ERROR\n";
  3893. $text .= " |----> MISSING: /emails folder\n";
  3894. $add = 0;
  3895. }
  3896. $text .= "\n";
  3897. /* Add an option for the <select> if needed */
  3898. if ($add) {
  3899. if ($l[1] == $hesk_settings['language']) {
  3900. $html .= '<option value="' . $subdir . '|' . $l[1] . '" selected="selected">' . $l[1] . '</option>';
  3901. } else {
  3902. $html .= '<option value="' . $subdir . '|' . $l[1] . '">' . $l[1] . '</option>';
  3903. }
  3904. }
  3905. }
  3906. }
  3907. closedir($path);
  3908. /* Output select options or the test log for debugging */
  3909. if ($return_options) {
  3910. return $html;
  3911. } else {
  3912. ?>
  3913. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML; 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3914. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  3915. <head>
  3916. <title><?php echo $hesklang['s_inl']; ?></title>
  3917. <meta http-equiv="Content-Type" content="text/html;charset=<?php echo $hesklang['ENCODING']; ?>"/>
  3918. <style type="text/css">
  3919. body {
  3920. margin: 5px 5px;
  3921. padding: 0;
  3922. background: #fff;
  3923. color: black;
  3924. font: 68.8%/1.5 Verdana, Geneva, Arial, Helvetica, sans-serif;
  3925. text-align: left;
  3926. }
  3927. p {
  3928. color: black;
  3929. font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  3930. font-size: 1.0em;
  3931. }
  3932. h3 {
  3933. color: #AF0000;
  3934. font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  3935. font-weight: bold;
  3936. font-size: 1.0em;
  3937. text-align: center;
  3938. }
  3939. .title {
  3940. color: black;
  3941. font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  3942. font-weight: bold;
  3943. font-size: 1.0em;
  3944. }
  3945. .wrong {
  3946. color: red;
  3947. }
  3948. .correct {
  3949. color: green;
  3950. }
  3951. pre {
  3952. font-size: 1.2em;
  3953. }
  3954. </style>
  3955. </head>
  3956. <body>
  3957. <h3><?php echo $hesklang['s_inl']; ?></h3>
  3958. <p><i><?php echo $hesklang['s_inle']; ?></i></p>
  3959. <pre><?php echo $text; ?></pre>
  3960. <p>&nbsp;</p>
  3961. <p align="center"><a
  3962. href="admin_settings.php?test_languages=1&amp;<?php echo rand(10000, 99999); ?>"><?php echo $hesklang['ta']; ?></a>
  3963. | <a href="#" onclick="Javascript:window.close()"><?php echo $hesklang['cwin']; ?></a></p>
  3964. <p>&nbsp;</p>
  3965. </body>
  3966. </html>
  3967. <?php
  3968. exit();
  3969. }
  3970. } // END hesk_testLanguage()
  3971. ?>