Exemplo n.º 1
0
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
// if section access
$new_id = helper_result('new_ftp_id');
$cloud_type = $my_app->get_param('cloud_type');
if (empty($cloud_type)) {
    echo '<div class="layout_clouds_select">' . txt('cloud_select_new') . '<br /><br /><img src="' . ICONS . 'clouds/google_drive.png" onclick="' . link_action('index', 'cloud_type:google_drive') . '"/></div>';
    $js = "\n\t\$('.layout_clouds_select img').mouseenter(function()\n\t{\n\t\t\$(this).addClass('layout_clouds_select_over');\n\t});\n\t\n\t\$('.layout_clouds_select img').mouseleave(function()\n\t{\n\t\t\$(this).removeClass('layout_clouds_select_over');\n\t});\n\t\n\t";
    $my_app->jquery_onready($js);
} else {
    if (empty($new_id)) {
        $cloud = new phpos_clouds();
        $cloud->set_cloud($cloud_type);
        echo helper_result('new_cloud');
        echo $layout->title(txt('add_new_cloud'), null);
        echo $layout->txtdesc(txt('dsc_cloud_title'));
        $form = new phpos_forms();
        echo $form->form_start('new_cloud', helper_ajax('section.new_account.php'), array('app_params' => ''));
        $form->reload_after_submit(array('nowy'));
        $form->input('hidden', 'action', '', '', 'new_cloud');
        $form->input('hidden', 'cloud_new_type', '', '', $cloud_type);
        echo $layout->column('50%');
        $form->title(txt('dsc_cloud_desc_new') . ': ' . $cloud->get_cloud_name(), null, $cloud->get_cloud_icon());
        $form->condition('not_null', true, txt('form_empty_field') . txt('title'));
        $form->input('text', 'cloud_new_title', txt('title'), txt('dsc_cloud_name'), '');
        $form->input('text', 'cloud_new_desc', txt('desc'), txt('dsc_cloud_desc'), '');
        if (is_root() || is_admin()) {
            $items = array('1' => txt('yes'), '0' => txt('no'));