本文整理汇总了PHP中Setting::getField方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getField方法的具体用法?PHP Setting::getField怎么用?PHP Setting::getField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::getField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: up
function up()
{
$retirement_signatory_prepared = '';
$retirement_signatory_prepared_position = '';
$retirement_signatory_approved = '';
$retirement_signatory_approved_position = '';
$retirement_signatory_certified = '';
$retirement_signatory_certified_position = '';
$retirement_signatory_attested = '';
$retirement_signatory_attested_position = '';
$retirement_signatory_availability = '';
$retirement_signatory_availability_position = '';
$retirement_signatory_noted = '';
$retirement_signatory_noted_position = '';
// Do only if Province of Laguna
$lgu_code = Setting::getField('lgu_code');
if ($lgu_code == 'laguna_province') {
$retirement_signatory_prepared = 'LEILANI M. SILAN';
$retirement_signatory_prepared_position = 'Administrative Officer V';
$retirement_signatory_approved = 'JEORGE E.R. EJERCITO ESTREGAN';
$retirement_signatory_approved_position = 'Governor';
$retirement_signatory_certified = 'NIDA A. REBENQUE';
$retirement_signatory_certified_position = "Asst. Prov'l HRMO";
$retirement_signatory_attested = 'EUGENIA R. MAGANO';
$retirement_signatory_attested_position = 'Provincial Human Resource Management Officer';
$retirement_signatory_availability = 'MARIETA V. JARA';
$retirement_signatory_availability_position = 'Provincial Budget Officer';
$retirement_signatory_noted = 'EVELYN T. VILLANUEVA';
$retirement_signatory_noted_position = 'Provincial Accountant';
}
$data = array(array('name' => 'retirement_signatory_prepared', 'setting_value' => $retirement_signatory_prepared, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_prepared_position', 'setting_value' => $retirement_signatory_prepared_position, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_approved', 'setting_value' => $retirement_signatory_approved, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_approved_position', 'setting_value' => $retirement_signatory_approved_position, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_certified', 'setting_value' => $retirement_signatory_certified, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_certified_position', 'setting_value' => $retirement_signatory_certified_position, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_attested', 'setting_value' => $retirement_signatory_attested, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_attested_position', 'setting_value' => $retirement_signatory_attested_position, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_availability', 'setting_value' => $retirement_signatory_availability, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_availability_position', 'setting_value' => $retirement_signatory_availability_position, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_noted', 'setting_value' => $retirement_signatory_noted, 'settings_group' => 'leave', 'description' => '.'), array('name' => 'retirement_signatory_noted_position', 'setting_value' => $retirement_signatory_noted_position, 'settings_group' => 'leave', 'description' => '.'));
$this->db->insert_batch('settings', $data);
}
示例2: up
function up()
{
$lgu_code = Setting::getField('lgu_code');
if ($lgu_code == '') {
if ($this->db->table_exists('pds_profile')) {
$this->db->order_by('id');
$q = $this->db->get('pds_profile');
if ($q->num_rows() > 0) {
foreach ($q->result_array() as $row) {
$p = new Employee_m();
$p->get_by_id($row['employee_id']);
$p->item_number = $row['item_number'];
$p->last_promotion = $row['last_promotion'];
$p->level = $row['level'];
$p->eligibility = $row['eligibility'];
$p->graduated = $row['graduated'];
$p->course = $row['course'];
$p->units = $row['units'];
$p->post_grad = $row['post_grad'];
$p->save();
}
}
}
}
}
示例3: up
function up()
{
// Do only if Province of Laguna
$lgu_code = Setting::getField('lgu_code');
if ($lgu_code == 'laguna_province') {
$o = new Office_m();
$offices = $o->get();
foreach ($offices as $office) {
// Select all employees by office
$e = new Employee_m();
$employees = $e->get_by_office_id($office->office_id);
$office_id = sprintf("%03d", $office->office_id);
// Add leading zeros
$i = 1;
foreach ($employees as $employee) {
// Lets update the employee id
$employee_id = sprintf("%03d", $i);
// Add leading zeros
$update_employee = new Employee_m();
$update_employee->get_by_id($employee->id);
$update_employee->employee_id = $office_id . $employee_id;
$update_employee->save();
$i++;
}
}
}
}
示例4: up
function up()
{
$agency = Setting::getField('system_name');
if ($agency == 'Provincial Government of Quezon') {
$data = array(array('id' => '1', 'name' => 'Super System Administrator', 'description' => ''), array('id' => '2', 'name' => 'System Administrator', 'description' => ''), array('id' => '3', 'name' => 'Timekeeper', 'description' => ''), array('id' => '4', 'name' => 'Official Business Encoder', 'description' => ''), array('id' => '5', 'name' => 'Leave Manager', 'description' => ''), array('id' => '6', 'name' => 'Leave Administrator', 'description' => ''), array('id' => '7', 'name' => 'Records Administrator', 'description' => ''), array('id' => '8', 'name' => 'View Attendance 10 Times Tardy', 'description' => ''), array('id' => '9', 'name' => 'View Attendance Only', 'description' => 'View Attendance Only'));
$this->db->insert_batch('groups', $data);
}
}
示例5: up
function up()
{
$agency = Setting::getField('system_name');
if ($agency == 'Provincial Government of Quezon') {
$ats_permissions = array(array('id' => '1', 'group_id' => '1', 'module' => 'users', 'roles' => '["index","save","delete","my_account"]'), array('id' => '2', 'group_id' => '1', 'module' => 'groups', 'roles' => '["save","delete"]'), array('id' => '3', 'group_id' => '1', 'module' => 'permissions', 'roles' => '["save","delete","group"]'), array('id' => '4', 'group_id' => '1', 'module' => 'employees', 'roles' => '["index","add_employee","edit_employee","delete_employee","add_cart","remove_cart","id_request"]'), array('id' => '5', 'group_id' => '1', 'module' => 'pds', 'roles' => '["personal_info","employee_profile","family","education","examination","work","voluntary_work","trainings","other_info","position_details","service_record","scanned_docs","reports","pds_print_preview","sr_print_preview","training_preview"]'), array('id' => '6', 'group_id' => '1', 'module' => 'personnel', 'roles' => '["assets","assets_spouse","assets_unmarried","assets_real_properties","assets_personals","assets_liabilities","assets_business_interests","assets_relatives","assets_other_info","personnel_schedule"]'), array('id' => '7', 'group_id' => '1', 'module' => 'training_manage', 'roles' => '["type","type_save","type_delete","course","course_save","course_delete","event","event_save","evenr_delete","attendance","attendance_save","attendance_delete","contact_type","contact_type_save","contact_type_delete","contact_info","contact_info_save","contact_info_delete"]'), array('id' => '8', 'group_id' => '1', 'module' => 'attendance', 'roles' => '["view_attendance","dtr","schedules","employee_schedule","jo","double_entries","view_absences","view_late","view_ob","view_tardiness","view_ten_tardiness"]'), array('id' => '9', 'group_id' => '1', 'module' => 'manual_manage', 'roles' => '["login","cto","cto_apps","cto_forward_balance","office_pass"]'), array('id' => '10', 'group_id' => '1', 'module' => 'office_manage', 'roles' => '["view_offices","add_office","edit_office","divisions"]'), array('id' => '11', 'group_id' => '1', 'module' => 'leave_manage', 'roles' => '["records","leave_card","cancel_leave","file_leave","encode_leave_card","leave_apps","forwarded","undertime","cancel_undertime","wop","stop_earnings","reports","perform_leave_earnings","settings"]'), array('id' => '12', 'group_id' => '1', 'module' => 'settings_manage', 'roles' => '["salary_grade","holiday","audit_trail","general_settings","backup","offline_update"]'), array('id' => '23', 'group_id' => '6', 'module' => 'leave_manage', 'roles' => '["records","leave_card","cancel_leave","file_leave","encode_leave_card","leave_apps","forwarded","undertime","cancel_undertime","wop","stop_earnings","perform_leave_earnings","settings"]'), array('id' => '32', 'group_id' => '3', 'module' => 'attendance', 'roles' => '["view_attendance","dtr","jo","double_entries","view_absences","view_late","view_ob","view_tardiness","view_ten_tardiness"]'), array('id' => '40', 'group_id' => '7', 'module' => 'employees', 'roles' => '["index","add_employee","edit_employee","delete_employee","add_cart","remove_cart","id_request"]'), array('id' => '41', 'group_id' => '7', 'module' => 'pds', 'roles' => '["personal_info","employee_profile","family","education","examination","work","voluntary_work","trainings","other_info","position_details","service_record","scanned_docs","reports","pds_print_preview","sr_print_preview","training_preview"]'), array('id' => '42', 'group_id' => '7', 'module' => 'personnel', 'roles' => '["assets","assets_spouse","assets_unmarried","assets_real_properties","assets_personals","assets_liabilities","assets_business_interests","assets_relatives","assets_other_info","personnel_schedule"]'), array('id' => '43', 'group_id' => '7', 'module' => 'training_manage', 'roles' => '["type","type_save","type_delete","course","course_save","course_delete","event","event_save","evenr_delete","attendance","attendance_save","attendance_delete","contact_type","contact_type_save","contact_type_delete","contact_info","contact_info_save","contact_info_delete"]'), array('id' => '52', 'group_id' => '2', 'module' => 'employees', 'roles' => '["index","add_employee","edit_employee","delete_employee","add_cart","remove_cart","id_request"]'), array('id' => '53', 'group_id' => '2', 'module' => 'pds', 'roles' => '["personal_info","employee_profile","family","education","examination","work","voluntary_work","trainings","other_info","position_details","service_record","scanned_docs","reports","pds_print_preview","sr_print_preview","training_preview"]'), array('id' => '54', 'group_id' => '2', 'module' => 'personnel', 'roles' => '["assets","assets_spouse","assets_unmarried","assets_real_properties","assets_personals","assets_liabilities","assets_business_interests","assets_relatives","assets_other_info","personnel_schedule"]'), array('id' => '55', 'group_id' => '2', 'module' => 'training_manage', 'roles' => '["type","type_save","type_delete","course","course_save","course_delete","event","event_save","evenr_delete","attendance","attendance_save","attendance_delete","contact_type","contact_type_save","contact_type_delete","contact_info","contact_info_save","contact_info_delete"]'), array('id' => '56', 'group_id' => '2', 'module' => 'attendance', 'roles' => '["dtr"]'), array('id' => '57', 'group_id' => '2', 'module' => 'manual_manage', 'roles' => '["office_pass"]'), array('id' => '58', 'group_id' => '2', 'module' => 'office_manage', 'roles' => '["view_offices","add_office","edit_office","divisions"]'), array('id' => '65', 'group_id' => '7', 'module' => 'manual_manage', 'roles' => '["login"]'), array('id' => '72', 'group_id' => '6', 'module' => 'employees', 'roles' => '["index","add_employee","edit_employee","delete_employee","add_cart","remove_cart","id_request"]'), array('id' => '73', 'group_id' => '6', 'module' => 'pds', 'roles' => '["personal_info","employee_profile","family","education","examination","work","voluntary_work","trainings","other_info","position_details","service_record","scanned_docs","reports","pds_print_preview","sr_print_preview","training_preview"]'), array('id' => '74', 'group_id' => '6', 'module' => 'personnel', 'roles' => '["assets","assets_spouse","assets_unmarried","assets_real_properties","assets_personals","assets_liabilities","assets_business_interests","assets_relatives","assets_other_info","personnel_schedule"]'), array('id' => '75', 'group_id' => '6', 'module' => 'training_manage', 'roles' => '["type","type_save","type_delete","course","course_save","course_delete","event","event_save","evenr_delete","attendance","attendance_save","attendance_delete","contact_type","contact_type_save","contact_type_delete","contact_info","contact_info_save","contact_info_delete"]'), array('id' => '76', 'group_id' => '6', 'module' => 'attendance', 'roles' => '["view_attendance","dtr","jo","double_entries","view_absences","view_late","view_ob","view_tardiness","view_ten_tardiness"]'), array('id' => '79', 'group_id' => '6', 'module' => 'settings_manage', 'roles' => '["salary_grade","holiday","schedules","employee_schedule","audit_trail","general_settings","backup","offline_update"]'), array('id' => '90', 'group_id' => '5', 'module' => 'leave_manage', 'roles' => '["records","leave_card","cancel_leave","file_leave","leave_apps","reports"]'), array('id' => '91', 'group_id' => '1', 'module' => 'appointment', 'roles' => '["issued"]'), array('id' => '100', 'group_id' => '9', 'module' => 'attendance', 'roles' => '["view_attendance","view_attendance_only","dtr","jo","double_entries","view_absences","view_late","view_ob","view_tardiness","view_ten_tardiness"]'), array('id' => '101', 'group_id' => '9', 'module' => 'manual_manage', 'roles' => '["login","cto","cto_apps","cto_forward_balance","office_pass"]'));
$this->db->insert_batch('permissions', $ats_permissions);
}
}
示例6: up
function up()
{
$agency = Setting::getField('system_name');
if ($agency == 'Provincial Government of Quezon') {
$this->db->where('group_id', 0);
$this->db->update('users', array('group_id' => 1));
}
}
示例7: up
function up()
{
// Do only if Puerto
$lgu_code = Setting::getField('lgu_code');
$allow = 'no';
if ($lgu_code == '') {
$allow = 'yes';
}
$data = array('name' => 'show_leave_credits_leave_apps', 'setting_value' => $allow, 'settings_group' => 'leave', 'description' => 'Show leave balance in leave application page.');
$this->db->insert('settings', $data);
}
开发者ID:billyriantono,项目名称:ihrmis,代码行数:11,代码来源:126_settings_add_item_show_leave_credits_leave_apps.php
示例8: up
function up()
{
$setting_value = 'no';
// Do only if Province of Laguna
$lgu_code = Setting::getField('lgu_code');
if ($lgu_code == 'quezon_province') {
$setting_value = 'yes';
}
$data = array('name' => 'last_name_first_dtr', 'setting_value' => $setting_value, 'settings_group' => 'attendance');
$this->db->insert('settings', $data);
}
示例9: up
function up()
{
// Do only if Province of Laguna
$lgu_code = Setting::getField('lgu_code');
$auto = 'no';
if ($lgu_code == 'laguna_province') {
$auto = 'yes';
}
$data = array('name' => 'auto_deduct_forced_leave', 'setting_value' => $auto, 'settings_group' => 'leave', 'description' => 'Set if auto deduct the forced leave every end of the year.');
$this->db->insert('settings', $data);
}
示例10: up
function up()
{
// Do only if Puerto
$lgu_code = Setting::getField('lgu_code');
$allow = 'no';
if ($lgu_code == '') {
$allow = 'yes';
}
$data = array('name' => 'enable_add_earn_menu', 'setting_value' => 'no', 'settings_group' => 'leave', 'description' => 'Show add earn menu.');
$this->db->insert('settings', $data);
}
示例11: up
function up()
{
// Do only if Province of Laguna
$lgu_code = Setting::getField('lgu_code');
$allow = 'no';
if ($lgu_code == 'laguna_province') {
$allow = 'yes';
}
$data = array('name' => 'show_calendar', 'setting_value' => $allow, 'settings_group' => 'leave', 'description' => 'Show the calendar in file leave');
$this->db->insert('settings', $data);
}
示例12: up
function up()
{
// Do only if Puerto
$lgu_code = Setting::getField('lgu_code');
$seconds_user_idle = '7200';
if ($lgu_code == '') {
$seconds_user_idle = '72000';
}
$data = array('name' => 'seconds_user_idle', 'setting_value' => $seconds_user_idle, 'settings_group' => 'users', 'description' => 'Seconds before logout if user is idle');
$this->db->insert('settings', $data);
}
示例13: up
function up()
{
$minutes_between_logs = '';
// Do only if bataraza
$lgu_code = Setting::getField('lgu_code');
if ($lgu_code == 'bataraza') {
$minutes_between_logs = '5';
}
$data = array('name' => 'minutes_between_logs', 'setting_value' => $minutes_between_logs, 'settings_group' => 'attendance', 'description' => 'minutes between every logs.');
$this->db->insert('settings', $data);
}
示例14: up
function up()
{
// Do only if Puerto
$lgu_code = Setting::getField('lgu_code');
$download_images_server = 'no';
if ($lgu_code == 'marinduque_province') {
$download_images_server = 'yes';
}
$data = array('name' => 'download_images_server', 'setting_value' => $download_images_server, 'settings_group' => 'attendance', 'description' => 'whether to auto download images from server to client');
$this->db->insert('settings', $data);
}
示例15: up
function up()
{
// Do only if Puerto
$lgu_code = Setting::getField('lgu_code');
$accept_late_ob = 'yes';
if ($lgu_code == 'marinduque_province') {
$accept_late_ob = 'no';
}
$data = array('name' => 'accept_late_ob', 'setting_value' => $accept_late_ob, 'settings_group' => 'attendance', 'description' => 'whether to accept late filing of ob or itinerary');
$this->db->insert('settings', $data);
}