Exemplo n.º 1
0
        echo $form->render();
        include MY_APP_DIR . 'views/cloud_help_google.php';
        echo $layout->end('column');
        echo $layout->column('50%');
        switch ($cloud_type) {
            case 'google_drive':
                $form->title(txt('cloud_authentication'), '', ICONS . 'auth_key.png');
                $form->condition('not_null', true, txt('form_empty_field') . 'ClientID');
                $form->input('text', 'cloud_new_login', 'ClientID', txt('dsc_cloud_login'), $cloud->get_login());
                $form->condition('not_null', true, txt('form_empty_field') . 'Secret');
                $form->input('password', 'cloud_new_pass', 'Secret', txt('dsc_cloud_pass'), $cloud->get_password());
                $form->input('text', 'cloud_new_url', 'Redirect URL', txt('dsc_cloud_port'), $cloud->get_url());
                break;
        }
        $form->status();
        $delete_action = "\n\t\t\t\$.messager.confirm('" . txt('delete') . "', '" . txt('delete_confirm') . "?', function(r){\n\t\t\tif (r){\n\t\t\t\tphpos.windowRefresh('" . WIN_ID . "', 'section:list,action:delete,delete_id:" . $cloud->get_id() . "');\t\n\t\t\t}\n\t\t\t});\t";
        $form->button(txt('delete'), $delete_action, 'cancel');
        $form->submit('', txt('btn_update'), 'edit_add');
        //$form->button('', 'button', 'edit_add');
        echo $form->render();
        echo $layout->end('column');
        echo $layout->clr();
        echo $form->form_end();
    } else {
        echo $layout->access_denied();
    }
} else {
    winreload(WIN_ID, array('section' => 'list'));
    //echo $layout->nothing_to_edit('At first, select record from list');
    //link_action('app')
    //jquery_onready(link_action('list', ''));
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();