コード例 #1
0
ファイル: install.php プロジェクト: nyimbi/legalcase
function install_step_4()
{
    global $lcm_lang_left, $lcm_lang_right;
    install_html_start('AUTO', '', 4);
    echo "<h3><small>" . _T('install_step_four') . "</small> " . _T('install_title_admin_account') . "</h3>\n";
    include_config('inc_connect_install');
    echo '<p class="simple_text" align="center">' . _T('install_info_new_account_1') . '<br />' . _T('warning_field_mandatory_all') . ' ' . lcm_help('install_personal') . "</p>\n";
    if (isset($_SESSION['errors'])) {
        echo show_all_errors($_SESSION['errors']);
    }
    echo "<form action='install.php' method='post'>\n";
    echo "<input type='hidden' name='step' value='5' />\n";
    // Your contact information
    echo "<fieldset class=\"fs_box\">\n";
    echo "<p><b>" . _T('info_your_contact_information') . "</b></p>\n";
    // [ML] Altough not most problematic, could be better. But if someone
    // fixes here, please fix lcm_pass.php also (function print_registration_form())
    $name_first = _session('name_first');
    echo "<table border='0' cellpadding='0' cellspacing='5' width='80%'><tr>\n";
    echo "<td>\n\t\t\t<strong><label for='name_first'>" . f_err_star('name_first') . _T('person_input_name_first') . "</label></strong><br />\n\t\t\t<input type='text' style='width: 100%;' id='name_first' name='name_first' value='{$name_first}' size='15' class='txt_lmnt' />\n\t\t</td>\n";
    $name_last = _session('name_last');
    echo "<td>\n\t\t\t<strong><label for='name_last'>" . f_err_star('name_last') . _T('person_input_name_last') . "</label></strong><br />\n\t\t\t<input style='width: 100%;' type='text' id='name_last' name='name_last' value='{$name_last}' size='15' class='txt_lmnt' />\n\t\t</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td colspan='2'>";
    $email = _session('email');
    echo "<b><label for='email'>" . f_err_star('email') . _T('input_email') . "</label></b><br />\n";
    echo "<input style='width: 100%;' type='text' id='email' name='email' value=\"{$email}\" size='40' class='txt_lmnt' />\n";
    echo "</td>\n";
    echo "</tr>\n";
    echo "</table>\n\n";
    // Identifiers
    echo "<p><b>" . _T('input_connection_identifiers') . "</b></p>\n";
    $username = _session('username');
    $password = _session('password');
    $password_confirm = _session('password_confirm');
    echo "<table border='0' cellpadding='0' cellspacing='5' width='80%'>\n";
    echo "<tr>\n";
    echo "<td>";
    echo "<b><label for='username'>" . f_err_star('username') . _T('authoredit_input_username') . "</label></b> \n";
    echo "<small>" . _T('info_more_than_three') . "</small><br />\n";
    echo "<input style='width: 100%;' type='text' id='username' name='username' value='{$username}' size='40' class='txt_lmnt' />\n";
    echo "</td>\n";
    echo "</tr><tr>\n";
    echo "<td>";
    echo "<b><label for='password'>" . f_err_star('password') . _T('authorconf_input_password') . "</label></b> \n";
    echo "<small>" . _T('info_more_than_five') . "</small><br />\n";
    echo "<input style='width: 100%;' type='password' id='password' name='password' value='{$password}' size='40' class='txt_lmnt' />\n";
    echo "</td>\n";
    echo "</tr><tr>\n";
    echo "<td>";
    echo "<b><label for='password_confirm'>" . f_err_star('password') . _T('authorconf_input_password_confirm') . "</label></b> \n";
    echo "<input style='width: 100%;' type='password' id='password_confirm' name='password_confirm' value='{$password_confirm}' size='40' class='txt_lmnt' />\n";
    echo "</td>\n";
    echo "</tr>\n";
    echo "</table>\n";
    // Offer to subscribe to the news/announcements mailing-list
    if (server_can_send_email()) {
        echo "<p align=\"{$lcm_lang_left}\">" . f_err_star('getnews') . get_yes_no('getnews', _session('getnews')) . '<label for="getnews">' . _T('install_info_subscribe_to_news_list') . '</label>' . "</p>\n";
    }
    echo "</fieldset>\n\n";
    echo "<br /><div align=\"{$lcm_lang_right}\">" . "<button type='submit' name='validate'>" . _T('button_next') . " >></button>&nbsp;" . "</div>\n";
    echo "</form>";
    install_html_end();
    $_SESSION['errors'] = array();
    $_SESSION['form_data'] = array();
}
コード例 #2
0
ファイル: template_edit.php プロジェクト: sgh1986915/php-crm
                <input type="text" name="description" style="width: 350px;" id="description" value="<?php 
echo htmlspecialchars($template['description']);
?>
" />
            </td>
        </tr>
        <tr id="wysiwyg">
            <th>
                <?php 
echo _l('WYSIWYG');
?>

            </th>
            <td>
                <?php 
echo print_select_box(get_yes_no(), 'wysiwyg', isset($template['wysiwyg']) ? $template['wysiwyg'] : 0, '', false);
?>
 (advanced setting, don't change unless you know what you're doing)
            </td>
        </tr>
        <tr>
            <th>
                <?php 
echo _l('Default Text');
?>

            </th>
            <td valign="top">
                <textarea name="content" id="template_content" rows="10" cols="30" style="width:450px; height: 350px;"><?php 
echo htmlspecialchars($template['content']);
?>
コード例 #3
0
    ?>
</th>
                        <td>
                            <?php 
    echo htmlspecialchars($member['email']);
    ?>
                        </td>
                    </tr>
                    <tr>
                        <th><?php 
    _e('Receive Email');
    ?>
</th>
                        <td>
                            <?php 
    echo print_select_box(get_yes_no(), 'receive_email[' . $member['newsletter_member_id'] . ']', isset($member['receive_email']) ? $member['receive_email'] : 1, '', false);
    ?>
                            <input type="submit" name="save" value="<?php 
    _e('Save');
    ?>
" class="submit_button">
                        </td>
                    </tr>
                    <tr>
                        <th class="width1"><?php 
    _e('Member Subscribed');
    ?>
</th>
                        <td>
                            <?php 
    echo print_date($member['join_date']);
コード例 #4
0
ファイル: extra_settings.php プロジェクト: sgh1986915/php-crm
    ?>
</th>
            <th><?php 
    echo _l('Order');
    ?>
</th>
            <th><?php 
    echo _l('Searchable');
    ?>
</th>
        </tr>
        </thead>
        <tbody>
            <?php 
    $c = 0;
    $yn = get_yes_no();
    foreach ($extra_defaults as $owner_table => $owner_table_defaults) {
        foreach ($owner_table_defaults as $owner_table_default) {
            ?>
                <tr class="<?php 
            echo $c++ % 2 ? "odd" : "even";
            ?>
">
                    <td>
                        <?php 
            echo htmlspecialchars($owner_table);
            ?>
                    </td>
                    <td class="row_action" nowrap="">
                        <?php 
            echo module_extra::link_open_extra_default($owner_table_default['extra_default_id'], true);
コード例 #5
0
<?php

/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if (module_user::can_i('edit', 'Staff Settings', 'Config')) {
    $fieldset_data = array('heading' => array('type' => 'h3', 'title' => 'Staff Settings', 'help' => 'A staff member is someone who can be assigned to a Job, Job Task or Customer. '), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array());
    $fieldset_data['elements']['is_staff'] = array('title' => _l('Staff Member'), 'fields' => array(array('type' => 'select', 'options' => get_yes_no(), 'blank' => false, 'name' => 'is_staff', 'value' => isset($user['is_staff']) && $user['is_staff'] >= 0 ? $user['is_staff'] : (module_user::is_staff_member($user_id) ? '1' : '0'), 'help' => 'If the user is a staff member they will display in the staff drop down list.')));
    $fieldset_data['elements']['split_hours'] = array('title' => _l('Split Pricing'), 'fields' => array(array('type' => 'select', 'options' => get_yes_no(), 'blank' => false, 'name' => 'split_hours', 'value' => isset($user['split_hours']) && $user['split_hours'] >= 0 ? $user['split_hours'] : '0', 'help' => 'Will this user have a different hourly rate than what is entered on a Job? e.g. If this user is a contractor and will be paid a different amount to what the customer is charged for the project.')));
    $fieldset_data['elements']['hourly_rate'] = array('title' => _l('Hourly Rate'), 'fields' => array(array('type' => 'currency', 'name' => 'hourly_rate', 'value' => isset($user['hourly_rate']) ? $user['hourly_rate'] : '', 'help' => 'The default hourly rate this staff member will receive when working on jobs (can be changed per job).')));
    echo module_form::generate_fieldset($fieldset_data);
}
コード例 #6
0
ファイル: kloxo-installer.php プロジェクト: zseand/kloxo
function lxins_main()
{
    global $argv, $downloadserver;
    $opt = parse_opt($argv);
    $dir_name = dirname(__FILE__);
    $installtype = $opt['install-type'];
    $installversion = isset($opt['version']) ? $opt['version'] : null;
    $dbroot = "root";
    $dbpass = "";
    $osversion = find_os_version();
    $arch = `arch`;
    $arch = trim($arch);
    //--- Create temporary flags for install
    system("mkdir -p /var/cache/kloxo/");
    system("echo 1 > /var/cache/kloxo/kloxo-install-firsttime.flg");
    if (!char_search_beg($osversion, "centos") && !char_search_beg($osversion, "rhel")) {
        print "Kloxo is only supported on CentOS 5 and RHEL 5\n";
        exit;
    }
    if (file_exists("/usr/local/lxlabs/kloxo")) {
        //--- Ask Reinstall
        if (get_yes_no("Kloxo seems already installed do you wish to continue?") == 'n') {
            print "Installation Aborted.\n";
            exit;
        }
    } else {
        //--- Ask License
        if (get_yes_no("Kloxo is using AGPL-V3.0 License, do you agree with the terms?") == 'n') {
            print "You did not agree to the AGPL-V3.0 license terms.\n";
            print "Installation aborted.\n\n";
            exit;
        } else {
            print "Installing Kloxo = YES\n\n";
        }
    }
    //--- Ask for InstallApp
    print "InstallApp: PHP Applications like PHPBB, WordPress, Joomla etc\n";
    print "When you choose Yes, be aware of downloading about 350Mb of data!\n";
    if (get_yes_no("Do you want to install the InstallAPP sotfware?") == 'n') {
        print "Installing InstallApp = NO\n";
        print "You can install it later with /script/installapp-update\n\n";
        $installappinst = false;
        //--- Temporary flag so InstallApp won't be installed
        system("echo 1 > /var/cache/kloxo/kloxo-install-disableinstallapp.flg");
    } else {
        print "Installing InstallApp = YES\n\n";
        $installappinst = true;
    }
    print "Adding System users and groups (nouser, nogroup and lxlabs, lxlabs)\n";
    system("groupadd nogroup");
    system("useradd nouser -g nogroup -s '/sbin/nologin'");
    system("groupadd lxlabs");
    system("useradd lxlabs -g lxlabs -s '/sbin/nologin'");
    print "Installing LxCenter yum repository for updates\n";
    install_yum_repo($osversion);
    $packages = array("sendmail", "sendmail-cf", "sendmail-doc", "sendmail-devel", "exim", "vsftpd", "postfix", "vpopmail", "qmail", "lxphp", "lxzend", "pure-ftpd", "imap");
    $list = implode(" ", $packages);
    print "Removing packages {$list}...\n";
    foreach ($packages as $package) {
        exec("rpm -e --nodeps {$package} > /dev/null 2>&1");
    }
    $packages = array("php-mbstring", "php-mysql", "which", "gcc-c++", "php-imap", "php-pear", "php-devel", "lxlighttpd", "httpd", "mod_ssl", "zip", "unzip", "lxphp", "lxzend", "mysql", "mysql-server", "curl", "autoconf", "automake", "libtool", "bogofilter", "gcc", "cpp", "openssl", "pure-ftpd", "yum-protectbase");
    $list = implode(" ", $packages);
    while (true) {
        print "Installing packages {$list}...\n";
        system("PATH=\$PATH:/usr/sbin yum -y install {$list}", $return_value);
        if (file_exists("/usr/local/lxlabs/ext/php/php")) {
            break;
        } else {
            print "YUM Gave Error... Trying Again...\n";
            if (get_yes_no("Try again?") == 'n') {
                print "- EXIT: Fix the problem and install Kloxo again.\n";
                exit;
            }
        }
    }
    print "Prepare installation directory\n";
    system("mkdir -p /usr/local/lxlabs/kloxo");
    if ($installversion) {
        if (substr($installversion, 0, 4) == '6.0.') {
            print "\n*** Need additional files installing {$installversion} (less then 6.1.0)***\n";
            print "      Run 'sh /script/kloxo-installer.sh' (without argument)\n\n";
            exit;
        }
        chdir("/usr/local/lxlabs/kloxo");
        system("mkdir -p /usr/local/lxlabs/kloxo/log");
        @unlink("/usr/local/lxlabs/kloxo/kloxo-current.zip");
        print "Downloading Kloxo {$installversion} release\n";
        system("wget {$downloadserver}download/kloxo/production/kloxo/kloxo-{$installversion}.zip");
        system("mv -f ./kloxo-{$installversion}.zip ./kloxo-current.zip");
    } else {
        if (file_exists("../kloxo-current.zip")) {
            //--- Install from local file if exists
            @unlink("/usr/local/lxlabs/kloxo/kloxo-current.zip");
            print "Local copying Kloxo release\n";
            system("mkdir -p /var/cache/kloxo");
            system("cp -rf ../kloxo-current.zip /usr/local/lxlabs/kloxo");
            //--- The first step - Remove packages
            system("rm -f /var/cache/kloxo/kloxo-thirdparty*.zip");
            system("rm -f /var/cache/kloxo/lxawstats*.tar.gz");
            system("rm -f /var/cache/kloxo/lxwebmail*.tar.gz");
            system("rm -f /var/cache/kloxo/kloxophpsixfour*.tar.gz");
            system("rm -f /var/cache/kloxo/kloxophp*.tar.gz");
            system("rm -f /var/cache/kloxo/*-version");
            //--- The second step - copy from packer script if exist
            system("cp -rf ../kloxo-thirdparty*.zip /var/cache/kloxo");
            system("cp -rf ../lxawstats*.tar.gz /var/cache/kloxo");
            system("cp -rf ../lxwebmail*.tar.gz /var/cache/kloxo");
            system("cp -rf ../kloxo-thirdparty-version /var/cache/kloxo");
            system("cp -rf ../lxawstats-version /var/cache/kloxo");
            system("cp -rf ../lxwebmail-version /var/cache/kloxo");
            if (file_exists("/usr/lib64")) {
                if (!is_link("/usr/lib/kloxophp")) {
                    system("rm -rf /usr/lib/kloxophp");
                }
                system("cp -rf ../kloxophpsixfour*.tar.gz /var/cache/kloxo");
                system("cp -rf ../kloxophpsixfour-version /var/cache/kloxo");
                system("mkdir -p /usr/lib64/kloxophp");
                system("ln -s /usr/lib64/kloxophp /usr/lib/kloxophp");
                system("mkdir -p /usr/lib64/php");
                system("ln -s /usr/lib64/php /usr/lib/php");
                system("mkdir -p /usr/lib64/httpd");
                system("ln -s /usr/lib64/httpd /usr/lib/httpd");
                system("mkdir -p /usr/lib64/lighttpd");
                system("ln -s /usr/lib64/lighttpd /usr/lib/lighttpd");
            } else {
                //--- Needs version checks in the future
                system("rename ../kloxophpsixfour ../_kloxophpsixfour ../kloxophpsixfour*");
                system("cp -rf ../kloxophp*.tar.gz /var/cache/kloxo");
                system("rename ../_kloxophpsixfour ../kloxophpsixfour ../_kloxophpsixfour*");
                system("cp -rf ../kloxophp-version /var/cache/kloxo");
            }
            chdir("/usr/local/lxlabs/kloxo");
            system("mkdir -p /usr/local/lxlabs/kloxo/log");
        } else {
            chdir("/usr/local/lxlabs/kloxo");
            system("mkdir -p /usr/local/lxlabs/kloxo/log");
            @unlink("/usr/local/lxlabs/kloxo/kloxo-current.zip");
            print "Downloading latest Kloxo release\n";
            system("wget {$downloadserver}download/kloxo/production/kloxo/kloxo-current.zip");
        }
    }
    print "\n\nInstalling Kloxo.....\n\n";
    system("unzip -oq kloxo-current.zip", $return);
    if ($return) {
        print "Unzipping the core Failed.. Most likely it is corrupted. Report it at http://forum.lxcenter.org/\n";
        exit;
    }
    unlink("kloxo-current.zip");
    system("chown -R lxlabs:lxlabs /usr/local/lxlabs/");
    chdir("/usr/local/lxlabs/kloxo/httpdocs/");
    system("service mysqld start");
    if ($installtype !== 'slave') {
        check_default_mysql($dbroot, $dbpass);
    }
    $mypass = password_gen();
    print "Prepare defaults and configurations...\n";
    install_main();
    file_put_contents("/etc/sysconfig/spamassassin", "SPAMDOPTIONS=\" -v -d -p 783 -u lxpopuser\"");
    print "\nCreating Vpopmail database...\n";
    system("sh {$dir_name}/kloxo-linux/vpop.sh {$dbroot} \"{$dbpass}\" lxpopuser {$mypass}");
    system("chmod -R 755 /var/log/httpd/");
    system("chmod -R 755 /var/log/httpd/fpcgisock >/dev/null 2>&1");
    system("mkdir -p /var/log/kloxo/");
    system("mkdir -p /var/log/news");
    system("ln -sf /var/qmail/bin/sendmail /usr/sbin/sendmail");
    system("ln -sf /var/qmail/bin/sendmail /usr/lib/sendmail");
    system("echo `hostname` > /var/qmail/control/me");
    system("service qmail restart >/dev/null 2>&1 &");
    system("service courier-imap restart >/dev/null 2>&1 &");
    print "Prepare /home/kloxo/httpd...\n";
    system("mkdir -p /home/kloxo/httpd");
    chdir("/home/kloxo/httpd");
    @unlink("skeleton-disable.zip");
    system("chown -R lxlabs:lxlabs /home/kloxo/httpd");
    system("/etc/init.d/kloxo restart >/dev/null 2>&1 &");
    chdir("/usr/local/lxlabs/kloxo/httpdocs/");
    system("/usr/local/lxlabs/ext/php/php /usr/local/lxlabs/kloxo/bin/install/create.php --install-type={$installtype} --db-rootuser={$dbroot} --db-rootpassword={$dbpass}");
    if ($installappinst) {
        print "Install InstallApp...\n";
        system("/script/installapp-update");
        // First run (gets installappdata)
        system("/script/installapp-update");
        // Second run (gets applications)
    }
    //--- Remove all temporary flags because the end of install
    print "\nRemove Kloxo install flags...\n";
    system("rm -rf /var/cache/kloxo/*-version");
    system("rm -rf /var/cache/kloxo/kloxo-install-*.flg");
    //--- Prevent mysql socket problem (especially on 64bit system)
    if (!file_exists("/var/lib/mysql/mysql.sock")) {
        print "Create mysql.sock...\n";
        system("/etc/init.d/mysqld stop");
        system("mksock /var/lib/mysql/mysql.sock");
        system("/etc/init.d/mysqld start");
    }
    //--- Prevent for Mysql not start after reboot for fresh kloxo slave install
    print "Setting Mysql for always running after reboot and restart now...\n";
    system("chkconfig mysqld on");
    system("service mysqld restart");
    //--- Fix for old thirdparty version
    if (!file_exists("/usr/local/lxlabs/kloxo/httpdocs/thirdparty")) {
        system("cp -rf /var/cache/kloxo/kloxo-thirdparty*.zip /usr/local/lxlabs/kloxo");
        system("cd /usr/local/lxlabs/kloxo; unzip -oq kloxo-thirdparty*.zip");
        system("chown -R lxlabs:lxlabs /usr/local/lxlabs/kloxo/httpdocs/thirdparty");
        system("chown -R lxlabs:lxlabs /usr/local/lxlabs/kloxo/httpdocs/htmllib");
        system("rm -f /usr/local/lxlabs/kloxo/kloxo-thirdparty*.zip");
    }
    //--- Set ownership for Kloxo httpdocs dir
    system("chown -R lxlabs:lxlabs /usr/local/lxlabs/kloxo/httpdocs");
    print "\nCongratulations. Kloxo has been installed succesfully on your server as {$installtype}\n\n";
    if ($installtype === 'master') {
        print "You can connect to the server at:\n";
        print "\thttps://<ip-address>:7777 - secure ssl connection, or\n";
        print "\thttp://<ip-address>:7778 - normal one.\n\n";
        print "The login and password are 'admin' 'admin'. After Logging in, you will have to\n";
        print "change your password to something more secure\n\n";
        print "We hope you will find managing your hosting with Kloxo\n";
        print "refreshingly pleasurable, and also we wish you all the success\n";
        print "on your hosting venture\n\n";
        print "Thanks for choosing Kloxo to manage your hosting, and allowing us to be of\n";
        print "service\n";
    } else {
        print "You should open the port 7779 on this server, since this is used for\n";
        print "the communication between master and slave\n\n";
        print "To access this slave, to go admin->servers->add server,\n";
        print "give the ip/machine name of this server. The password is 'admin'.\n\n";
        print "The slave will appear in the list of slaves, and you can access it\n";
        print "just like you access localhost\n\n";
    }
    print "\n";
    print "---------------------------------------------\n";
}
コード例 #7
0
ファイル: lxins.php プロジェクト: zseand/kloxo
function lxins_main()
{
    global $argv, $downloadserver;
    $opt = parse_opt($argv);
    $dir_name = dirname(__FILE__);
    $installtype = $opt['install-type'];
    $dbroot = isset($opt['db-rootuser']) ? $opt['db-rootuser'] : "******";
    $dbpass = isset($opt['db-rootpassword']) ? $opt['db-rootpassword'] : "";
    $osversion = find_os_version();
    $arch = `arch`;
    $arch = trim($arch);
    if (!char_search_beg($osversion, "centos") && !char_search_beg($osversion, "rhel")) {
        print "Kloxo is only supported on CentOS 5 and RHEL 5\n";
        exit;
    }
    if (file_exists("/usr/local/lxlabs/kloxo")) {
        // Ask Reinstall
        if (get_yes_no("Kloxo seems already installed do you wish to continue?") == 'n') {
            print "Installation Aborted.\n";
            exit;
        }
    } else {
        // Ask License
        if (get_yes_no("Kloxo is using AGPL-V3.0 License, do you agree with the terms?") == 'n') {
            print "You did not agree to the AGPL-V3.0 license terms.\n";
            print "Installation aborted.\n\n";
            exit;
        } else {
            print "Installing Kloxo = YES\n\n";
        }
    }
    // Ask for InstallApp
    print "InstallApp: PHP Applications like PHPBB, WordPress, Joomla etc\n";
    print "When you choose Yes, be aware of downloading about 350Mb of data!\n";
    if (get_yes_no("Do you want to install the InstallAPP sotfware?") == 'n') {
        print "Installing InstallApp = NO\n";
        print "You can install it later with /script/installapp-update\n\n";
        $installappinst = false;
    } else {
        print "Installing InstallApp = YES\n\n";
        $installappinst = true;
    }
    print "Adding System users and groups (nouser, nogroup and lxlabs, lxlabs)\n";
    system("groupadd nogroup");
    system("useradd nouser -g nogroup -s '/sbin/nologin'");
    system("groupadd lxlabs");
    system("useradd lxlabs -g lxlabs -s '/sbin/nologin'");
    print "Installing LxCenter yum repository for updates\n";
    install_yum_repo($osversion);
    $packages = array("sendmail", "sendmail-cf", "sendmail-doc", "sendmail-devel", "exim", "vsftpd", "postfix", "vpopmail", "qmail", "lxphp", "lxzend", "pure-ftpd", "imap");
    $list = implode(" ", $packages);
    print "Removing packages {$list}...\n";
    foreach ($packages as $package) {
        exec("rpm -e --nodeps {$package} > /dev/null 2>&1");
    }
    $packages = array("php-mbstring", "php-mysql", "which", "gcc-c++", "php-imap", "php-pear", "php-devel", "lxlighttpd", "httpd", "mod_ssl", "zip", "unzip", "lxphp", "lxzend", "mysql", "mysql-server", "curl", "autoconf", "automake", "libtool", "bogofilter", "gcc", "cpp", "openssl", "pure-ftpd", "yum-protectbase");
    $list = implode(" ", $packages);
    while (true) {
        print "Installing packages {$list}...\n";
        system("PATH=\$PATH:/usr/sbin yum -y install {$list}", $return_value);
        if (file_exists("/usr/local/lxlabs/ext/php/php")) {
            break;
        } else {
            print "Yum Gave Error... Trying Again...\n";
        }
    }
    print "Prepare installation directory\n";
    system("mkdir -p /usr/local/lxlabs/kloxo");
    chdir("/usr/local/lxlabs/kloxo");
    system("mkdir -p /usr/local/lxlabs/kloxo/log");
    @unlink("kloxo-current.zip");
    print "Downloading latest Kloxo release\n";
    system("wget " . $downloadserver . "download/kloxo/production/kloxo/kloxo-current.zip");
    print "\n\nInstalling Kloxo.....\n\n";
    system("unzip -oq kloxo-current.zip", $return);
    if ($return) {
        print "Unzipping the core Failed.. Most likely it is corrupted. Report it at http://forum.lxcenter.org/\n";
        exit;
    }
    unlink("kloxo-current.zip");
    system("chown -R lxlabs:lxlabs /usr/local/lxlabs/");
    chdir("/usr/local/lxlabs/kloxo/httpdocs/");
    system("service mysqld start");
    if ($installtype !== 'slave') {
        check_default_mysql($dbroot, $dbpass);
    }
    $mypass = password_gen();
    print "Prepare defaults and configurations...\n";
    system("/usr/local/lxlabs/ext/php/php {$dir_name}/installall.php");
    our_file_put_contents("/etc/sysconfig/spamassassin", "SPAMDOPTIONS=\" -v -d -p 783 -u lxpopuser\"");
    print "Creating Vpopmail database...\n";
    system("sh {$dir_name}/vpop.sh {$dbroot} \"{$dbpass}\" lxpopuser {$mypass}");
    system("chmod -R 755 /var/log/httpd/");
    system("chmod -R 755 /var/log/httpd/fpcgisock >/dev/null 2>&1");
    system("mkdir -p /var/log/kloxo/");
    system("mkdir -p /var/log/news");
    system("ln -sf /var/qmail/bin/sendmail /usr/sbin/sendmail");
    system("ln -sf /var/qmail/bin/sendmail /usr/lib/sendmail");
    system("echo `hostname` > /var/qmail/control/me");
    system("service qmail restart >/dev/null 2>&1 &");
    system("service courier-imap restart >/dev/null 2>&1 &");
    $dbfile = "/home/kloxo/httpd/webmail/horde/scripts/sql/create.mysql.sql";
    if (file_exists($dbfile)) {
        if ($dbpass == "") {
            system("mysql -u {$dbroot}  <{$dbfile}");
        } else {
            system("mysql -u {$dbroot} -p{$dbpass} <{$dbfile}");
        }
    }
    system("mkdir -p /home/kloxo/httpd");
    chdir("/home/kloxo/httpd");
    @unlink("skeleton-disable.zip");
    system("chown -R lxlabs:lxlabs /home/kloxo/httpd");
    system("/etc/init.d/kloxo restart >/dev/null 2>&1 &");
    chdir("/usr/local/lxlabs/kloxo/httpdocs/");
    system("/usr/local/lxlabs/ext/php/php /usr/local/lxlabs/kloxo/bin/install/create.php --install-type={$installtype} --db-rootuser={$dbroot} --db-rootpassword={$dbpass}");
    system("/usr/local/lxlabs/ext/php/php /usr/local/lxlabs/kloxo/bin/misc/secure-webmail-mysql.phps");
    system("/bin/rm /usr/local/lxlabs/kloxo/bin/misc/secure-webmail-mysql.phps");
    system("/script/centos5-postpostupgrade");
    if ($installappinst) {
        system("/script/installapp-update");
        // First run (gets installappdata)
        system("/script/installapp-update");
        // Second run (gets applications)
    }
    print "Congratulations. Kloxo has been installed succesfully on your server as {$installtype} \n";
    if ($installtype === 'master') {
        print "You can connect to the server at https://<ip-address>:7777 or http://<ip-address>:7778\n";
        print "Please note that first is secure ssl connection, while the second is normal one.\n";
        print "The login and password are 'admin' 'admin'. After Logging in, you will have to change your password to something more secure\n";
        print "We hope you will find managing your hosting with Kloxo refreshingly pleasurable, and also we wish you all the success on your hosting venture\n";
        print "Thanks for choosing Kloxo to manage your hosting, and allowing us to be of service\n";
    } else {
        print "You should open the port 7779 on this server, since this is used for the communication between master and slave\n";
        print "To access this slave, to go admin->servers->add server, give the ip/machine name of this server. The password is 'admin'. The slave will appear in the list of slaves, and you can access it just like you access localhost\n\n";
    }
}
コード例 #8
0
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if (!module_config::can_i('view', 'Settings')) {
    redirect_browser(_BASE_HREF);
}
$module->page_title = _l('Newsletter Settings');
$templates = array();
foreach (module_newsletter::get_templates() as $template) {
    $templates[$template['newsletter_template_id']] = $template['newsletter_template_name'];
}
$settings = array('heading' => array('title' => 'Newsletter Settings', 'main' => true, 'type' => 'h2'), 'settings' => array(array('key' => 'newsletter_default_from_name', 'default' => module_config::c('admin_system_name'), 'type' => 'text', 'description' => 'What sender name your newsletters will come from'), array('key' => 'newsletter_default_from_email', 'default' => module_config::c('admin_email_address'), 'type' => 'text', 'description' => 'What email address your newsletters will come from'), array('key' => 'newsletter_default_template', 'default' => 1, 'type' => 'select', 'options' => $templates, 'description' => 'Default template to use'), array('key' => 'newsletter_convert_links', 'default' => 1, 'type' => 'select', 'options' => get_yes_no(), 'description' => 'Convert all links into trackable click links', 'help' => 'When a user clicks a link in your newsletter it will record who, when and which link they clicked'), array('key' => 'newsletter_convert_images', 'default' => 1, 'type' => 'select', 'options' => get_yes_no(), 'description' => 'Convert all images into trackable images', 'help' => 'If this option is enabled you can tell when users see the images in your newsletters'), array('key' => 'newsletter_default_bounce', 'default' => module_config::c('admin_email_address'), 'type' => 'text', 'description' => 'What email address your bounced newsletters will go to (eg: bounce@yourwebsite.com)', 'help' => 'Please setup a NEW email address for bounces. Do not use an existing email address.'), array('key' => 'newsletter_bounce_host', 'default' => $_SERVER['HTTP_HOST'], 'type' => 'text', 'description' => 'POP3 incoming server address to access the bounce email account (eg: mail.yourwebsite.com)', 'help' => 'You can put the port number in like this:  mail.yourwebsite.com'), array('key' => 'newsletter_bounce_port', 'default' => '110', 'type' => 'text', 'description' => 'POP3 incoming server port (eg: 110 or 995)', 'help' => '110 is normal, 995 is ssl'), array('key' => 'newsletter_bounce_ssl', 'default' => '/ssl', 'type' => 'text', 'description' => 'SSL or TLS setting', 'help' => 'Set this to blank, or /ssl, or /tls or other options from php.net/imap_connect'), array('key' => 'newsletter_bounce_username', 'default' => '', 'type' => 'text', 'description' => 'POP3 username to access the bounce email account'), array('key' => 'newsletter_bounce_password', 'default' => '', 'type' => 'text', 'description' => 'POP3 password to access the bounce email account'), array('key' => 'newsletter_bounce_threshold', 'default' => 3, 'type' => 'number', 'description' => 'Bounce Threshold', 'help' => 'How many bounces before we unsubscribe this member'), array('key' => 'newsletter_send_burst_count', 'default' => 40, 'type' => 'number', 'description' => 'Burst Count', 'help' => 'How many emails the server will try to sent at the same time. Setting this too high may get you banned by your hosting provider.'), array('key' => 'newsletter_send_burst_break', 'default' => 2, 'type' => 'number', 'description' => 'Burst Wait', 'help' => 'Seconds to wait between sending batches of newsletters'), array('key' => 'newsletter_subscribe_redirect_double', 'default' => '', 'type' => 'text', 'description' => 'Subscribe Redirect (double opt-in)', 'help' => 'Full URL (including http://) to where the user is taken after confirming their double opt-in'), array('key' => 'newsletter_subscribe_redirect', 'default' => '', 'type' => 'text', 'description' => 'Subscribe Redirect', 'help' => 'Full URL (including http://) to where the user is taken after subscribing'), array('key' => 'newsletter_unsubscribe_redirect', 'default' => '', 'type' => 'text', 'description' => 'Un-Subscribe Redirect URL', 'help' => 'Full URL (including http://) to where the user is taken after confirming their unsubscription')));
module_config::print_settings_form($settings);
print_heading('Subscription Form');
?>
<p><?php 
_e('Here is a link to the newsletter subscription form. When people fill this out they will appear in the "Members" area:');
?>
 <a href="<?php 
echo module_member::link_public_subscribe();
?>
" target="_blank"><?php 
echo module_member::link_public_subscribe();
?>
</a> <?php 
_e('(this form can be edited from Settings > Templates)');
?>
コード例 #9
0
ファイル: keywords.php プロジェクト: nyimbi/legalcase
function show_keyword_id($id_keyword = 0)
{
    if (!$id_keyword) {
        if (!intval($_REQUEST['id_group']) > 0) {
            lcm_panic("missing valid id_group for new keyword");
        }
        $kwg = get_kwg_from_id($_REQUEST['id_group']);
        // Suggest a keyword name: kwgnameNN, where NN = numeric sequence
        $all_kws = get_keywords_in_group_name($kwg['name'], false);
        $cpt = sprintf("%02d", count($all_kws) + 1);
        while (get_kw_from_name($kwg['name'], $kwg['name'] . $cpt)) {
            $cpt = sprintf("%02d", ++$cpt);
        }
        $kw['name'] = $kwg['name'] . $cpt;
        $kw['title'] = '';
        $kw['description'] = '';
        $kw['id_group'] = $kwg['id_group'];
        $kw['ac_author'] = 'Y';
        $kw['hasvalue'] = 'N';
        $kw['type'] = $kwg['type'];
        lcm_page_start(_T('title_keyword_new'));
    } else {
        $kw = get_kw_from_id($id_keyword);
        $kwg = get_kwg_from_id($kw['id_group']);
        lcm_page_start(_T('title_keyword_edit'));
    }
    echo show_all_errors($_SESSION['errors']);
    if (!$id_keyword) {
        echo "<ul style=\"padding-left: 0.5em; padding-top: 0.2; padding-bottom: 0.2; font-size: 12px;\">\n";
        echo '<li style="list-style-type: none;">' . _T('keywords_input_for_group') . " " . '<a class="content_link" href="keywords.php?action=edit_group&id_group=' . $kwg['id_group'] . '">' . _T($kwg['title']) . "</a></li>\n";
        echo "</ul>\n";
    }
    echo '<fieldset class="info_box">';
    echo '<form action="keywords.php" method="post">' . "\n";
    echo '<input type="hidden" name="action" value="update_keyword" />' . "\n";
    echo '<input type="hidden" name="id_keyword" value="' . $id_keyword . '" />' . "\n";
    echo '<input type="hidden" name="id_group" value="' . $kw['id_group'] . '" />' . "\n";
    // for new keyword only
    // Name (only for new keywords, must be unique and cannot be changed)
    echo "<strong>" . f_err_star('name') . _T('keywords_input_name') . "</strong> " . "(short identifier, unique to this keyword group)" . "<br />\n";
    // TRAD
    $disabled = isDisabled($id_keyword);
    echo '<input ' . $disabled . ' type="text" id="kw_name" name="kw_name" size="45" value="' . $kw['name'] . '" class="search_form_txt" />' . "\n";
    echo "<br /><br />\n";
    // Title
    echo "<strong>" . f_err_star('title') . _T('keywords_input_title') . "</strong><br />\n";
    echo "<input type='text' id='kw_title' name='kw_title' size='45' value='" . $kw['title'] . "' class='search_form_txt' />\n";
    echo "<br /><br />\n";
    // Description
    echo "<strong>" . _T('keywords_input_description') . "</strong><br />\n";
    echo "<textarea id='kw_desc' name='kw_desc' rows='2' cols='45' wrap='soft' class='frm_tarea'>";
    echo $kw['description'];
    echo "</textarea>\n";
    // Ac_author
    echo '<ul class="info">';
    echo '<li>' . _T('keywords_info_kw_ac_author') . ' ' . get_yes_no('kw_ac_author', $kw['ac_author']) . "</li>\n";
    if (!$id_keyword || $id_keyword && $kwg['type'] != 'system') {
        echo '<li>' . "Does the keyword have a specific value?" . ' ' . get_yes_no('kw_hasvalue', $kw['hasvalue']) . "</li>\n";
    }
    echo '<button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n";
    echo "</form>\n";
    echo '</fieldset>';
    // destroy error messages
    $_SESSION['errors'] = array();
    lcm_page_end();
    exit;
}
コード例 #10
0
ファイル: ticket.php プロジェクト: sgh1986915/php-crm
 public static function send_autoreply($ticket_id)
 {
     if (!module_config::c('ticket_autoreply_enabled', 1, array('plugin' => 'ticket', 'description' => 'Should autoreplies be sent to ticket messages?', 'type' => 'select', 'options' => get_yes_no(), 'default' => 1))) {
         return;
     }
     // send back an auto responder letting them know where they are in the queue.
     $ticket_data = self::get_ticket($ticket_id);
     $template = module_template::get_template_by_key('ticket_autoreply');
     $auto_reply_message = $template->content;
     $from_user_id = $ticket_data['assigned_user_id'] ? $ticket_data['assigned_user_id'] : module_config::c('ticket_default_user_id', 1);
     //if($ticket_data['user_id'] != $from_user_id){
     // check if we have sent an autoreply to this address in the past 5 minutes, if we have we dont send another one.
     // this stops autoresponder spam messages.
     $time = time() - 300;
     // 5 mins
     $sql = "SELECT * FROM `" . _DB_PREFIX . "ticket_message` tm WHERE to_user_id = '" . (int) $ticket_data['user_id'] . "' AND message_time > '" . $time . "' AND ( `cache` = 'autoreply' OR `message_type_id` = " . _TICKET_MESSAGE_TYPE_AUTOREPLY . " )";
     $res = qa($sql);
     if (!count($res)) {
         $send_autoreply = true;
         // other logic to check here???
         // see if this user has any 'ticket settings' extra fields, if we find a 'no_autoreply' value in here we don't send it.
         if (class_exists('module_extra', false)) {
             $extra_fields = module_extra::get_extras(array('owner_table' => 'user', 'owner_id' => $ticket_data['user_id']));
             foreach ($extra_fields as $extra_field) {
                 if (stripos($extra_field['extra_key'], 'ticket settings') !== false) {
                     if (stripos($extra_field['extra'], 'no_autoreply') !== false) {
                         $send_autoreply = false;
                         break;
                     }
                 }
             }
         }
         if ($send_autoreply) {
             self::send_reply($ticket_id, $auto_reply_message, $from_user_id, $ticket_data['user_id'], 'admin', 'autoreply');
         }
     }
     //}
 }
コード例 #11
0
<?php

/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
$script = '<script type="text/javascript" language="javascript" src="' . full_link('includes/plugin_change_request/js/public.js') . '"></script>' . "\n";
$script .= '<script type="text/javascript" language="javascript"> dtbaker_public_change_request.init("' . module_change_request::link_script($website_id) . '"); </script>';
$change_history = module_change_request::get_remaining_changes($website_id);
$fieldset_data = array('heading' => array('type' => 'h3', 'title' => _l('Change Request Settings')), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array('enable' => array('title' => _l('Enable Changes'), 'field' => array('type' => 'select', 'options' => get_yes_no(), 'name' => 'change_request[enabled]', 'value' => isset($change_request_website['enabled']) ? $change_request_website['enabled'] : '0', 'help' => 'Allow change requests. This SUPER COOL feature allows your customer to highlight something on their website and request a change. The "change request" will come through here and you can invoice for that change.'))));
if (isset($change_request_website['enabled']) && $change_request_website['enabled']) {
    $fieldset_data['elements']['code'] = array('title' => _l('Website Code'), 'fields' => array('<small>' . nl2br(htmlspecialchars($script)) . '</small>', _hr('Add this code to EVERY PAGE of your customers website (eg: Same as Google Analytics or in WordPress theme footer.php file). Make sure this is loaded AFTER jQuery is loaded. (Advanced users can copy this public.js file to clients website to improve load times). <br><br> Or paste this code into the browser console for testing: <br><br>%s', htmlspecialchars("var s = document.createElement('script'); s.src='" . full_link('includes/plugin_change_request/js/public.js') . "';  s.onload = function() { dtbaker_public_change_request.inject_js('" . full_link('includes/plugin_change_request/fancybox/jquery.fancybox-1.3.4.js') . "');\n            dtbaker_public_change_request.inject_css('" . full_link('includes/plugin_change_request/fancybox/jquery.fancybox-1.3.4.css') . "',dtbaker_public_change_request.init('" . module_change_request::link_script($website_id) . "')); }; (document.head||document.documentElement).appendChild(s);"))));
    $fieldset_data['elements']['limit'] = array('title' => _l('Customer Limit'), 'fields' => array(array('type' => 'text', 'name' => 'change_request[limit_number]', 'value' => isset($change_request_website['limit_number']) ? $change_request_website['limit_number'] : 5, 'size' => 4), array('type' => 'select', 'name' => 'change_request[limit_per]', 'value' => isset($change_request_website['limit_per']) ? $change_request_website['limit_per'] : 0, 'options' => array('1' => _l('Week'), '2' => _l('Month'), '3' => _l('Year'), '0' => _l('All Time'))), _hr('You can limit your customer to a certain number of change requests (eg: if you are charging them a monthly maintenance fee)'), '<br/> ', _l('<strong>%s</strong> of %s changes remaining', max(0, $change_history[1] - $change_history[0]), $change_history[1])));
    $fieldset_data['elements']['link'] = array('title' => _l('Request Link'), 'fields' => array('<a href="' . module_change_request::link_public($website_id) . '" target="_blank">' . _l('Request Change Link') . '</a> ', _hr('This is the special link you can email to your customer. Using this link the customer can request a change on their website.')));
}
echo module_form::generate_fieldset($fieldset_data);