📄 basic_config.php
字号:
}
}
echo get_javascript('selectAdd.js');
?>
<br /><br />
<table cellpadding="4" cellspacing="0" align="center" width="90%">
<tr><td align="center"><b>Control your Categories</b></td><td align="center"><b>Control Your Priorities</b></td></tr>
<tr><td align="center">
<select name="category_list[]" size="10" multiple="multiple" style="width:200px" id="category_list">
<?php echo $html_cat ?>
</select>
<p align="center">
<input name="Button" type="button" onClick="return removeFrom('category_add', 'category_list')" value="Remove">
</p>
<input type="input" name="category_add" id="category_add">
<input type="button" name="addc" value="Add Category" onclick="addElement('category_add', 'category_list')">
</td><td align="center">
<select name="priority_list[]" size="10" multiple="multiple" style="width:200px" id="priority_list">
<?php echo $html_pri?>
</select>
<p align="center">
<input name="Button" type="button" onClick="return removeFrom('priority_add', 'priority_list')" value="Remove">
<br /> <br />
<input type="input" name="priority_add" id="priority_add">
<input type="button" name="addc" value="Add Priority" onclick="addElement('priority_add', 'priority_list')">
</td></tr></table><br /><br />
<?php
$submit_extra = "onclick=\"selectSubmit('priority_list');selectSubmit('category_list')\"";
}
############################### EMAIL GATEWAY ###############################
if ($step == 6) {
echo table_border("
<b>STEP 6:</b> The following settings control the installation of the email gateway. The email gateway is a system whereby users can create and reply to tickets via email. There is a lot of documentation about the email gateway in the admin manual. The following settings determine how the email gateway will work.
");
show_settings('
basic_config.php',
'',
false,
array('use_email', 'email_tech', 'email_return'),
false,
$extra
);
}
############################### SMTP ###############################
if ($step == 5) {
if (($_REQUEST['submit'] OR $_REQUEST['smtp_send_test']) AND $settings['use_smtp']) {
if (!validate_email($_REQUEST['test_email'])) {
alert('You have not entered a valid test email address');
$step = 4;
} else {
require_once(INCLUDE_PATH . 'functions/mail/class_smtp.php');
require_once(INCLUDE_PATH . 'functions/mail/class_htmlMimeMail.php');
require_once(INCLUDE_PATH . 'functions/mail/class_mimePart.php');
require_once(INCLUDE_PATH . 'functions/mail/class_RFC822.php');
$mail = new htmlMimeMail();
$body = "This is a test message sent by the DeskPRO installation system.\r\nIt can be safely deleted.";
$to = array($_REQUEST['test_email']);
$from = $settings['email_from'];
$subject = "DeskPRO SMTP Test Mail";
$mail->setSMTPParams($settings['smtp_host'], $settings['smtp_port'], $settings['smtp_helo'], FALSE, $settings['smtp_user'], $settings['smtp_pass']);
$mail->setText(wordwrap(trim($body), 79));
$mail->setReturnPath($_REQUEST['settings']['email_from']);
$mail->setCrlf("\r\n");
$mail->setFrom($from);
$mail->setSubject(trim($subject));
$mail->setHeader('X-Mailer', 'DeskPRO Nullified');
$result = $mail->send($to, 'smtp');
if ($result) {
// set that we are using SMTP mailing
$db->query("UPDATE settings SET value = '1' WHERE settings = 'use_smtp'");
echo table_border("
<b>STEP 5:</b> We have just tested sending email through your server and found no errors.<br /><br />You should confirm that you received an email at $_REQUEST[test_email].<ul><li>If you have then email sending is working and you can continue to the next step.</li><li>If you did not receive an email you can :<ul><li><a href=\"basic_config.php?curconfig=5\">Try this step again</a></li><li>Manually configure your <a href=\"basic_config.php?curconfig=5&type=smtp\">SMTP settings</a></li></ul></li></ul>
") . "<br />";
} else {
echo table_border("
<b>STEP 5:</b> The mail could not be sent. Any error messages received by DeskPRO during the attempt are shown below:<br /><br />" . join('<br />', $mail->errors) . "<br /><br />If the server couldn't be contacted, or if it requires you to authenticate before it will permit you to send mail, you should manually configure your SMTP settings. You can <A href=\"basic_config.php?curconfig=5\">try this step again</A> or you can manually configure your <A href=\"basic_config.php?curconfig=5&type=smtp\">SMTP settings</A>.") . "<br />";
}
}
} elseif (!$_REQUEST['type']) {
echo form_hidden('smtp_override', '1');
echo form_hidden('smtp_manual', '1');
echo table_border("
<b>STEP 5:</b> We are now going to test your servers ability to send mail. If you wish to manually enter your SMTP settings or to disable sending mail via STMP please click <a href=\"basic_config.php?curconfig=5&type=smtp\">here</a>.
");
$extra[] = array('Test Email Address', 'Please enter an email address we can send a test email to. This will test that your server is properly sending email', form_input('test_email'), form_hidden('smtp_send_test', '1'));
show_settings('
basic_config.php',
'',
false,
'sdsdfsdf',
false,
$extra
);
} elseif ($_REQUEST['type'] == 'smtp') {
echo form_hidden('smtp_override', '1');
echo table_border("
<b>STEP 5:</b> These settings control the way mail is sent by DeskPRO. It is possible that PHP (the language DeskPRO is written in) is already set up to send mail through a setting in the php.ini file. Even if this is the case it is recommended that you use the internal SMTP settings provided below. This allows DeskPRO complete control over the email sent, is more efficient and of particular importance allows us to set the return-path header in emails sent.
");
$extra[] = array('Test Email Address', 'Please enter an email address we can send a test email to. This will test that your server is properly sending email', form_input('test_email'), form_hidden('smtp_send_test', '1'));
show_settings('
basic_config.php',
'SMTP Settings',
false,
'',
false,
$extra
);
}
}
############################### EMAILS ###############################
if ($step == 4) {
echo table_border("
<b>STEP 4:</b> The following sets configure certain email addresses that are important for DeskPRO to be able to send emails correctly. Please note that you <b>should</b> have an internet connection avaliable at this point because we will run an email test before loading the next page.
");
$extra[] = array('Test Email Address', 'Please enter an email address we can send a test email to. This will test that your server is properly sending email', form_input('test_email'), form_hidden('smtp_send_test', '1'));
show_settings('
basic_config.php',
'',
false,
array('technical_email', 'email_bounce', 'email_from_name', 'email_from', 'email_offemail'),
false,
$extra
);
}
############################### LANGUAGES ###############################
if ($step == 3) {
echo table_border("
<b>STEP 3:</b> These settings control your language options. The default option is to enable multiple languages. The advantage of doing this is that your customers can use DeskPRO in their own language. Enabling multiple languages will result in you being asked to enter certain text in other languages (for example category names) however this is always optional. If DeskPRO does not have a translation for a certain piece of text it will simpy use the default.<br /><br />
It is also important that you specify your Default Language. This is the language that will be automatically presented to your users who have made no language preference. You can disable multiple languages but set your default language as any option you wish.<br /><br />
If the language you wish to use is not listed this means that a language pack has not been created for this language. You can either contact DeskPRO staff to arrange for a translation or translate the necessary files yourself. Details on doing this are available in the admin manual. Once the translation is completed you could come back and modidy your choice of default language.
");
$languages = $db->query_return_array_id("SELECT id, name FROM languages", 'name');
$extra[] = array('Default Language', 'Choose the default language to show to users who have not choosen a language.', form_select('default_language', $languages, 'settings', $settings['default_language']));
show_settings('
basic_config.php',
'',
false,
array('language_on'),
false,
$extra
);
}
############################### TIMEZONE ###############################
if ($step == 2) {
echo table_border("
<b>STEP 2:</b> The following settings configure the timezone you wish your installation of DeskPRO to default to.
");
show_settings('
basic_config.php',
'',
false,
array('timezone', 'timezone_offset'),
false,
$extra
);
}
############################### 1: PATHS / NAMES ###############################
if ($step == 1) {
echo table_border("
<B>STEP 1:</B>
Welcome to the DeskPRO Basic Configuration System. This process is a number of steps that guides you through setting up everything you need to get DeskPRO up and running. Once you have completed the Basic Configuration there are a whole range of further configurations you can make but this process will set everything you need to open up your contact system to your clients.<br /><br />
You can jump to any step you wish and if you need to make changes you can always come back to the basic configuration system. Nothing you specify here is in any way permanent, you can change all options whenever you wish.<br /><br />
<b>STEP 1:</b> These settings control the location of your DeskPRO installation. The information is used to produce correct links to your system. It is very important that these settings are set correctly.");
show_settings('
basic_config.php',
'',
false,
array('site_name', 'helpdesk_url', 'site_url'),
false
);
}
####################################################################################
if (!$submit_name) {
$submit_name = "Update & Continue to Step " . ($step + 1) . " >>";
}
echo form_hidden('curconfig', $step);
echo form_hidden('update_step', 1);
$step++;
if (!$noform) {
echo "<center><input type=\"submit\" $submit_extra name=\"submit\" value=\"$submit_name\"></center>";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -