loadIniFile('modules/summary/customers.php'); $this->_title = $osC_Language->get('summary_customers_title'); $this->_title_link = osc_href_link_admin(FILENAME_DEFAULT, 'customers'); if ( osC_Access::hasAccess('customers') ) { $this->_setData(); } } /* Private methods */ function _setData() { global $osC_Database, $osC_Language; $this->_data = '' . ' ' . ' ' . ' ' . ' ' . ' ' . ' ' . ' ' . ' '; $Qcustomers = $osC_Database->query('select customers_id, customers_gender, customers_lastname, customers_firstname, customers_status, date_account_created from :table_customers order by date_account_created desc limit 6'); $Qcustomers->bindTable(':table_customers', TABLE_CUSTOMERS); $Qcustomers->execute(); while ( $Qcustomers->next() ) { $customer_icon = osc_icon('people.png'); if ( ACCOUNT_GENDER > -1 ) { switch ( $Qcustomers->value('customers_gender') ) { case 'm': $customer_icon = osc_icon('user_male.png'); break; case 'f': $customer_icon = osc_icon('user_female.png'); break; } } $this->_data .= ' ' . ' ' . ' ' . ' ' . ' '; } $this->_data .= ' ' . '
' . $osC_Language->get('summary_customers_table_heading_customers') . '' . $osC_Language->get('summary_customers_table_heading_date') . '' . $osC_Language->get('summary_customers_table_heading_status') . '
' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, 'customers&cID=' . $Qcustomers->valueInt('customers_id') . '&action=save'), $customer_icon . ' ' . $Qcustomers->valueProtected('customers_firstname') . ' ' . $Qcustomers->valueProtected('customers_lastname')) . '' . osC_DateTime::getShort($Qcustomers->value('date_account_created')) . '' . osc_icon(($Qcustomers->valueInt('customers_status') === 1) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif', null, null) . '
'; $Qcustomers->freeResult(); } } ?>