**********************************
*/
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()) {
示例#2
0
         $cloud = new phpos_clouds();
         if ($cloud->new_cloud($tmp_title, $tmp_desc, $tmp_cloud, $tmp_login, $tmp_pass, $tmp_public, $tmp_url, $tmp_param1, $tmp_param2, $tmp_param3, $tmp_param4)) {
             helper_result('new_cloud', 'ok', txt('created'));
             helper_result('new_cloud_result', 'result', 'success');
             helper_result('new_cloud_id', 'var', 1);
         } else {
             helper_result('new_cloud_result', 'result', 'error');
             helper_result('new_cloud', 'error', txt('error'));
         }
         $_POST['action'] = null;
     }
 }
 // update
 if (form_submit('update_cloud')) {
     if ($_POST['action'] == 'update_cloud') {
         $cloud = new phpos_clouds();
         if ($cloud->is_my_cloud($cloud_id) || is_root() || is_admin()) {
             $tmp_title = strip_tags($_POST['cloud_new_title']);
             $tmp_desc = strip_tags($_POST['cloud_new_desc']);
             $tmp_login = strip_tags($_POST['cloud_new_login']);
             $tmp_pass = strip_tags($_POST['cloud_new_pass']);
             $tmp_url = strip_tags($_POST['cloud_new_url']);
             //$tmp_cloud = strip_tags($_POST['cloud_new_type']);
             $tmp_public = strip_tags($_POST['cloud_new_public']);
             $tmp_param1 = strip_tags($_POST['cloud_new_param1']);
             $tmp_param2 = strip_tags($_POST['cloud_new_param2']);
             $tmp_param3 = strip_tags($_POST['cloud_new_param3']);
             $tmp_param4 = strip_tags($_POST['cloud_new_param4']);
             $cloud->set_id($cloud_id);
             if ($cloud->update_cloud($cloud_id, $tmp_title, $tmp_desc, $tmp_login, $tmp_pass, $tmp_public, $tmp_url, $tmp_param1, $tmp_param2, $tmp_param3, $tmp_param4)) {
                 helper_result('update_cloud', 'ok', txt('updated'));
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
// if section access
$new_id = helper_result('update_ftp_id');
$cloud_id = $my_app->get_param('cloud_id');
$cloud_type = $my_app->get_param('cloud_type');
if (!empty($cloud_id)) {
    $cloud = new phpos_clouds();
    if ($cloud->is_my_cloud($cloud_id) || is_root()) {
        $cloud->set_id($cloud_id);
        $cloud->get_cloud();
        echo $layout->title(txt('edit_cloud'), 'icon.png');
        echo $layout->txtdesc(txt('dsc_cloud_title'));
        echo helper_result('update_cloud');
        $form = new phpos_forms();
        echo $form->form_start('update_cloud', helper_ajax('section.edit_account.php'), array('app_params' => ''));
        $form->reload_after_submit(array('nowy'));
        $form->input('hidden', 'action', '', '', 'update_cloud');
        echo $layout->column('50%');
        $form->title($cloud->get_title(), 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'), $cloud->get_title());
        $form->input('text', 'cloud_new_desc', txt('desc'), txt('dsc_cloud_desc'), $cloud->get_desc());
示例#4
0
					<span><a href="javascript:void(0);" onclick="phpos.windowActionChange(\''.$apiWindow->getID().'\', \'cloud\')"><span style="color:black"><b>Cloud</b></span></a></span>
					
					<ul>
					
							'.$tree_local_files.'			
						
					</ul>
		</li>	
	
	</ul>';
*/
if (!defined('PHPOS_EXPLORER_PLUGIN')) {
    die;
}
$items = null;
$clouds = new phpos_clouds();
$records = $clouds->get_my_clouds();
if (count($records) != 0) {
    foreach ($records as $row) {
        /*
        $items.= '<li data-options="iconCls:\'icon-ftpfolder\'"><span><a title="'.$row['title'].' '.$row['host'].'"href="javascript:void(0);" onclick="phpos.windowActionChange(\''.WIN_ID.'\', \'cloud\', \'reset_google_token:1, cloud_type:'.$row['cloud'].'\')"><span style="color: black; font-weight:bold"><b>'.$row['title'].'</b></span></a></span></li>';
        */
        /*
        $items.= '<li data-options="iconCls:\'icon-ftpfolder\'"><span><a title="'.$row['title'].' '.$row['host'].'"href="javascript:void(0);" onclick="'.link_action('index', 'dir_id:.,ftp_id:'.$row['id'].',fs:clouds_google_drive').'"><span style="color: black; font-weight:bold"><b>'.$row['title'].'</b></span></a></span></li>';
        */
        $items .= '<li data-options="iconCls:\'icon-ftpfolder\'"><span><a title="' . $row['title'] . '" href="javascript:void(0);" onclick="alert(\'Sorry, this feature will be available in next updates.\')"><span style="color: black;">' . $row['title'] . '</span></a></span></li>';
    }
} else {
    $items .= '<li data-options="iconCls:\'icon-blank\'"><span>' . $txt['cloud_no_accounts'] . '</span></li>';
}
/*
示例#5
0
echo $layout->column('33%');
echo $layout->subtitle(txt('cloud_public'), MY_RESOURCES_URL . 'cloud_icon.png');
if (is_root() || is_admin()) {
    echo $layout->txtdesc(txt('dsc_cloud_list_public'));
} else {
    echo $layout->txtdesc(txt('dsc_cloud_list_public_user'));
}
$clouds = new phpos_clouds();
$clouds_ids = $clouds->get_public_clouds();
$c = count($clouds_ids);
if ($c != 0) {
    echo $layout->tbl_start();
    $layout->td_classes(array('', '', 'tbl_grey'));
    echo $layout->head(array('<img src="' . MY_RESOURCES_URL . 'cloud_icon.png" />' => '20%', txt('cloud_account') => '40%', txt('cloud_type') => '40%'));
    for ($i = 0; $i < $c; $i++) {
        $cl = new phpos_clouds();
        $cl->set_id($clouds_ids[$i]['id']);
        $cl->get_cloud();
        if (is_root() || $cl->is_my_cloud($clouds_ids[$i]['id'])) {
            $item = '<a href="javascript:void(0);" onclick="' . helper_reload(array('section' => 'edit_account', 'cloud_id' => $cl->get_id(), 'cloud_type' => $cl->get_cloud_type())) . '">' . $cl->get_title() . '</a>';
        } else {
            $item = $cl->get_title();
        }
        echo $layout->row(array('<img src="' . $cl->get_cloud_icon() . '"  style="height:20px"/>', $item, $cl->get_cloud_name()), $cl->get_desc());
    }
    echo $layout->tbl_end();
} else {
    echo $layout->empty_list();
}
echo $layout->end('column');
echo $layout->clr();