Exemplo n.º 1
0
         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'));
                 helper_result('update_cloud_result', 'result', 'success');
Exemplo n.º 2
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();