예제 #1
0
 public function info()
 {
     $info = array('name' => array('sl' => 'Datoteke', 'en' => 'Files', 'br' => 'Arquivos', 'de' => 'Dateien', 'nl' => 'Bestanden', 'fr' => 'Fichiers', 'zh' => '檔案', 'it' => 'File', 'ru' => 'Файлы', 'ar' => 'الملفّات', 'cs' => 'Soubory', 'es' => 'Archivos', 'fi' => 'Tiedostot', 'el' => 'Αρχεία', 'he' => 'קבצים', 'lt' => 'Failai', 'da' => 'Filer', 'id' => 'File'), 'description' => array('sl' => 'Uredi datoteke in mape na vaši strani', 'en' => 'Manages files and folders for your site.', 'br' => 'Permite gerenciar facilmente os arquivos de seu site.', 'de' => 'Verwalte Dateien und Verzeichnisse.', 'nl' => 'Beheer bestanden en mappen op uw website.', 'fr' => 'Gérer les fichiers et dossiers de votre site.', 'zh' => '管理網站中的檔案與目錄', 'it' => 'Gestisci file e cartelle del tuo sito.', 'ru' => 'Управление файлами и папками вашего сайта.', 'ar' => 'إدارة ملفات ومجلّدات موقعك.', 'cs' => 'Spravujte soubory a složky na vašem webu.', 'es' => 'Administra archivos y carpetas en tu sitio.', 'fi' => 'Hallitse sivustosi tiedostoja ja kansioita.', 'el' => 'Διαχειρίζεται αρχεία και φακέλους για το ιστότοπό σας.', 'he' => 'ניהול תיקיות וקבצים שבאתר', 'lt' => 'Katalogų ir bylų valdymas.', 'da' => 'Administrer filer og mapper for dit site.', 'id' => 'Mengatur file dan folder dalam situs Anda.'), 'frontend' => FALSE, 'backend' => TRUE, 'menu' => 'content', 'roles' => array('download_file', 'edit_file', 'delete_file', 'edit_folder', 'delete_folder'), 'shortcuts' => array(array('name' => 'files.files_title', 'uri' => 'admin/files')));
     if (function_exists('group_has_role') and group_has_role('files', 'edit_file')) {
         $info['shortcuts'][] = array('name' => 'file_folders.create_title', 'uri' => 'admin/files/folders/create', 'class' => 'add folder-create');
         $info['shortcuts'][] = array('name' => 'files.upload_title', 'uri' => 'admin/files/upload', 'class' => 'files-uploader');
     }
     return $info;
 }
예제 #2
0
 public function info()
 {
     $info = array('name' => array('en' => 'Movieslider', 'ar' => 'المدوّنة', 'br' => 'Movieslider', 'pt' => 'Movieslider', 'el' => 'Ιστολόγιο', 'fa' => 'بلاگ', 'he' => 'בלוג', 'id' => 'Movieslider', 'lt' => 'Movieslideras', 'pl' => 'Movieslider', 'ru' => 'Блог', 'tw' => '文章', 'cn' => '文章', 'hu' => 'Movieslider', 'fi' => 'Movieslideri', 'th' => 'บล็อก', 'se' => 'Moviesliderg'), 'description' => array('en' => 'Post movieslider entries.', 'ar' => 'أنشر المقالات على مدوّنتك.', 'br' => 'Escrever publicações de movieslider', 'pt' => 'Escrever e editar publicações no movieslider', 'cs' => 'Publikujte nové články a příspěvky na movieslider.', 'da' => 'Skriv moviesliderindlæg', 'de' => 'Veröffentliche neue Artikel und Movieslider-Einträge', 'sl' => 'Objavite movieslider prispevke', 'fi' => 'Kirjoita movieslideri artikkeleita.', 'el' => 'Δημιουργήστε άρθρα και εγγραφές στο ιστολόγιο σας.', 'es' => 'Escribe entradas para los artículos y movieslider (web log).', 'fa' => 'مقالات منتشر شده در بلاگ', 'fr' => 'Poster des articles d\'actualités.', 'he' => 'ניהול בלוג', 'id' => 'Post entri movieslider', 'it' => 'Pubblica notizie e post per il movieslider.', 'lt' => 'Rašykite naujienas bei movieslider\'o įrašus.', 'nl' => 'Post nieuwsartikelen en moviesliders op uw site.', 'pl' => 'Dodawaj nowe wpisy na movieslideru', 'ru' => 'Управление записями блога.', 'tw' => '發表新聞訊息、部落格等文章。', 'cn' => '发表新闻讯息、部落格等文章。', 'th' => 'โพสต์รายการบล็อก', 'hu' => 'Movieslider bejegyzések létrehozása.', 'se' => 'Inlägg i movieslidergen.'), 'frontend' => true, 'backend' => true, 'skip_xss' => true, 'menu' => 'content', 'roles' => array('put_live', 'edit_live', 'delete_live'), 'sections' => array('posts' => array('name' => 'movieslider:posts_title', 'uri' => 'admin/movieslider', 'shortcuts' => array(array('name' => 'movieslider:create_title', 'uri' => 'admin/movieslider/create', 'class' => 'add'))), 'categories' => array('name' => 'cat:list_title', 'uri' => 'admin/movieslider/categories', 'shortcuts' => array(array('name' => 'cat:create_title', 'uri' => 'admin/movieslider/categories/create', 'class' => 'add')))));
     if (function_exists('group_has_role')) {
         if (group_has_role('movieslider', 'admin_movieslider_fields')) {
             $info['sections']['fields'] = array('name' => 'global:custom_fields', 'uri' => 'admin/movieslider/fields', 'shortcuts' => array('create' => array('name' => 'streams:add_field', 'uri' => 'admin/movieslider/fields/create', 'class' => 'add')));
         }
     }
     return $info;
 }
예제 #3
0
파일: details.php 프로젝트: nockout/tshpro
 public function info()
 {
     $info = array('name' => array('en' => 'Customer design', 'vi' => 'khách hàng'), 'description' => array('en' => 'Let users register and log in to the site, and manage them via home page.', 'se' => 'Låt dina besökare registrera sig och logga in på webbplatsen. Hantera sedan användarna via kontrollpanelen.'), 'frontend' => true, 'backend' => false, 'menu' => false, 'roles' => array('admin_profile_fields'));
     if (function_exists('group_has_role')) {
         if (group_has_role('users', 'admin_profile_fields')) {
             $info['sections'] = array('users' => array('name' => 'user:list_title', 'uri' => 'admin/users', 'shortcuts' => array('create' => array('name' => 'user:add_title', 'uri' => 'admin/users/create', 'class' => 'add'))), 'fields' => array('name' => 'user:profile_fields_label', 'uri' => 'admin/users/fields', 'shortcuts' => array('create' => array('name' => 'user:add_field', 'uri' => 'admin/users/fields/create', 'class' => 'add'))));
         }
     }
     return $info;
 }
예제 #4
0
파일: details.php 프로젝트: nockout/tshpro
 public function info()
 {
     $info = array('name' => array('en' => 'Users', 'ar' => 'المستخدمون', 'br' => 'Usuários', 'pt' => 'Utilizadores', 'cs' => 'Uživatelé', 'da' => 'Brugere', 'de' => 'Benutzer', 'el' => 'Χρήστες', 'es' => 'Usuarios', 'fa' => 'کاربران', 'fi' => 'Käyttäjät', 'fr' => 'Utilisateurs', 'he' => 'משתמשים', 'id' => 'Pengguna', 'it' => 'Utenti', 'lt' => 'Vartotojai', 'nl' => 'Gebruikers', 'pl' => 'Użytkownicy', 'ru' => 'Пользователи', 'sl' => 'Uporabniki', 'tw' => '用戶', 'cn' => '用户', 'hu' => 'Felhasználók', 'th' => 'ผู้ใช้งาน', 'se' => 'Användare'), 'description' => array('en' => 'Let users register and log in to the site, and manage them via the control panel.', 'ar' => 'تمكين المستخدمين من التسجيل والدخول إلى الموقع، وإدارتهم من لوحة التحكم.', 'br' => 'Permite com que usuários se registrem e entrem no site e também que eles sejam gerenciáveis apartir do painel de controle.', 'pt' => 'Permite com que os utilizadores se registem e entrem no site e também que eles sejam geriveis apartir do painel de controlo.', 'cs' => 'Umožňuje uživatelům se registrovat a přihlašovat a zároveň jejich správu v Kontrolním panelu.', 'da' => 'Lader brugere registrere sig og logge ind på sitet, og håndtér dem via kontrolpanelet.', 'de' => 'Erlaube Benutzern das Registrieren und Einloggen auf der Seite und verwalte sie über die Admin-Oberfläche.', 'el' => 'Παρέχει λειτουργίες εγγραφής και σύνδεσης στους επισκέπτες. Επίσης από εδώ γίνεται η διαχείριση των λογαριασμών.', 'es' => 'Permite el registro de nuevos usuarios quienes podrán loguearse en el sitio. Estos podrán controlarse desde el panel de administración.', 'fa' => 'به کاربر ها امکان ثبت نام و لاگین در سایت را بدهید و آنها را در پنل مدیریت نظارت کنید', 'fi' => 'Antaa käyttäjien rekisteröityä ja kirjautua sisään sivustolle sekä mahdollistaa niiden muokkaamisen hallintapaneelista.', 'fr' => 'Permet aux utilisateurs de s\'enregistrer et de se connecter au site et de les gérer via le panneau de contrôle', 'he' => 'ניהול משתמשים: רישום, הפעלה ומחיקה', 'id' => 'Memungkinkan pengguna untuk mendaftar dan masuk ke dalam situs, dan mengaturnya melalui control panel.', 'it' => 'Fai iscrivere de entrare nel sito gli utenti, e gestiscili attraverso il pannello di controllo.', 'lt' => 'Leidžia vartotojams registruotis ir prisijungti prie puslapio, ir valdyti juos per administravimo panele.', 'nl' => 'Laat gebruikers registreren en inloggen op de site, en beheer ze via het controlepaneel.', 'pl' => 'Pozwól użytkownikom na logowanie się na stronie i zarządzaj nimi za pomocą panelu.', 'ru' => 'Управление зарегистрированными пользователями, активирование новых пользователей.', 'sl' => 'Dovoli uporabnikom za registracijo in prijavo na strani, urejanje le teh preko nadzorne plošče', 'tw' => '讓用戶可以註冊並登入網站,並且管理者可在控制台內進行管理。', 'cn' => '让用户可以注册并登入网站,并且管理者可在控制台内进行管理。', 'th' => 'ให้ผู้ใช้ลงทะเบียนและเข้าสู่เว็บไซต์และจัดการกับพวกเขาผ่านทางแผงควบคุม', 'hu' => 'Hogy a felhasználók tudjanak az oldalra regisztrálni és belépni, valamint lehessen őket kezelni a vezérlőpulton.', 'se' => 'Låt dina besökare registrera sig och logga in på webbplatsen. Hantera sedan användarna via kontrollpanelen.'), 'frontend' => false, 'backend' => true, 'menu' => false, 'roles' => array('admin_profile_fields'));
     if (function_exists('group_has_role')) {
         if (group_has_role('users', 'admin_profile_fields')) {
             $info['sections'] = array('users' => array('name' => 'user:list_title', 'uri' => 'admin/users', 'shortcuts' => array('create' => array('name' => 'user:add_title', 'uri' => 'admin/users/create', 'class' => 'add'))), 'fields' => array('name' => 'user:profile_fields_label', 'uri' => 'admin/users/fields', 'shortcuts' => array('create' => array('name' => 'user:add_field', 'uri' => 'admin/users/fields/create', 'class' => 'add'))));
         }
     }
     return $info;
 }
예제 #5
0
 public function information()
 {
     $info = array('name' => array('en' => 'FireSALE', 'it' => 'FireSALE'), 'description' => array('en' => 'The lightweight eCommerce platform for PyroCMS', 'it' => 'Una leggera piattaforma eCommerce per PyroCMS'), 'frontend' => TRUE, 'backend' => TRUE, 'firesale_core' => TRUE, 'menu' => 'FireSALE', 'author' => 'Jamie Holdroyd & Chris Harvey', 'roles' => array('edit_orders', 'access_gateways', 'install_uninstall_gateways', 'enable_disable_gateways', 'edit_gateways'), 'sections' => array('dashboard' => array('name' => 'firesale:sections:dashboard', 'uri' => 'admin/firesale'), 'categories' => array('name' => 'firesale:sections:categories', 'uri' => 'admin/firesale/categories', 'shortcuts' => array(array('name' => 'firesale:shortcuts:cat_create', 'uri' => 'admin/firesale/categories', 'class' => 'add'))), 'products' => array('name' => 'firesale:sections:products', 'uri' => 'admin/firesale/products', 'shortcuts' => array(array('name' => 'firesale:shortcuts:prod_create', 'uri' => 'admin/firesale/products/create', 'class' => 'add'))), 'orders' => array('name' => 'firesale:sections:orders', 'uri' => 'admin/firesale/orders', 'shortcuts' => array(array('name' => 'firesale:shortcuts:create_order', 'uri' => 'admin/firesale/orders/create', 'class' => 'add'))), 'settings' => array('name' => 'firesale:sections:settings', 'uri' => 'admin/settings#firesale')), 'elements' => array('dashboard' => array(array('slug' => 'product_sales', 'title' => 'firesale:elements:product_sales', 'function' => 'product_sales', 'assets' => array(array('type' => 'css', 'file' => 'dashboard_productsales.css'), array('type' => 'js', 'file' => 'dashboard_productsales.js'))), array('slug' => 'low_stock', 'title' => 'firesale:elements:low_stock', 'function' => 'low_stock', 'assets' => array(array('type' => 'css', 'file' => 'dashboard_lowstock.css'))))));
     if (group_has_role('firesale', 'access_gateways')) {
         $info['sections']['gateways'] = array('name' => 'firesale:sections:gateways', 'uri' => 'admin/firesale/gateways', 'shortcuts' => array());
     }
     if (group_has_role('firesale', 'install_uninstall_gateways') and isset($info['sections']['gateways'])) {
         $info['sections']['gateways']['shortcuts'] = array(array('name' => 'firesale:shortcuts:install_gateway', 'uri' => 'admin/firesale/gateways/add', 'class' => 'add'));
     }
     return $info;
 }
예제 #6
0
/**
 * Checks if role has access to module or returns error 
 * 
 * @access public
 * @param string $module sample: pages
 * @param string $role sample: edit_live
 * @param string $redirect_to (default: 'admin') Url to redirect to if no access
 * @param string $message (default: '') Message to display if no access
 * @return mixed
 */
function role_or_die($module, $role, $redirect_to = 'admin', $message = '')
{
    ci()->lang->load('admin');
    if (ci()->input->is_ajax_request() and !group_has_role($module, $role)) {
        echo json_encode(array('error' => $message ? $message : lang('cp_access_denied')));
        return FALSE;
    } elseif (!group_has_role($module, $role)) {
        ci()->session->set_userdata('error', $message ? $message : lang('cp_access_denied'));
        redirect($redirect_to);
    }
    return TRUE;
}
예제 #7
0
파일: details.php 프로젝트: KosBeg/paybay
 public function info()
 {
     $info = array('name' => array('en' => 'Streams', 'es' => 'Streams', 'de' => 'Streams', 'el' => 'Ροές', 'lt' => 'Srautai', 'fr' => 'Streams'), 'description' => array('en' => 'Manage, structure, and display data.', 'es' => 'Administra, estructura, y presenta datos.', 'de' => 'Verwalte, strukturiere und veröffentliche Daten.', 'el' => 'Διαχείριση, δόμηση και προβολή πληροφοριών και δεδομένων.', 'lt' => null, 'fr' => 'Gérer, structurer et afficher des données'), 'frontend' => FALSE, 'backend' => TRUE, 'is_core' => FALSE, 'author' => 'Parse19', 'menu' => 'content', 'roles' => array('admin_streams', 'admin_fields'));
     if (function_exists('group_has_role')) {
         if (group_has_role('streams', 'admin_streams')) {
             $info['sections']['streams'] = array('name' => 'streams.streams', 'uri' => 'admin/streams');
         }
         if (group_has_role('streams', 'admin_fields')) {
             $info['sections']['fields'] = array('name' => 'streams.fields', 'uri' => 'admin/streams/fields', 'shortcuts' => array(array('name' => 'streams.new_field', 'uri' => 'admin/streams/fields/add', 'class' => 'add')));
         }
         $assignment_uris = array('assignments', 'new_assignment', 'edit_assignment', 'edit', 'view_options');
         $shortcuts = array();
         // Streams Add
         if (group_has_role('streams', 'admin_streams') and !in_array($this->uri->segment(3), $assignment_uris) and ($this->uri->segment(3) != 'entries' and $this->uri->segment(3) != 'manage')) {
             $shortcuts[] = array('name' => 'streams.add_stream', 'uri' => 'admin/streams/add/', 'class' => 'add');
         }
         // Entry Add
         if (!in_array($this->uri->segment(3), $assignment_uris) and ($this->uri->segment(3) != 'entries' and $this->uri->segment(3))) {
             $shortcuts[] = array('name' => 'streams.add_entry', 'uri' => 'admin/streams/entries/add/' . $this->uri->segment(4), 'class' => 'add');
         }
         // Assignment Add
         if (group_has_role('streams', 'admin_streams') and in_array($this->uri->segment(3), $assignment_uris) and $this->uri->segment(3) != 'entries' or $this->uri->segment(3) == 'manage') {
             $shortcuts[] = array('name' => 'streams.new_field_assign', 'uri' => 'admin/streams/new_assignment/' . $this->uri->segment(4), 'class' => 'add');
         }
         // Entries
         if (!in_array($this->uri->segment(3), $assignment_uris) and $this->uri->segment(3) == 'entries') {
             if (group_has_role('streams', 'admin_streams')) {
                 $shortcuts[] = array('name' => 'streams.manage', 'uri' => 'admin/streams/manage/' . $this->uri->segment(5));
             }
             $shortcuts[] = array('name' => 'streams.add_entry', 'uri' => 'admin/streams/entries/add/' . $this->uri->segment(5), 'class' => 'add');
         }
         // We only need to nest the shortcuts in sections
         // if we actually need sections.
         if (group_has_role('streams', 'admin_streams') or group_has_role('streams', 'admin_fields')) {
             $info['sections']['streams']['shortcuts'] = $shortcuts;
         } else {
             $info['shortcuts'] = $shortcuts;
         }
     }
     return $info;
 }
예제 #8
0
 public function info()
 {
     $info = array('name' => array('en' => 'Streams', 'es' => 'Streams'), 'description' => array('en' => 'Manage, structure, and display data.', 'es' => 'Administra, estructura, y presenta datos.'), 'frontend' => FALSE, 'backend' => TRUE, 'author' => 'Parse19', 'menu' => 'content', 'roles' => array('admin_streams', 'admin_fields'), 'sections' => array('streams' => array('name' => 'streams.streams', 'uri' => 'admin/streams'), 'fields' => array('name' => 'streams.fields', 'uri' => 'admin/streams/fields', 'shortcuts' => array(array('name' => 'streams.field_types', 'uri' => 'admin/streams/fields/types'), array('name' => 'streams.new_field', 'uri' => 'admin/streams/fields/add', 'class' => 'add')))));
     $assignment_uris = array('assignments', 'new_assignment', 'edit_assignment', 'edit', 'view_options');
     if (function_exists('group_has_role')) {
         // Streams Add
         if (group_has_role('streams', 'admin_streams') and !in_array($this->uri->segment(3), $assignment_uris) and $this->uri->segment(3) != 'entries') {
             $info['sections']['streams']['shortcuts'][] = array('name' => 'streams.add_stream', 'uri' => 'admin/streams/add', 'class' => 'add');
         }
         // Assignment Add
         if (group_has_role('streams', 'admin_streams') and in_array($this->uri->segment(3), $assignment_uris) and $this->uri->segment(3) != 'entries' or $this->uri->segment(3) == 'manage') {
             $info['sections']['streams']['shortcuts'][] = array('name' => 'streams.new_field_assign', 'uri' => 'admin/streams/new_assignment/' . $this->uri->segment(4), 'class' => 'add');
         }
         // Entries
         if (!in_array($this->uri->segment(3), $assignment_uris) and $this->uri->segment(3) == 'entries') {
             if (group_has_role('streams', 'admin_streams')) {
                 $info['sections']['streams']['shortcuts'][] = array('name' => 'streams.manage', 'uri' => 'admin/streams/manage/' . $this->uri->segment(5));
             }
             $info['sections']['streams']['shortcuts'][] = array('name' => 'streams.add_entry', 'uri' => 'admin/streams/entries/add/' . $this->uri->segment(5), 'class' => 'add');
         }
     }
     return $info;
 }
예제 #9
0
파일: index.php 프로젝트: KosBeg/paybay
			
			</td>
		</tr>
	<?php 
    }
    ?>
	</tbody>
</table>

<?php 
    echo $pagination['links'];
    ?>

<?php 
} else {
    ?>
	<div class="no_data">
	<?php 
    if (!group_has_role('streams', 'admin_streams')) {
        echo lang('streams.start.no_streams_yet');
    } else {
        echo lang('streams.start.no_streams') . ' ' . anchor('admin/streams/add', lang('streams.start.adding_one')) . '.';
    }
    ?>
	</div>
<?php 
}
?>

</section>
예제 #10
0
 /**
  * Edit an existing user
  *
  * @param int $id The ID of the user to edit
  * @return void
  */
 public function edit($id = 0)
 {
     group_has_role('users', 'edit') or access_denied();
     // Get the user's data
     $member = $this->ion_auth->get_user($id);
     // Got user?
     if (!$member) {
         $this->session->set_userdata('error', $this->lang->line('user_edit_user_not_found_error'));
         redirect('admin/users');
     }
     // Check to see if we are changing emails
     if ($member->email != $this->input->post('email')) {
         // TODO Check to make sure changed emails are unique
         // $this->validation_rules[5]['rules'] .= '|callback__email_check';
     }
     // Get the POST data
     $update_data['first_name'] = $this->input->post('first_name');
     $update_data['last_name'] = $this->input->post('last_name');
     $update_data['email'] = $this->input->post('email');
     $update_data['active'] = $this->input->post('active');
     $update_data['group_id'] = $this->input->post('group_id');
     // Password provided, hash it for storage
     if ($this->input->post('password')) {
         $update_data['password'] = $this->input->post('password');
     }
     if ($_POST) {
         // Run the validation
         if ($this->user_m->validate($update_data)) {
             if ($this->ion_auth->update_user($id, $update_data)) {
                 $this->session->set_userdata('success', $this->ion_auth->messages());
             } else {
                 $this->session->set_userdata('error', $this->ion_auth->errors());
             }
             redirect('admin/users');
         } else {
             // Dirty hack that fixes the issue of having to re-add all data upon an error
             $member = (object) array_merge($member, $_POST);
             $member->full_name = $member->first_name . ' ' . $member->last_name;
         }
     }
     $groups = array();
     foreach ($this->ion_auth->get_groups() as $group) {
         $groups[$group->id] = $group->description;
     }
     $this->template->title($this->module_details['name'], sprintf(lang('user_edit_title'), $member->first_name . ' ' . $member->last_name))->set('member', $member)->set('groups', $groups)->build('admin/form');
 }
예제 #11
0
<nav id="shortcuts">
	<h6><?php 
echo lang('cp_shortcuts_title');
?>
</h6>
	<ul>
		<li><?php 
echo anchor('admin/snippets/list_snippets', lang('snippets.list_snippets'), array('class' => 'snippets'));
?>
</li>
		<?php 
if (group_has_role('snippets', 'admin_snippets')) {
    ?>
<li><?php 
    echo anchor('admin/snippets/create_snippet', lang('snippets.add_snippet'), array('class' => 'add'));
    ?>
</li><?php 
}
?>
	</ul>
	<br class="clear-both" />
</nav>
예제 #12
0
<h4><?php 
echo lang('file_folders.folders_title');
?>
</h4>
<ul id="files-nav">
	<?php 
if (group_has_role('files', 'edit_file')) {
    ?>
	<li class="<?php 
    echo !$current_id ? 'current' : NULL;
    ?>
"><a href="<?php 
    echo site_url('admin/files/folders');
    ?>
" title="<?php 
    echo lang('file_folders.manage_title');
    ?>
" data-path="" class="folder-hash">
		<span><?php 
    echo lang('file_folders.manage_title');
    ?>
</span></a>
	</li>
	<?php 
}
?>
	
	<?php 
foreach ($file_folders as $folder) {
    ?>
	<?php 
예제 #13
0
function role_or_die($module, $role)
{
	group_has_role($module, $role) or die(lang('cp_access_denied'));
}
예제 #14
0
</td>
						<td><?php 
        echo $order['ship_to']['country']['name'];
        ?>
</td>
						<td><?php 
        echo $this->settings->get('currency') . $order['price_total'];
        ?>
</td>
						<td><?php 
        echo $this->settings->get('currency') . $order['price_ship'];
        ?>
</td>
						<td class="actions">
							<?php 
        if (group_has_role('firesale', 'edit_orders')) {
            ?>
								<a class="button small" href="<?php 
            echo site_url('admin/firesale/orders/edit/' . $order['id']);
            ?>
"><?php 
            echo lang('buttons.edit');
            ?>
</a>
							<?php 
        }
        ?>
							<a class="button small confirm" href="<?php 
        echo site_url('admin/firesale/orders/delete/' . $order['id']);
        ?>
"><?php 
예제 #15
0
				<td><?php echo lang('files.type_'.$file->type); ?></td>
				<td><?php echo $file->filename; ?></td>
				<td class="align-center"><?php echo format_date($file->date_added); ?></td>
				<td class="align-center buttons buttons-small">
				<?php 
					if (group_has_role('files', 'download_file')) 
					{
						echo anchor('files/download/' . $file->id, lang('files.download_label'), array('class' => 'button download download_file'));
					}
					
						if (group_has_role('files', 'edit_file')) 
					{
						echo anchor('admin/files/edit/' . $file->id, lang('buttons.edit'), array('class' => 'button edit edit_file'));
					}
					
					if (group_has_role('files', 'delete_file')) 
					{
						echo anchor('admin/files/delete/' . $file->id, lang('buttons.delete'), array('class'=>'confirm button delete'));
					}
				?>
				</td>
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>
	
	<div class="buttons align-right padding-top">
		<?php $this->load->view('admin/partials/buttons', array('buttons' => array('delete'))); ?>
	</div>

	<?php else: ?>
예제 #16
0
 /**
  * Edit a snippet
  *
  */
 public function edit_snippet($snippet_id = null)
 {
     $this->template->append_metadata(js('debounce.js', 'snippets'));
     $this->template->append_metadata(js('new_snippet.js', 'snippets'));
     // -------------------------------------
     // Validation & Setup
     // -------------------------------------
     $this->load->library('form_validation');
     $this->snippet_rules[1]['rules'] .= '|callback__check_slug[update]';
     // We need to edit the rules if we are a user that
     // can't access certain things.
     if (!group_has_role('snippets', 'admin_snippets')) {
         unset($this->snippet_rules[0]);
         unset($this->snippet_rules[1]);
         unset($this->snippet_rules[2]);
     }
     $this->form_validation->set_rules($this->snippet_rules);
     // -------------------------------------
     // Get snippet data
     // -------------------------------------
     $snippet = $this->snippets_m->get_snippet($snippet_id);
     $mode = 'outgoing';
     // Switch it up for images
     // -------------------------------------
     // Set WYSIWYG for snippet Type
     // -------------------------------------
     if ($snippet->type == 'wysiwyg') {
         $this->template->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE));
     } elseif ($snippet->type == 'image') {
         $this->load->model('files/file_m');
         $images = $this->file_m->order_by('name', 'ASC')->dropdown('name');
         $images[0] = '-- ' . lang('snippets.snippet_image') . ' --';
         $this->template->set('images', $images);
         $mode = 'incoming';
         // Reset the mode to incoming because we only need the id & name
     }
     // -------------------------------------
     // Get snippet data
     // -------------------------------------
     $snippet->content = $this->snippets_m->process_type($snippet->type, $snippet->content, $mode);
     // -------------------------------------
     // Process Data
     // -------------------------------------
     if ($this->form_validation->run()) {
         foreach ($this->snippet_rules as $key => $rule) {
             $snippet->{$rule['field']} = $this->input->post($rule['field'], TRUE);
         }
         if (!$this->snippets_m->update_snippet($snippet, $snippet_id)) {
             $this->session->set_flashdata('notice', lang('snippets.update_snippet_error'));
         } else {
             $this->session->set_flashdata('success', lang('snippets.update_snippet_success'));
         }
         redirect('admin/snippets');
     }
     // -------------------------------------
     $this->template->set('snippet', $snippet)->build('admin/edit');
 }
예제 #17
0
파일: nav.php 프로젝트: JamieLomas/pyrocms
<h3><?php echo lang('file_folders.folders_title'); ?></h3>
<ul id="files-nav">
	<?php if (group_has_role('files', 'edit_file')): ?>
	<li class="<?php echo ( ! $current_id) ? 'current' : NULL; ?>"><a href="<?php echo site_url('admin/files/folders'); ?>" title="<?php echo lang('file_folders.manage_title'); ?>" data-path="" class="folder-hash"><span><?php echo lang('file_folders.manage_title'); ?></span></a></li>
	<?php endif; ?>

	<?php foreach ($file_folders as $folder): ?>
	<?php if ( ! $folder->parent_id): ?>
	<li class="<?php echo ($current_id === $folder->id) ? 'current' : NULL; ?>"><a href="<?php echo site_url('admin/files/folders/contents/' . $folder->id); ?>" title="<?php echo $folder->name; ?>" data-path="<?php echo $folder->virtual_path; ?>" class="folder-hash"><?php echo $folder->name; ?></a></li>
	<?php endif; ?>
	<?php endforeach; ?>
</ul>
예제 #18
0
        ?>
</span>
					</button>
				
					<button class="btn red orange" value="disable" name="btnAction" type="submit" disabled="">
						<span><?php 
        echo lang('buttons.disable');
        ?>
</span>
					</button>
				<?php 
    }
    ?>
				
				<?php 
    if (group_has_role('firesale', 'install_uninstall_gateways')) {
        ?>
					<button class="btn red confirm" title="<?php 
        echo lang('firesale:gateways:multiple_warning');
        ?>
" value="uninstall" name="btnAction" type="submit" disabled="">
						<span><?php 
        echo lang('buttons.uninstall');
        ?>
</span>
					</button>
				<?php 
    }
    ?>
			</div>
			
예제 #19
0
						<?php 
            echo anchor('admin/files/folders/delete/' . $folder->id, lang('buttons.delete'), array('class' => 'confirm button delete'));
            ?>
						<?php 
        }
        ?>
					</td>
				</tr>
			<?php 
    }
    ?>
			</tbody>
		</table>
		
		<?php 
    if (group_has_role('files', 'delete_folder')) {
        ?>
		<div class="table_action_buttons">
			<button type="submit" name="btnAction" value="delete" class="btn red confirm">
				<span><?php 
        echo lang('buttons.delete');
        ?>
</span>
			</button>
		</div>
		<?php 
    }
    ?>
		
	<?php 
    echo form_close();