public static function output($atts = array())
 {
     // Get the tabs
     $current_clinet_tab = wpaam_get_current_clients_tab();
     $all_tabs = array_keys(wpaam_get_clients_page_tabs());
     // Display template
     if (is_user_logged_in()) {
         get_wpaam_template('clients.php', array('atts' => $atts, 'user_id' => self::$user->ID, 'current_tab' => $current_clinet_tab, 'all_tabs' => $all_tabs));
         // Show login form if not logged in
     } else {
         echo wpaam_login_form();
     }
 }
 /**
  * Output the form.
  *
  */
 public static function output($atts = array())
 {
     // Display template
     if (is_user_logged_in()) {
         if (isset($_POST['submit_wpaam_payments'])) {
             // Show errors from fields
             self::show_errors();
             // Show confirmation messages
             self::show_confirmations();
         }
         get_wpaam_template('forms/payments-form.php', array('atts' => $atts, 'form' => self::$form_name, 'user_id' => self::$user->ID));
         // Show login form if not logged in
     } else {
         echo wpaam_login_form();
     }
 }
 /**
  * Output the form.
  *
  * @access public
  * @since 1.0.0
  * @return void
  */
 public static function output($atts = array())
 {
     // Get the tabs
     $current_tab = wpaam_get_current_invoices_tab();
     $all_tabs = array_keys(wpaam_get_invoices_page_tabs());
     // Display template
     if (is_user_logged_in()) {
         if (isset($_POST['submit_wpaam_invoices'])) {
             // Show errors from fields
             self::show_errors();
             // Show confirmation messages
             self::show_confirmations();
         }
         get_wpaam_template('forms/edit-invoice-form.php', array('atts' => $atts, 'form' => self::$form_name, 'author_id' => self::$user->ID, 'current_tab' => $current_tab, 'all_tabs' => $all_tabs));
         // Show login form if not logged in
     } else {
         echo wpaam_login_form();
     }
 }
 /**
  * Output the form.
  *
  * @access public
  * @since 1.0.0
  * @return void
  */
 public static function output($atts = array())
 {
     // Get fields
     self::get_update_password_fields();
     if (isset($_POST['submit_wpaam_update_password'])) {
         // Show errors from fields
         self::show_errors();
         // Show confirmation messages
         self::show_confirmations();
     }
     // Display template
     if (is_user_logged_in()) {
         get_wpaam_template('forms/password-update-form.php', array('form' => self::$form_name, 'password_fields' => self::get_fields('password_update')));
     } else {
         echo wpaam_login_form();
     }
 }
 /**
  * Output the form.
  *
  * @access public
  * @since 1.0.0
  * @return void
  */
 public static function output($atts = array())
 {
     // Get the tabs
     $current_account_tab = wpaam_get_current_account_tab();
     $all_tabs = array_keys(wpaam_get_account_page_tabs());
     // Display template
     if (is_user_logged_in() && current_user_can('create_users')) {
         if (isset($_POST['submit_wpaam_profile'])) {
             // Show errors from fields
             self::show_errors();
             // Show confirmation messages
             self::show_confirmations();
         }
         get_wpaam_template('forms/account-form.php', array('atts' => $atts, 'form' => self::$form_name, 'user_id' => self::$user->ID, 'current_tab' => $current_account_tab, 'all_tabs' => $all_tabs));
     } elseif (is_user_logged_in() && current_user_can('aam_client')) {
         get_wpaam_template('client_account.php', array('atts' => $atts, 'form' => self::$form_name, 'user_id' => self::$user->ID, 'current_tab' => $current_account_tab, 'all_tabs' => $all_tabs));
         // Show login form if not logged in
     } else {
         echo wpaam_login_form();
     }
 }
Example #6
0
 public function wpaam_invoices($atts, $content = null)
 {
     $user = wp_get_current_user();
     //echo $user->roles[0]; die;
     //Get the tabs
     $current_invoices_tab = wpaam_get_current_invoices_tab();
     $all_tabs_inv = array_keys(wpaam_get_invoices_page_tabs());
     // Display template for aam user's
     if (is_user_logged_in() && current_user_can('edit_invoice') && current_user_can('publish_invoice')) {
         get_wpaam_template('invoices.php', array('atts' => $atts, 'form' => 'edit-invoice', 'user_id' => $user->ID, 'current_tab' => $current_invoices_tab, 'all_tabs' => $all_tabs_inv));
         // Display Invoices list for client's
     } elseif (is_user_logged_in() && current_user_can('aam_client')) {
         get_wpaam_template('client_invoices.php', array('user_id' => $user->ID));
         // Show login form if not logged in
     } else {
         echo wpaam_login_form();
     }
 }