Example #1
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['invoice_types'] = dd2menu('invoice_types', ['invoice_type_id' => name()]);
     $this->form_validation->set_rules('name_en', lang('departments_name_en'), "trim|required");
     $this->form_validation->set_rules('name_ar', lang('departments_name_ar'), "trim|required");
     $this->form_validation->set_rules('desc', lang('departments_desc'), "trim|required");
 }
Example #2
0
/**
 * get likes phrase
 * 
 * @param ARRAY $likes
 * @return STRING $phrase
 */
function get_likes_phrase($likes, $total_likes, $liked)
{
    if ($total_likes > 0) {
        if ($liked == 'yes') {
            if ($total_likes > 2) {
                $phrase = sprintf(lang('You and %s other like this'), $total_likes - 1);
            } elseif ($total_likes == 2) {
                foreach ($likes as $like) {
                    if ($like['userid'] != userid()) {
                        break;
                    }
                }
                $username = name($like);
                $phrase = sprintf(lang('You and %s like this'), $username);
            } else {
                $phrase = lang('You like this');
            }
        } else {
            if ($total_likes == 1) {
                //$likes = $results['likes'];
                foreach ($likes as $like) {
                    break;
                }
                $username = name($like);
                $phrase = sprintf(lang('%s likes this post'), $username);
            } else {
                $phrase = sprintf(lang('%s people like this post'), $total_likes);
            }
        }
    } else {
        $phrase = lang('Be the first to like this post');
    }
    return $phrase;
}
Example #3
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['device_types'] = dd2menu('device_types', ['device_type_id' => name()]);
     $this->data['device_status'] = dd2menu('device_status', ['device_status_id' => name()]);
     $this->data['warranties'] = dd2menu('warranties', ['warranty_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '0';
     $this->form_validation->set_rules('device_type_id', lang('devices_device_type_id'), "trim|required");
     $this->form_validation->set_rules('name_en', lang('devices_name_en'), "trim|required");
     $this->form_validation->set_rules('name_ar', lang('devices_name_ar'), "trim|required");
     $this->form_validation->set_rules('device_status_id', lang('devices_device_status_id'), "trim|required");
     $this->form_validation->set_rules('free_sim', lang('devices_free_sim'), "trim|required");
     $this->form_validation->set_rules('warranty_id', lang('devices_warranty_id'), "trim|required");
     $this->form_validation->set_rules('warranty_days', lang('devices_warranty_days'), "trim|required");
     $this->form_validation->set_rules('partner', lang('devices_partner'), "trim|required");
     $this->form_validation->set_rules('cost', lang('devices_cost'), "trim|required");
     $this->form_validation->set_rules('commision', lang('devices_commision'), "trim|required");
     $this->form_validation->set_rules('price', lang('devices_price'), "trim|required");
     $this->form_validation->set_rules('discount', lang('devices_discount'), "trim|required");
     $this->form_validation->set_rules('desc', lang('devices_desc'), "trim|required");
     $this->form_validation->set_rules('points', lang('devices_points'), "trim|required");
     $this->form_validation->set_rules('barcode', lang('devices_barcode'), "trim|required");
     //        $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required . "]");
 }
Example #4
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['branches'] = dd2menu('branches', ['branch_id' => 'name']);
     $this->data['usergroups'] = dd2menu('usergroups', ['usergroup_id' => 'name']);
     $this->data['user_status'] = dd2menu('user_status', ['user_status_id' => name()]);
     $this->data['languages'] = ddlanguages();
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '0';
     $this->form_validation->set_rules('branch_id', lang('users_branch_id'), "trim|required");
     $this->form_validation->set_rules('usergroup_id', lang('users_usergroup_id'), "trim|required");
     $this->form_validation->set_rules('language', lang('users_language'), "trim|required");
     $this->form_validation->set_rules('username', lang('users_username'), "trim|required");
     $this->form_validation->set_rules('full_name', lang('users_full_name'), "trim|required");
     $this->form_validation->set_rules('email', lang('users_email'), "trim|required|valid_email");
     $this->form_validation->set_rules('phone', lang('users_phone'), "trim|numeric");
     $this->form_validation->set_rules('mobile', lang('users_mobile'), "trim|required|numeric");
     $this->form_validation->set_rules('password', lang('users_password'), "trim" . $op == 'add' ? '|required' : null);
     $this->form_validation->set_rules('address', lang('users_address'), "trim");
     $this->form_validation->set_rules('notes', lang('users_notes'), "trim");
     $this->form_validation->set_rules('salary', lang('users_salary'), "trim|numeric");
     $this->form_validation->set_rules('commision', lang('users_commision'), "trim|required");
     $this->form_validation->set_rules('id_no', lang('users_id_no'), "trim|required");
     $this->form_validation->set_rules('id_expiredate', lang('users_id_expiredate'), "trim|required");
     $this->form_validation->set_rules('passport_no', lang('users_passport_no'), "trim|required");
     $this->form_validation->set_rules('passport_expiredate', lang('users_passport_expiredate'), "trim|required");
     $this->form_validation->set_rules('status', lang('users_status'), "trim|required");
     $this->form_validation->set_rules('image', lang('users_image'), "callback_file[image," . $required . "]");
 }
 /** Generates an array of events (JSON encoded) for the calender */
 public function appointments()
 {
     $events = array();
     // For each appointment, create an event
     $appointments = $this->filter_appointments($this->input->post('start'), $this->input->post('end'));
     foreach ($appointments as $appointment) {
         // Participant, experiment and leader
         $participant = $this->participationModel->get_participant_by_participation($appointment->id);
         $experiment = $this->participationModel->get_experiment_by_participation($appointment->id);
         $leader = $this->participationModel->get_user_by_participation($appointment->id);
         // Begin and end datetime
         $dateTime = new DateTime($appointment->appointment);
         $startTime = $dateTime->format(DateTime::ISO8601);
         $minutes = $experiment->duration + INSTRUCTION_DURATION;
         $dateTime->add(new DateInterval('PT' . $minutes . 'M'));
         $end = $dateTime->format(DateTime::ISO8601);
         // Colors
         $bgcolor = $experiment->experiment_color;
         $textcolor = isset($bgcolor) ? get_foreground_color($bgcolor) : '';
         // Title
         $title = "\n" . name($participant);
         $title .= "\n" . location_name($experiment->location_id);
         if ($leader) {
             $title .= ' / ' . $leader->firstname;
         }
         // Generate array for event
         $event = array('title' => $title, 'start' => $startTime, 'end' => $end, 'color' => $bgcolor, 'textColor' => $textcolor, 'experiment' => $experiment->name, 'type' => $experiment->type, 'tooltip' => $this->generate_tooltip($appointment, $participant, $experiment), 'message' => $this->get_messages($appointment), 'className' => $appointment->cancelled != 0 ? 'event-cancelled' : '');
         // Add array to events
         array_push($events, $event);
     }
     // Returns a json array
     echo json_encode($events);
 }
Example #6
0
 public function indexFixes()
 {
     $this->{$this->model}->custom_select = '*';
     //        $this->{$this->model}->joins = array(
     //            'business_types' => array('business_types.business_type_id = companies.business_type_id', 'inner')
     //        );
     $this->{$this->model}->order_by[name()] = 'ASC';
 }
Example #7
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['fee_types'] = dd2menu('fee_types', ['fee_type_id' => name()]);
     $this->form_validation->set_rules('branch_id', lang('fees_branch_id'), "trim|required");
     $this->form_validation->set_rules('fee_type_id', lang('fees_fee_type_id'), "trim|required");
     $this->form_validation->set_rules('amount', lang('fees_amount'), "trim|required");
     $this->form_validation->set_rules('month', lang('fees_month'), "trim|required");
     $this->form_validation->set_rules('year', lang('fees_year'), "trim|required");
 }
Example #8
0
 /**
  * Return a member's name wrapped in an anchor tag linking to their profile page.
  *
  * @param int $memberId The ID of the member.
  * @param string $username The username of the member.
  * @return string
  */
 function memberLink($memberId, $username = "")
 {
     $displayName = name($username);
     if ($username) {
         return "<a href='" . URL(memberURL($memberId, $username)) . "' title='" . sprintf(sanitizeHTML(T("View %s's profile")), $displayName) . "'>{$displayName}</a>";
     } else {
         return $displayName;
     }
 }
 /** Checks whether participants listed as multilingual actually have more than one language added to them */
 function language_check($participant)
 {
     $CI =& get_instance();
     if ($participant->multilingual) {
         $languages = $CI->languageModel->get_languages_by_participant($participant->id);
         if (count($languages) <= 1) {
             return array(sprintf(lang('verify_languages'), name($participant), participant_edit_link($participant->id)));
         }
     }
     return array();
 }
Example #10
0
 public function barcode_process($barcode)
 {
     if (!$barcode) {
         die(json_encode(['error' => lang('orders_invalid_barcode')]));
     }
     $product = $this->db->where('barcode', $barcode)->get('products')->row();
     if (!$product) {
         die(json_encode(['error' => lang('orders_invalid_barcode')]));
     }
     echo json_encode(['product_id' => $product->product_id, 'product' => $product->{name()}, 'barcode' => $product->barcode, 'original_price' => $product->price, 'unit_price' => $product->price - $product->discount, 'discount' => $product->discount]);
 }
Example #11
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['invoice_types'] = dd2menu('invoice_types', ['invoice_type_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '1';
     $this->form_validation->set_rules('name_ar', lang('cash_types_name_ar'), "trim|required");
     $this->form_validation->set_rules('name_en', lang('cash_types_name_en'), "trim|required");
     //        $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required ."]");
 }
Example #12
0
 public function load_order_details($order_id)
 {
     if (!$order_id) {
         show_404();
     }
     $products = [];
     $orders_products = $this->db->where('pending_order_id', $order_id)->join('products', 'products.product_id = pending_order_products.product_id')->get('pending_order_products')->result();
     foreach ($orders_products as $product) {
         $products[] = ['product_id' => $product->product_id, 'product' => $product->{name()}, 'barcode' => $product->barcode, 'original_price' => $product->price, 'unit_price' => $product->price - $product->discount, 'discount' => $product->discount];
     }
     echo json_encode(['products' => $products]);
 }
Example #13
0
 private function invoiceData($invoice_id)
 {
     $data['item'] = $this->db->select("invoices.*, users.full_name as user, clients.name as client, branches.name as branch, invoice_status." . name() . ' as status')->where('invoices.invoice_id', $invoice_id)->join('users', 'users.user_id = invoices.user_id', 'left')->join('clients', 'clients.client_id = invoices.client_id', 'left')->join('branches', 'branches.branch_id = invoices.branch_id', 'left')->join('invoice_status', 'invoice_status.invoice_status_id = invoices.invoice_status_id', 'left')->get('invoices')->row();
     $data['order'] = $this->db->select('order_products.*, products.' . name() . ' as product')->where('orders.invoice_id', $invoice_id)->join('order_products', 'order_products.order_id = orders.order_id')->join('products', 'products.product_id = order_products.product_id')->get('orders')->result();
     $data['device'] = $this->db->select('device_orders.*, devices.' . name() . ' as name, devices.price, devices.discount')->where('invoice_id', $invoice_id)->join('devices', 'devices.device_id = device_orders.device_id')->get('device_orders')->row();
     $data['service'] = $this->db->select('service_orders.*, services.desc as name, services.price, services.discount')->where('invoice_id', $invoice_id)->join('services', 'services.service_id = service_orders.service_id')->get('service_orders')->row();
     $data['maintenance'] = $this->db->select('*')->where('invoice_id', $invoice_id)->get('format_orders')->row();
     $data['prepaid_card'] = $this->db->select('*')->where('invoice_id', $invoice_id)->join('prepaid_cards', 'prepaid_cards.prepaid_card_order_id = prepaid_card_orders.prepaid_card_order_id')->get('prepaid_card_orders')->result();
     $data['branch'] = $this->db->select('*')->where('branch_id', $data['item']->branch_id)->get('branches')->result();
     if ($data['order'][0]) {
         $data['offline_transactions'] = $this->db->select('*')->where('order_id', $data['order'][0]->order_id)->get('offline_transactions')->result();
     }
     return $data;
 }
 /** Checks whether participants whose parents are listed as dyslexic actually have a dyslexia item added to them */
 function dyslexia_check($participant)
 {
     $CI =& get_instance();
     $result = array();
     if ($participant->dyslexicparent) {
         $genders = str_split($participant->dyslexicparent);
         foreach ($genders as $gender) {
             $dyslexia = $CI->dyslexiaModel->get_dyslexia_by_participant_gender($participant->id, $gender);
             if (!$dyslexia) {
                 array_push($result, sprintf(lang('verify_dyslexia'), lcfirst(gender_parent($gender)), name($participant), anchor('dyslexia/add/', lang('here'), array('target' => '_blank'))));
             }
         }
     }
     return $result;
 }
Example #15
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['invoice_types'] = dd2menu('invoice_types', ['invoice_type_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '1';
     $this->form_validation->set_rules('ticket_id', lang('tickets_ticket_id'), "trim|required");
     $this->form_validation->set_rules('title', lang('tickets_title'), "trim|required");
     $this->form_validation->set_rules('department_id', lang('tickets_department_id'), "trim|required");
     $this->form_validation->set_rules('ticket_status_id', lang('tickets_ticket_status_id'), "trim|required");
     $this->form_validation->set_rules('client_id', lang('tickets_client_id'), "trim|required");
     $this->form_validation->set_rules('content', lang('tickets_content'), "trim|required");
     $this->form_validation->set_rules('datetime', lang('tickets_datetime'), "trim|required");
     $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required . "]");
 }
Example #16
0
 /** Specifies the content of a page with the contents for a specific participant */
 public function participant($participant_id)
 {
     $participant = $this->participantModel->get_participant_by_id($participant_id);
     // Check validity of participant
     if (empty($participant)) {
         $data['error'] = sprintf(lang('not_authorized'));
         $this->load->view('templates/error', $data);
         return;
     }
     create_impediment_table();
     $data['ajax_source'] = 'impediment/table/0/' . $participant_id;
     $data['page_title'] = sprintf(lang('impediments_for'), name($participant));
     $this->load->view('templates/header', $data);
     $this->load->view('templates/list_view', $data);
     $this->load->view('templates/footer');
 }
Example #17
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['categories'] = dd2menu('categories', ['category_id' => name()], ['parent_id' => 0], ['0' => lang('categories_main')]);
     //        $config['upload_path'] = './cdn/' . $this->_table;
     //        $config['allowed_types'] = 'gif|jpg|png|jpeg';
     //        $this->load->library('upload', $config);
     //        $required = ($op == 'add') ? '1' : '1';
     $this->form_validation->set_rules('parent_id', lang('categories_parent_id'), "trim|required");
     $this->form_validation->set_rules('name_en', lang('categories_name_en'), "trim|required");
     $this->form_validation->set_rules('name_ar', lang('categories_name_ar'), "trim|required");
     $this->form_validation->set_rules('desc_en', lang('categories_desc_en'), "trim");
     $this->form_validation->set_rules('desc_ar', lang('categories_desc_ar'), "trim");
     $this->form_validation->set_rules('display_order', lang('categories_display_order'), "trim");
     $this->form_validation->set_rules('status', lang('categories_status'), "trim|required");
     //        $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required . "]");
 }
Example #18
0
function getFiles($src, $src1)
{
    $cls = new buildQuery('omeka_');
    $itemsperId = array();
    $cmd = "ls {$src} ";
    //| grep '{$db['text']}'";
    exec($cmd, $res);
    foreach ($res as $k => $v) {
        // if($v != 'Transcript'){
        $itemList[name($v)][] = $v;
        //}
    }
    $cmd1 = "ls {$src1}";
    exec($cmd1, $res1);
    foreach ($res1 as $k => $v) {
        $itemList[name($v)][] = $v;
    }
    return $itemList;
}
Example #19
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['invoice_types'] = dd2menu('invoice_types', ['invoice_type_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '0';
     $this->form_validation->set_rules('name', lang('branches_name'), "trim|required");
     $this->form_validation->set_rules('place', lang('branches_place'), "trim|required");
     $this->form_validation->set_rules('notes', lang('branches_notes'), "trim");
     $this->form_validation->set_rules('phone', lang('branches_phone'), "trim|required|numeric");
     $this->form_validation->set_rules('sales_invoice_type_id', lang('branches_sales_invoice_type_id'), "trim|required");
     $this->form_validation->set_rules('format_invoice_type_id', lang('branches_format_invoice_type_id'), "trim|required");
     $this->form_validation->set_rules('services_invoice_type_id', lang('branches_services_invoice_type_id'), "trim|required");
     $this->form_validation->set_rules('accept_cc', lang('branches_accept_cc'), "trim|required");
     $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required . "]");
     $this->form_validation->set_rules('header', lang('branches_header'), "trim");
     $this->form_validation->set_rules('footer', lang('branches_footer'), "trim");
 }
Example #20
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['invoice_types'] = dd2menu('invoice_types', ['invoice_type_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '1';
     $this->form_validation->set_rules('service_order_id', lang('service_orders_service_order_id'), "trim|required");
     $this->form_validation->set_rules('serial', lang('service_orders_serial'), "trim|required");
     $this->form_validation->set_rules('barcode', lang('service_orders_barcode'), "trim|required");
     $this->form_validation->set_rules('mobile', lang('service_orders_mobile'), "trim|required");
     $this->form_validation->set_rules('social_id', lang('service_orders_social_id'), "trim|required");
     $this->form_validation->set_rules('invoice_id', lang('service_orders_invoice_id'), "trim|required");
     $this->form_validation->set_rules('client_id', lang('service_orders_client_id'), "trim|required");
     $this->form_validation->set_rules('branch_id', lang('service_orders_branch_id'), "trim|required");
     $this->form_validation->set_rules('status', lang('service_orders_status'), "trim|required");
     $this->form_validation->set_rules('timestamp', lang('service_orders_timestamp'), "trim|required");
     $this->form_validation->set_rules('created_at', lang('service_orders_created_at'), "trim|required");
     $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required . "]");
 }
Example #21
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['invoice_types'] = dd2menu('invoice_types', ['invoice_type_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '0';
     $this->form_validation->set_rules('barcode', lang('services_barcode'), "trim|required");
     $this->form_validation->set_rules('service_provider_id', lang('services_service_provider_id'), "trim|required");
     $this->form_validation->set_rules('sim_type_id', lang('services_sim_type_id'), "trim|required");
     $this->form_validation->set_rules('register', lang('services_register'), "trim|required");
     $this->form_validation->set_rules('register_code', lang('services_register_code'), "trim|required");
     $this->form_validation->set_rules('required', lang('services_required'), "trim|required");
     $this->form_validation->set_rules('commision', lang('services_commision'), "trim|required");
     $this->form_validation->set_rules('price', lang('services_price'), "trim|required");
     $this->form_validation->set_rules('cost', lang('services_cost'), "trim|required");
     $this->form_validation->set_rules('discount', lang('services_discount'), "trim|required");
     $this->form_validation->set_rules('desc', lang('services_desc'), "trim|required");
     $this->form_validation->set_rules('points', lang('services_points'), "trim|required");
     //        $this->form_validation->set_rules('logo', lang('branches_logo'), "callback_file[logo," . $required . "]");
 }
Example #22
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['service_providers'] = dd2menu('service_providers', ['service_provider_id' => name()]);
     $this->data['card_types'] = dd2menu('card_types', ['card_type_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '0';
     $this->form_validation->set_rules('service_provider_id', lang('prepaid_card_types_service_provider_id'), "trim|required");
     $this->form_validation->set_rules('card_type_id', lang('prepaid_card_types_card_type_id'), "trim|required");
     $this->form_validation->set_rules('image', lang('prepaid_card_types_image'), "callback_file[image," . $required . "]");
     $this->form_validation->set_rules('name_ar', lang('prepaid_card_types_name_ar'), "trim|required");
     $this->form_validation->set_rules('name_en', lang('prepaid_card_types_name_en'), "trim|required");
     $this->form_validation->set_rules('cost', lang('prepaid_card_types_cost'), "trim|required");
     $this->form_validation->set_rules('price', lang('prepaid_card_types_price'), "trim|required");
     $this->form_validation->set_rules('discount', lang('prepaid_card_types_discount'), "trim|required");
     $this->form_validation->set_rules('employee_commission', lang('prepaid_card_types_employee_commission'), "trim|required");
     $this->form_validation->set_rules('desc_ar', lang('prepaid_card_types_desc_ar'), "trim|required");
     $this->form_validation->set_rules('desc_en', lang('prepaid_card_types_desc_en'), "trim|required");
     $this->form_validation->set_rules('notes', lang('prepaid_card_types_notes'), "trim");
 }
Example #23
0
 protected function onValidationEvent($op, $id = false)
 {
     $this->data['categories'] = dd2menu('categories', ['category_id' => name()]);
     $this->data['marks'] = dd2menu('marks', ['mark_id' => name()]);
     $config['upload_path'] = './cdn/' . $this->_table;
     $config['allowed_types'] = 'gif|jpg|png|jpeg';
     $this->load->library('upload', $config);
     $required = $op == 'add' ? '1' : '0';
     $this->form_validation->set_rules('barcode', lang('products_barcode'), "trim|required");
     $this->form_validation->set_rules('name_ar', lang('products_name_ar'), "trim|required");
     $this->form_validation->set_rules('name_en', lang('products_name_en'), "trim|required");
     $this->form_validation->set_rules('category_id', lang('products_category_id'), "trim|required");
     $this->form_validation->set_rules('mark_id', lang('products_mark_id'), "trim|required");
     $this->form_validation->set_rules('commission', lang('products_commission'), "trim|required");
     $this->form_validation->set_rules('cost', lang('products_cost'), "trim|required");
     $this->form_validation->set_rules('price', lang('products_price'), "trim|required");
     $this->form_validation->set_rules('discount', lang('products_discount'), "trim|required");
     $this->form_validation->set_rules('featured', lang('products_featured'), "trim|required");
     $this->form_validation->set_rules('image', lang('products_image'), "callback_file[logo," . $required . "]");
     $this->form_validation->set_rules('amount', lang('products_amount'), "trim|required");
     $this->form_validation->set_rules('desc_en', lang('products_desc_en'), "trim|required");
     $this->form_validation->set_rules('desc_ar', lang('products_desc_ar'), "trim|required");
     $this->form_validation->set_rules('points', lang('products_points'), "trim|required");
 }
Example #24
0
<?php

require_once LIBPATH . "redfun.php";
require_once LIBPATH . "auth.php";
if (isset($_SESSION['userid'])) {
    if ($_REQUEST['action'] == "name") {
        name($_REQUEST['name'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "busy") {
        busy($_REQUEST['busy'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "contacts") {
        contacts($_REQUEST['phone'], $_REQUEST['email'], $_REQUEST['region'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "description") {
        description($_REQUEST['description'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "password") {
        pass($_REQUEST['pass'], $_REQUEST['oldpass'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "namemail") {
        namemail($_REQUEST['name'], $_REQUEST['email'], $_SESSION['userid']);
    }
} else {
    ?>
<script>alert("Вы не имеете доступа к этой странице, авторизуйтесь!");</script><?php 
    echo "<script>document.location.replace('/main');</script>";
}
Example #25
0
echo $table;
?>
" width="600" height="300"></iframe><a href="#" onclick="document.getElementById('add_pp').style.display='none';"><img src="images/closelabel.gif" border="0" /></a>
</div>
<form name="form1" method="post" action="add4.php">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
      <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#94C1EF">
        <tr>
		  <td height="25" colspan="2" align="center" bgcolor="#8BB9F8" class="font_2">
		    <span style="color:#FFFFFF; font-weight:bold">单页信息添加</span></td></tr>
        <tr>
          <td width="17%" height="25" align="right" bgcolor="#FFFFFF" class="font_2">栏目&nbsp;</td>
          <td width="83%" bgcolor="#FFFFFF"><?php 
echo name($nav_table, $id);
?>
</td>
        </tr>
		<tr>
          <td height="25" align="right" bgcolor="#FFFFFF" class="font_2">信息简介</td>
          <td bgcolor="#FFFFFF">
            <textarea name="cont1" cols="50" rows="3" id="cont1"><?php 
echo $rows_cx['cont1'];
?>
</textarea>            </td></tr>					
		
        <tr>
          <td height="25" align="right" bgcolor="#FFFFFF" class="font_2">缩略图和图片集</td>
          <td bgcolor="#FFFFFF">
          <input name="pp" type="text" id="pp" value="<?php 
Example #26
0
/**
 * Displays a full list of members allowed to view a conversation.
 *
 * @package esoTalk
 */
$conversation = $data["conversation"];
$names = array();
$count = count($conversation["membersAllowed"]);
// Go through the list of members/groups allowed and construct an array of formatted names.
foreach ($conversation["membersAllowed"] as $member) {
    // Format the entity's name depending on its type.
    if ($member["type"] == "group") {
        $member["avatarFormat"] = null;
        $member["name"] = groupName($member["name"], true);
    } else {
        $member["name"] = name($member["name"]);
    }
    // Add the avatar.
    $name = "<span class='name'>" . avatar($member["id"], $member["avatarFormat"], "thumb");
    // If we're able to remove entities from the list, wrap the name in links that will remove them.
    if (!empty($data["editable"])) {
        // Make the entity for the owner of the conversation non-removable unless it's the last name left.
        if ($count == 1 or $member["id"] != $conversation["startMemberId"] or $member["type"] != "member") {
            $name .= "<a href='" . URL("conversation/removeMember/{$conversation["conversationId"]}?{$member["type"]}={$member["id"]}&token=" . ET::$session->token) . "' class='deleteLink' data-type='{$member["type"]}' data-id='{$member["id"]}'>{$member["name"]}</a>";
        } else {
            $name .= $member["name"];
        }
    } else {
        $name .= $member["type"] == "member" ? memberLink($member["id"], $member["name"]) : groupLink($member["name"]);
    }
    $name .= "</span>";
			<th><?php 
echo lang('exec_client_ip');
?>
</th>
		</tr>
		<?php 
if ($total_cnt > 0) {
    foreach ($revision as $k => $v) {
        ?>
		<tr>
			<td><?php 
        echo $v->value;
        ?>
</td>
			<td><?php 
        echo name($v->user_id, $v->name, $v->nickname);
        ?>
</td>
			<td><?php 
        echo time2date($v->timestamp);
        ?>
</td>
			<td><?php 
        echo $v->client_ip;
        ?>
</td>
		</tr>
				<?php 
    }
}
?>
Example #28
0
<?php

error_reporting(E_ALL);
ini_set("display_errors", "On");
require_once 'functions.php';
$square = squared_numbers(15);
$fibo = fibonacci(100);
$name = name('greetings', 'gertrude');
$lotto = lottery();
var_dump($lotto);
Example #29
0
        </td>
        <td>
            <a href="javascript: void(0)" class="table-link menu-active" data-url="<?php 
    echo Url::to('/admin/settings/form');
    ?>
" data-id="<?php 
    echo $sub->id;
    ?>
">
                <span class="fa-stack">
                    <i class="fa fa-square fa-stack-2x"></i>
                    <i class="fa fa-pencil fa-stack-1x fa-inverse"></i>
                </span>
            </a>
            <a href="javascript: void(0)" class="table-link danger menu-delete" data-info="当前操作: <?php 
    echo name($sub->father_id2, $sub->father_id3) . ' - [' . $sub->name . ']';
    ?>
" data-url="<?php 
    echo Url::to('/admin/settings/delete');
    ?>
" data-id="<?php 
    echo $sub->id;
    ?>
">
                <span class="fa-stack">
                    <i class="fa fa-square fa-stack-2x"></i>
                    <i class="fa fa-trash-o fa-stack-1x fa-inverse"></i>
                </span>
            </a>
        </td>
    </tr>
Example #30
0
	
<div class="an-entities">
<?php 
foreach ($items as $item) {
    ?>
	<div class="an-entity">
		<div class="clearfix">
			<div class="entity-portrait-square">
				<?php 
    echo @avatar($item);
    ?>
			</div>
			
			<div class="entity-container">
				<h4 class="entity-name"><?php 
    echo @name($item);
    ?>
</h4>
				
				<div class="entity-meta">
				<?php 
    echo $item->followerCount;
    ?>
				<span class="stat-name"><?php 
    echo @text('COM-ACTORS-SOCIALGRAPH-FOLLOWERS');
    ?>
</span> 
				
				<?php 
    if ($item->isLeadable()) {
        ?>