function executeCreatefile()
 {
     global $template, $WebBaseDir, $controller, $AccessOption;
     $template->setFile(array("MAIN" => "apf_files_edit.html"));
     $template->setBlock("MAIN", "add_block");
     $params_id = $controller->getID();
     $PID = $params_id;
     array_shift($AccessOption);
     $template->setVar(array("WEBDIR" => $WebBaseDir, "DOACTION" => "addfilesubmit", "FILE_NAME" => fileTag("filename"), "ACCESSOPTION" => radioTag("access", $AccessOption, "public"), "PID" => $PID));
 }
 function executeUpdate()
 {
     global $template, $WebBaseDir, $controller, $i18n;
     $template->setFile(array("MAIN" => "apf_selfcompany_edit.html"));
     $template->setBlock("MAIN", "edit_block");
     $apf_selfcompany = DB_DataObject::factory('ApfSelfcompany');
     //		$apf_selfcompany->get($apf_selfcompany->escape($controller->getID()));
     $apf_selfcompany->find();
     $apf_selfcompany->fetch();
     if ($controller->getURLParam(1) == "ok") {
         $template->setVar(array("SUCCESS_CLASS" => "save-ok", "SUCCESS_MSG" => "<h2>" . $i18n->_("Your modifications have been saved") . "</h2>"));
     }
     $template->setVar(array("ID" => $apf_selfcompany->getId(), "NAME" => $apf_selfcompany->getName(), "ADDREES" => $apf_selfcompany->getAddrees(), "PHONE" => $apf_selfcompany->getPhone(), "FAX" => $apf_selfcompany->getFax(), "EMAIL" => $apf_selfcompany->getEmail(), "PHOTO" => $apf_selfcompany->getPhoto(), "HOMEPAGE" => $apf_selfcompany->getHomepage(), "EMPLOYEE" => $apf_selfcompany->getEmployee(), "BANKROLL" => $apf_selfcompany->getBankroll(), "LINK_MAN" => $apf_selfcompany->getLinkMan(), "INCORPORATOR" => $apf_selfcompany->getIncorporator(), "INDUSTRY" => $apf_selfcompany->getIndustry(), "TAXACCOUNTS" => $apf_selfcompany->getTaxaccounts(), "BANKACCOUNTS" => $apf_selfcompany->getBankaccounts(), "PRODUCTS" => $apf_selfcompany->getProducts(), "MEMO" => $apf_selfcompany->getMemo(), "ACTIVE" => $apf_selfcompany->getActive(), "ACCESS" => $apf_selfcompany->getAccess(), "GROUPID" => $apf_selfcompany->getGroupid(), "USERID" => $apf_selfcompany->getUserid(), "ADD_IP" => $apf_selfcompany->getAddIp(), "CREATED_AT" => $apf_selfcompany->getCreatedAt(), "UPDATE_AT" => $apf_selfcompany->getUpdateAt()));
     $template->setVar(array("WEBDIR" => $WebBaseDir, "FILEPHOTO" => fileTag("photo", $apf_selfcompany->getPhoto()), "BANKACCOUNTS_TEXT" => textareaTag('bankaccounts', $apf_selfcompany->getBankaccounts(), false, "ROWS=\"4\" COLS=\"40\""), "PRODUCTS_TEXT" => textareaTag('products', $apf_selfcompany->getProducts(), false, "ROWS=\"4\" COLS=\"40\""), "MEMO_TEXT" => textareaTag('memo', $apf_selfcompany->getMemo(), false, "ROWS=\"8\" COLS=\"40\""), "DOACTION" => "updatesubmit"));
 }
Exemplo n.º 3
0
 function executeUpdate()
 {
     global $template, $WebBaseDir, $controller, $GenderOption, $ActiveOption;
     $template->setFile(array("MAIN" => "apf_users_edit.html"));
     $template->setBlock("MAIN", "edit_block");
     $apf_users = DB_DataObject::factory('ApfUsers');
     $apf_users->get($apf_users->escape($controller->getID()));
     if ($controller->getURLParam(1) == "ok") {
         $template->setVar(array("SUCCESS_CLASS" => "save-ok", "SUCCESS_MSG" => "<h2>Your modifications have been saved</h2>"));
     }
     array_shift($GenderOption);
     array_shift($ActiveOption);
     $template->setVar(array("ID" => $apf_users->getId(), "USER_NAME" => $apf_users->getUserName(), "OLD_PASSWORD" => $apf_users->getUserPwd(), "GENDER" => $apf_users->getGender(), "ADDREES" => $apf_users->getAddrees(), "PHONE" => $apf_users->getPhone(), "EMAIL" => $apf_users->getEmail(), "PHOTO" => $apf_users->getPhoto(), "ROLE_ID" => $apf_users->getRoleId(), "ACTIVE" => $apf_users->getActive(), "ADD_IP" => $apf_users->getAddIp(), "CREATED_AT" => $apf_users->getCreatedAt(), "UPDATE_AT" => $apf_users->getUpdateAt()));
     $template->setVar(array("GENDEROPTION" => radioTag("gender", $GenderOption, $apf_users->getGender()), "ACTIVEOPTION" => radioTag("active", $ActiveOption, $apf_users->getActive()), "FILEPHOTO" => fileTag("photo", $apf_users->getPhoto()), "WEBDIR" => $WebBaseDir, "DOACTION" => "updatesubmit"));
 }
Exemplo n.º 4
0
 function executeUpdate()
 {
     global $template, $userid, $luadmin, $LU, $i18n, $WebBaseDir, $ClassDir, $controller, $GenderOption, $ActiveOption, $WebTemplateDir;
     include_once $ClassDir . "URLHelper.class.php";
     $template->setFile(array("MAIN" => "apf_users_edit.html"));
     $template->setBlock("MAIN", "edit_block");
     $apf_users = DB_DataObject::factory('ApfUsers');
     $apf_users->get($apf_users->escape($controller->getID()));
     if ($controller->getURLParam(1) == "ok") {
         $template->setVar(array("SUCCESS_CLASS" => "save-ok", "SUCCESS_MSG" => "<h2>Your modifications have been saved</h2>"));
     }
     $groups = $luadmin->perm->getGroups();
     foreach ($groups as $data) {
         $category_arr[$data['group_id']] = $data['group_define_name'];
     }
     $user_group = $this->getGroupByUserid($controller->getID());
     $group_id = $user_group['group_id'];
     array_shift($GenderOption);
     array_shift($ActiveOption);
     $template->setVar(array("ID" => $apf_users->getId(), "USER_NAME" => $apf_users->getUserName(), "REALNAME" => $apf_users->getRealname(), "OLD_PASSWORD" => $apf_users->getUserPwd(), "GENDER" => $apf_users->getGender(), "ADDREES" => $apf_users->getAddrees(), "PHONE" => $apf_users->getPhone(), "EMAIL" => $apf_users->getEmail(), "PHOTO" => $apf_users->getPhoto(), "ROLE_ID" => $apf_users->getRoleId(), "ACTIVE" => $apf_users->getActive(), "ADD_IP" => $apf_users->getAddIp(), "CREATED_AT" => $apf_users->getCreatedAt(), "UPDATE_AT" => $apf_users->getUpdateAt()));
     $template->setVar(array("WEBDIR" => $WebBaseDir, "OLD_GROUP" => $group_id, "WEBTEMPLATEDIR" => URLHelper::getWebBaseURL() . $WebTemplateDir, "GENDEROPTION" => radioTag("gender", $GenderOption, $apf_users->getGender()), "ACTIVEOPTION" => radioTag("active", $ActiveOption, $apf_users->getActive()), "FILEPHOTO" => fileTag("photo", $apf_users->getPhoto()), "MEMO_TEXT" => textareaTag('memo', $apf_users->getMemo(), false, "ROWS=\"8\" COLS=\"40\""), "GROUPOPTION" => selectTag("group", $category_arr, $group_id), "WEBDIR" => $WebBaseDir, "DOACTION" => "updatesubmit"));
 }
 function handleFormData($edit_submit = false)
 {
     global $template, $WebBaseDir, $i18n, $ActiveOption, $ClassDir, $UploadDir, $AllowUploadFilesType, $AddIP, $userid, $group_ids;
     $apf_product = DB_DataObject::factory('ApfProduct');
     if ($edit_submit) {
         $apf_product->get($apf_product->escape($_POST['ID']));
         $do_action = "updatesubmit";
     } else {
         $do_action = "addsubmit";
     }
     $apf_product->setCategory(stripslashes(trim($_POST['category'])));
     $apf_product->setCompanyId(stripslashes(trim($_POST['company_id'])));
     $apf_product->setName(stripslashes(trim($_POST['name'])));
     $apf_product->setPrice(stripslashes(trim($_POST['price'])));
     $apf_product->setMemo(stripslashes(trim($_POST['memo'])));
     $apf_product->setActive(stripslashes(trim($_POST['active'])));
     $apf_product->setAddIp($AddIP);
     $apf_product->setGroupid($group_ids);
     $apf_product->setUserid($userid);
     if ($_POST['photo_del'] == 'Y') {
         unlink($UploadDir . $_POST['photo_old']);
         $apf_product->setPhoto("");
         $_POST['photo_old'] = "";
     }
     if ($_POST['upload_temp']) {
         $apf_product->setPhoto($_POST['upload_temp']);
     }
     $allow_upload_file = TRUE;
     if ($_FILES['photo']['name']) {
         require_once $ClassDir . "FileHelper.class.php";
         $upload_data = FileHelper::uploadFile("product");
         $allow_upload_file = $upload_data["upload_state"];
         if ($allow_upload_file) {
             $photos_arr = $upload_data["upload_msg"];
             if ($photo_pic = $photos_arr['photo']) {
                 $apf_product->setPhoto($photo_pic);
                 $_POST['upload_temp'] = $photo_pic;
             }
         } else {
             $upload_error_msg = $upload_data["upload_msg"];
         }
     }
     $val = $apf_product->validate();
     if ($val === TRUE && $allow_upload_file === TRUE) {
         if ($edit_submit) {
             $apf_product->setUpdateAt(DB_DataObject_Cast::dateTime());
             $apf_product->update();
             $log_string = $i18n->_("Update") . $i18n->_("Product") . "\t{$_POST['name']}=>{$_POST['ID']}";
             logFileString($log_string);
             $this->forward("product/apf_product/update/" . $_POST['ID'] . "/ok");
         } else {
             $apf_product->setCreatedAt(DB_DataObject_Cast::dateTime());
             $apf_product->insert();
             $log_string = $i18n->_("Create") . $i18n->_("Product") . "\t{$_POST['name']}";
             logFileString($log_string);
             $this->forward("product/apf_product/");
         }
     } else {
         $template->setFile(array("MAIN" => "apf_product_edit.html"));
         $template->setBlock("MAIN", "edit_block");
         $template->setVar(array("WEBDIR" => $WebBaseDir, "DOACTION" => $do_action));
         $category_arr = $this->getCategory();
         array_shift($ActiveOption);
         $template->setVar(array("CATEGORYOPTION" => selectTag("category", $category_arr, $_POST['category']), "FILEPHOTO" => fileTag("photo", $_POST['photo_old']), "ACTIVEOPTION" => radioTag("active", $ActiveOption, $_POST['active'])));
         foreach ($val as $k => $v) {
             if ($v == false) {
                 $template->setVar(array(strtoupper($k) . "_ERROR_MSG" => " &darr; " . $i18n->_("Please check here") . " &darr; "));
             }
         }
         $template->setVar(array("ID" => $_POST['id'], "CATEGORY" => $_POST['category'], "COMPANY_ID" => $_POST['company_id'], "NAME" => $_POST['name'], "PRICE" => $_POST['price'], "PHOTO" => $_POST['photo'], "MEMO" => $_POST['memo'], "ACTIVE" => $_POST['active'], "ADD_IP" => $_POST['add_ip'], "CREATED_AT" => $_POST['created_at'], "UPDATE_AT" => $_POST['update_at']));
     }
 }
 function handleFormData($edit_submit = false)
 {
     global $template, $WebBaseDir, $i18n, $ActiveOption, $UploadDir, $ClassDir, $AllowUploadFilesType, $AddIP, $userid, $group_ids;
     $apf_company = DB_DataObject::factory('ApfCompany');
     if ($edit_submit) {
         $apf_company->get($apf_company->escape($_POST['ID']));
         $do_action = "updatesubmit";
     } else {
         $do_action = "addsubmit";
     }
     $apf_company->setName(stripslashes(trim($_POST['name'])));
     $apf_company->setAddrees(stripslashes(trim($_POST['addrees'])));
     $apf_company->setPhone(stripslashes(trim($_POST['phone'])));
     $apf_company->setFax(stripslashes(trim($_POST['fax'])));
     $apf_company->setEmail(stripslashes(trim($_POST['email'])));
     $apf_company->setPhoto(stripslashes(trim($_POST['photo'])));
     $apf_company->setHomepage(stripslashes(trim($_POST['homepage'])));
     $apf_company->setEmployee(stripslashes(trim($_POST['employee'])));
     $apf_company->setBankroll(stripslashes(trim($_POST['bankroll'])));
     $apf_company->setLinkMan(stripslashes(trim($_POST['link_man'])));
     $apf_company->setIncorporator(stripslashes(trim($_POST['incorporator'])));
     $apf_company->setIndustry(stripslashes(trim($_POST['industry'])));
     $apf_company->setProducts(stripslashes(trim($_POST['products'])));
     $apf_company->setMemo(stripslashes(trim($_POST['memo'])));
     $apf_company->setActive(stripslashes(trim($_POST['active'])));
     $apf_company->setAddIp($AddIP);
     $apf_company->setGroupid($group_ids);
     $apf_company->setUserid($userid);
     if ($_POST['photo_del'] == 'Y') {
         unlink($UploadDir . $_POST['photo_old']);
         $apf_company->setPhoto("");
         $_POST['photo_old'] = "";
     }
     if ($_POST['upload_temp']) {
         $apf_company->setPhoto($_POST['upload_temp']);
     }
     $allow_upload_file = TRUE;
     if ($_FILES['photo']['name']) {
         require_once $ClassDir . "FileHelper.class.php";
         $upload_data = FileHelper::uploadFile("company");
         $allow_upload_file = $upload_data["upload_state"];
         if ($allow_upload_file) {
             $photos_arr = $upload_data["upload_msg"];
             if ($photo_pic = $photos_arr['photo']) {
                 $apf_company->setPhoto($photo_pic);
                 $_POST['upload_temp'] = $photo_pic;
             }
         } else {
             $upload_error_msg = $upload_data["upload_msg"];
         }
     }
     $val = $apf_company->validate();
     if ($val === TRUE) {
         if ($edit_submit) {
             $apf_company->setUpdateAt(DB_DataObject_Cast::dateTime());
             $apf_company->update();
             $log_string = $i18n->_("Update") . $i18n->_("Company") . "\t{$_POST['name']}=>{$_POST['ID']}";
             logFileString($log_string);
             $this->forward("company/apf_company/update/" . $_POST['ID'] . "/ok");
         } else {
             $apf_company->setCreatedAt(DB_DataObject_Cast::dateTime());
             $apf_company->insert();
             $log_string = $i18n->_("Create") . $i18n->_("Company") . "\t{$_POST['name']}";
             logFileString($log_string);
             $this->forward("company/apf_company/");
         }
     } else {
         $template->setFile(array("MAIN" => "apf_company_edit.html"));
         $template->setBlock("MAIN", "edit_block");
         foreach ($val as $k => $v) {
             if ($v == false) {
                 $template->setVar(array(strtoupper($k) . "_ERROR_MSG" => " &darr; " . $i18n->_("Please check here") . " &darr; "));
             }
         }
         $template->setVar(array("ID" => $_POST['id'], "NAME" => $_POST['name'], "ADDREES" => $_POST['addrees'], "PHONE" => $_POST['phone'], "FAX" => $_POST['fax'], "EMAIL" => $_POST['email'], "PHOTO" => $_POST['photo'], "HOMEPAGE" => $_POST['homepage'], "EMPLOYEE" => $_POST['employee'], "BANKROLL" => $_POST['bankroll'], "LINK_MAN" => $_POST['link_man'], "INCORPORATOR" => $_POST['incorporator'], "INDUSTRY" => $_POST['industry'], "PRODUCTS" => $_POST['products'], "MEMO" => $_POST['memo'], "ACTIVE" => $_POST['active'], "ADD_IP" => $_POST['add_ip'], "CREATED_AT" => $_POST['created_at'], "UPDATE_AT" => $_POST['update_at']));
         array_shift($ActiveOption);
         $template->setVar(array("FILEPHOTO" => fileTag("photo", $_POST['photo_old']), "WEBDIR" => $WebBaseDir, "ACTIVEOPTION" => radioTag("active", $ActiveOption, $_POST['active']), "DOACTION" => $do_action));
     }
 }
 function executeList()
 {
     global $template, $i18n, $WebBaseDir, $WebTemplateDir, $controller, $ClassDir, $TemplateDir, $TimeOption, $ActiveOption;
     include_once $ClassDir . "URLHelper.class.php";
     $template->setFile(array("MAIN" => "apf_schedule_list.html"));
     $do_action = "AddSubmit";
     $template->setBlock("MAIN", "main_list", "list_block");
     //		set default day or get select day
     if ($_REQUEST['y'] && $_REQUEST['m'] && $_REQUEST['d']) {
         $select_y = $_REQUEST['y'];
         $select_m = $_REQUEST['m'];
         $select_d = $_REQUEST['d'];
     } else {
         $next_week_time = $this->getDefaultDate();
         $select_y = date("Y", $next_week_time);
         $select_m = date("m", $next_week_time);
         $select_d = date("d", $next_week_time);
     }
     $start_time = "";
     $end_time = "";
     $image_string = "";
     $active = "new";
     $used_hours_arr = array();
     $CalDailyView = $this->renderDayView($select_y, $select_m, $select_d, $used_hours_arr);
     $un_use_hour_arr = array_diff($TimeOption, $used_hours_arr);
     if ($controller->getID()) {
         $un_use_hour_arr = $TimeOption;
         $apf_schedule = DB_DataObject::factory('ApfSchedule');
         $apf_schedule->get($apf_schedule->escape($controller->getID()));
         $do_action = "UpdateSubmit";
         if ($controller->getURLParam(1) == "ok") {
             $template->setVar(array("SUCCESS_CLASS" => "save-ok", "SUCCESS_MSG" => "<h2>" . $i18n->_("Your modifications have been saved") . "</h2>"));
         }
         $template->setVar(array("ID" => $apf_schedule->getId(), "TITLE" => $apf_schedule->getTitle(), "DESCRIPTION" => $apf_schedule->getDescription(), "PUBLISH_DATE" => $apf_schedule->getPublishDate(), "PUBLISH_STARTTIME" => $apf_schedule->getPublishStarttime(), "PUBLISH_ENDTIME" => $apf_schedule->getPublishEndtime(), "IMAGE" => $apf_schedule->getImage(), "ACTIVE" => $apf_schedule->getActive(), "ADD_IP" => $apf_schedule->getAddIp(), "CREATED_AT" => $apf_schedule->getCreatedAt(), "UPDATE_AT" => $apf_schedule->getUpdateAt()));
         $start_time = $this->shorTimeFormat($apf_schedule->getPublishStarttime());
         $end_time = $this->shorTimeFormat($apf_schedule->getPublishEndtime());
         $image_string = $apf_schedule->getImage();
         $active = $apf_schedule->getActive();
     } else {
         if ($_REQUEST['act'] == "ExportWeek") {
             $this->exportWeek();
         }
     }
     array_shift($ActiveOption);
     $template->setVar(array("WEBDIR" => $WebBaseDir, "WEBTEMPLATEDIR" => URLHelper::getWebBaseURL() . $WebTemplateDir, "PUBLISHDATE" => inputDateTag("publish_date", "{$select_y}-{$select_m}-{$select_d}"), "IMAGES_FILE" => fileTag('image', $image_string), "STATUS_FIELD" => selectTag('active', $ActiveOption, $active), "PUBLISH_STARTTIME_OPTION" => selectTag('publish_starttime', $un_use_hour_arr, $start_time), "PUBLISH_ENDTIME_OPTION" => selectTag('publish_endtime', $un_use_hour_arr, $end_time), "DOACTION" => $do_action, "LEFT_CALENDAR" => $this->renderMonthView(), "DAY_VIEW" => $CalDailyView, "PUBLISH_DATE" => "{$select_y}-{$select_m}-{$select_d}", "Y" => $select_y, "M" => $select_m, "D" => $select_d));
 }
 function handleFormData($edit_submit = false)
 {
     global $template, $WebBaseDir, $i18n, $AddIP, $userid, $UploadDir, $ClassDir, $group_ids;
     $apf_selfproduct = DB_DataObject::factory('ApfSelfproduct');
     if ($edit_submit) {
         $apf_selfproduct->get($apf_selfproduct->escape($_POST['ID']));
         $do_action = "updatesubmit";
     } else {
         $do_action = "addsubmit";
     }
     $apf_selfproduct->setProductname(stripslashes(trim($_POST['productname'])));
     $apf_selfproduct->setRetailprice(stripslashes(trim($_POST['retailprice'])));
     $apf_selfproduct->setWholesaleprice(stripslashes(trim($_POST['wholesaleprice'])));
     $apf_selfproduct->setCostprice(stripslashes(trim($_POST['costprice'])));
     $apf_selfproduct->setReleasedate(stripslashes(trim($_POST['releasedate'])));
     $apf_selfproduct->setMemo(stripslashes(trim($_POST['memo'])));
     $apf_selfproduct->setAccess(stripslashes(trim($_POST['access'])));
     $apf_selfproduct->setActive(stripslashes(trim($_POST['active'])));
     $apf_selfproduct->setAddIp($AddIP);
     $apf_selfproduct->setGroupid($group_ids);
     $apf_selfproduct->setUserid($userid);
     if ($_POST['photo_del'] == 'Y') {
         unlink($UploadDir . $_POST['photo_old']);
         $apf_selfproduct->setPhoto("");
         $_POST['photo_old'] = "";
     }
     if ($_POST['upload_temp']) {
         $apf_selfproduct->setPhoto($_POST['upload_temp']);
     }
     $allow_upload_file = TRUE;
     if ($_FILES['photo']['name']) {
         require_once $ClassDir . "FileHelper.class.php";
         $upload_data = FileHelper::uploadFile("product");
         $allow_upload_file = $upload_data["upload_state"];
         if ($allow_upload_file) {
             $photos_arr = $upload_data["upload_msg"];
             if ($photo_pic = $photos_arr['photo']) {
                 $apf_selfproduct->setPhoto($photo_pic);
                 $_POST['upload_temp'] = $photo_pic;
             }
         } else {
             $upload_error_msg = $upload_data["upload_msg"];
         }
     }
     $val = $apf_selfproduct->validate();
     if ($val === TRUE && $allow_upload_file === TRUE) {
         if ($edit_submit) {
             $apf_selfproduct->setUpdateAt(DB_DataObject_Cast::dateTime());
             $apf_selfproduct->update();
             $log_string = $i18n->_("Update") . $i18n->_("ModuleName") . "\t{$_POST['name']}=>{$_POST['ID']}";
             logFileString($log_string);
             $this->forward("selfproduct/apf_selfproduct/update/" . $_POST['ID'] . "/ok");
         } else {
             $apf_selfproduct->setCreatedAt(DB_DataObject_Cast::dateTime());
             $apf_selfproduct->insert();
             $log_string = $i18n->_("Create") . $i18n->_("ModuleName") . "\t{$_POST['name']}=>{$_POST['create_date']}";
             logFileString($log_string);
             $this->forward("selfproduct/apf_selfproduct/");
         }
     } else {
         $template->setFile(array("MAIN" => "apf_selfproduct_edit.html"));
         $template->setBlock("MAIN", "edit_block");
         $template->setVar(array("WEBDIR" => $WebBaseDir, "RELEASE_DATE" => inputDateTag("releasedate", $_POST['releasedate']), "FILEPHOTO" => fileTag("photo", $_POST['photo']), "MEMOTEXT" => textareaTag('memo', $_POST['memo'], false, "ROWS=\"8\" COLS=\"40\""), "DOACTION" => $do_action));
         foreach ($val as $k => $v) {
             if ($v == false) {
                 $template->setVar(array(strtoupper($k) . "_ERROR_MSG" => " &darr; " . $i18n->_("Please check here") . " &darr; "));
             }
         }
         $template->setVar(array("ID" => $_POST['id'], "PRODUCTNAME" => $_POST['productname'], "RETAILPRICE" => $_POST['retailprice'], "WHOLESALEPRICE" => $_POST['wholesaleprice'], "COSTPRICE" => $_POST['costprice'], "PHOTO" => $_POST['photo'], "RELEASEDATE" => $_POST['releasedate'], "MEMO" => $_POST['memo'], "ACCESS" => $_POST['access'], "ACTIVE" => $_POST['active'], "GROUPID" => $_POST['groupid'], "USERID" => $_POST['userid'], "ADD_IP" => $_POST['add_ip'], "CREATED_AT" => $_POST['created_at'], "UPDATE_AT" => $_POST['update_at']));
     }
 }
 function executeImport()
 {
     global $template, $WebBaseDir;
     $template->setFile(array("MAIN" => "apf_contact_import.html"));
     $template->setBlock("MAIN", "add_block");
     $template->setVar(array("WEBDIR" => $WebBaseDir, "IMPORTFILE" => fileTag("sourcefile"), "DOACTION" => "importsubmit"));
 }