} if (!empty($draft['categories'])) { $c = explode(',', $draft['categories']); $cats = array(); foreach ($c as $v) { $p = explode('|', $v); $cats[] = array('category_id' => $p[0], 'subcategory_id' => $p[1]); } if ($cats) { $tmpPrj->setCategories($cats); } } } } if (!$uploader) { $uploader = new uploader(uploader::createResource('project')); } if (!$_POST['IDResource'] && $draft_id) { $attachedfiles_tmpdraft_files = drafts::getAttachedFiles($draft_id, 4); if ($attachedfiles_tmpdraft_files) { $attachedfiles_draft_files = array(); foreach ($attachedfiles_tmpdraft_files as $attachedfiles_draft_file) { $attachedfiles_draft_files[] = $attachedfiles_draft_file; } $uploader->setFiles($attachedfiles_draft_files, uploader::STATUS_ADDED); } } else { $attachedfiles_tmpprj_files = $tmpPrj->getAttach(); if ($attachedfiles_tmpprj_files) { $attachedfiles_prj_files = array(); foreach ($attachedfiles_tmpprj_files as $attachedfiles_prj_file) {
$uploader_field_element = array(); if (count($tservice->images)) { foreach ($tservice->images as $key => $image) { $uploader_field_element[] = array('hash' => md5($solt . $image['id'] . $tuid . $uid), 'qquuid' => $image['id'], 'src' => WDCPREFIX . '/' . $image['path'] . $image['fname']); } } $sess = __paramInit('string', NULL, 'uploader_sess', NULL); if ($sess) { $files = uploader::sgetFiles($sess); if (count($files)) { foreach ($files as $file) { if (strpos($file['fname'], 'tiny_') === FALSE) { continue; } $uploader_field_element[] = array('qquuid' => $file['id'], 'src' => WDCPREFIX . '/' . $file['path'] . $file['fname']); } } } else { $sess = uploader::createResource('tservices'); } //------------------------------------------------------------------------------ $city = new city(); if (!$tservice->city) { $tservice->city = $user_obj->city > 0 ? $user_obj->city : 1; } $location_value = $city->getCountryName($tservice->city) . ": " . $city->getCityName($tservice->city); //------------------------------------------------------------------------------ $user_phone_tservice = user_phone::getInstance()->render(user_phone::PLACE_TSERVICE); $is_bg = true; $inner = 'tpl.form.php'; include "../template3.php";