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 247KB

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