add_contract_form.php3
来自「FIREFLY 是一个多用户专业帮助桌面系统」· PHP3 代码 · 共 182 行
PHP3
182 行
<?################################################################## ADD CONTRACT##################################################################/*init */include ("../include/levels.php3");$access_level = $r_level["admin"];include ("../include/config.php3");/* process */if ($mode == 'edit' and $ctr_id){ $title=$msg_modify_crt; $contract_datas = SQL_CTR_READ($dbproc,$ctr_id,$user->id); if (!$ctr_sign_year) { list($ctr_sign_year,$ctr_sign_month,$ctr_sign_day) = explode("-",$contract_datas["signdate"]); list($ctr_start_year,$ctr_start_month,$ctr_start_day) = explode("-",$contract_datas["startdate"]); list($ctr_end_year,$ctr_end_month,$ctr_end_day) = explode("-",$contract_datas["enddate"]); $contract_products = SQL_CTR_READ_PRD($dbproc,$ctr_id); $contract_options = SQL_CTR_READ_OPT($dbproc,$ctr_id); while (list($key,$value) = @each($contract_products)) { $products .= ",".$value['prd_id']; $ platforms .= ",".$value['ptf_id']; } while (list($key,$value) = @each($contract_options)) { $a = 'option_'.$value['opt_id']; $$a = $value['nombre']; } }}else$title=$msg_add_crt;//affichage de produits-platformes$list_product = SQL_LIST_PRODUCT($dbproc);$list_platform = SQL_LIST_PLATFORM($dbproc);$list_option = SQL_LIST_OPTION($dbproc);if (is_array($list_product) and is_array($list_platform)){ reset ($list_product); reset ($list_platform); while ($content = each($list_product)) $full_name_product[$content[1]['prd_id']] = $content[1]['prd_name']; $full_name_product[0] = " "; while ($content = each($list_platform)) $full_name_platform[$content[1]['ptf_id']] = $content[1]['ptf_name']." (".$content[1]['ptf_subname'].")"; $full_name_platform[0] = " "; if (is_array($list_option)) { reset ($list_option); while ($content = each($list_option)) { $full_name_option[$content[1]['opt_id']] = $content[1]['opt_lbl']; $multi_option[$content[1]['opt_id']] = $content[1]['opt_multi']; $a = "option_".$content[1]['opt_id']; if ($$a) { $headermore .= "&$a=".$$a; if ($$a == "on" ) $ctropt[$content[1]['opt_id']] = 1; else $ctropt[$content[1]['opt_id']] = $$a; } } }include "../include/header.inc";/* Formulaire HTML */?><form action="add_contract_do.php3" method="post" target="_self"><INPUT TYPE='HIDDEN' name='mode' value='<? print $mode ?>'><table cellspacing=0 border=0 cellpadding=0 class='color_table' width="90%"> <TR> <TD class='color_title' colspan=6 > <h1><? echo $title ?></h1> </TD> </TR> <TR> </TR> <TR> <TD class='color_title' colspan=6 > <b><? echo $msg_info_crt ?></b> </TD> </TR> <TR><? if ($mode == 'edit' and $ctr_id){print "<TD class='color_title' colspan='6'>";print "<input type='hidden' name='mode' value='edit' >";print "<input type='hidden' name='ctr_id' value='$ctr_id' >";DSP_CONTRACT($contract_datas,"1");?> <INPUT TYPE='HIDDEN' name='ctr_id' value='<? print $ctr_id ?>'> </TD> <? } else { ?> <TD class='tdcr'> <? echo $msg_cmp_crt ?> </TD> <TD class='tdcl' colspan="2" > <input type="text" name="cmp_crt" value="<? print urldecode($cmp_crt) ?>" size=24 maxlength=255> <INPUT TYPE="HIDDEN" name="cmp_id" value="<? print $cmp_id ?>" size="3"> <a href='/modules/contacts/scripts/search_company.php3?sender=cmp_crt&sender2=cmp_id' target='downright'> <img border=0 src='../images/search.gif'></a> </TD> <TD class='tdcr' colspan="3"> </TD> </TR> <TR> <TD class='tdcr' > <? echo $msg_type_crt ?> </TD> <TD class='tdcl' colspan="2"> <SELECT name="type_crt" > <? reset($contract_type); while($line = each($contract_type)) { print "<OPTION value='".$line[0]."' ".$contractoption[$line[0]][$type_crt]." >".$contract_type[$line[0]]."</OPTION>\n"; } ?> </SELECT> </TD> <TD class='tdcr' colspan="2"> <? print $msg_ctr_ref ?> </TD> <TD class='tdcl'> <INPUT TYPE="TEXT" NAME="ctr_ref" VALUE="<? print $ctr_ref ?>" SIZE="14" MAXLENGTH="10"> </TD><? } ?> </TR> <TR> <TD class='tdcr'> <? print $msg_sign_date ?> </TD> <TD class='tdcl'> <INPUT TYPE="TEXT" NAME="ctr_sign_day" VALUE="<? print $ctr_sign_day ?>" SIZE="2">/ <INPUT TYPE="TEXT" NAME="ctr_sign_month" VALUE="<? print $ctr_sign_month ?>" SIZE="2">/ <INPUT TYPE="TEXT" NAME="ctr_sign_year" VALUE="<? print $ctr_sign_year ?>" SIZE="4"> </TD> <TD class='tdcr'> <? print $msg_start_date ?> </TD> <TD class='tdcl'> <INPUT TYPE="TEXT" NAME="ctr_start_day" VALUE="<? print $ctr_start_day ?>" SIZE="2">/ <INPUT TYPE="TEXT" NAME="ctr_start_month" VALUE="<? print $ctr_start_month ?>" SIZE="2">/ <INPUT TYPE="TEXT" NAME="ctr_start_year" VALUE="<? print $ctr_start_year ?>" SIZE="4"> </TD> <TD class='tdcr'> <? print $msg_end_date ?> </TD> <TD class='tdcl'> <INPUT TYPE="TEXT" NAME="ctr_end_day" VALUE="<? print $ctr_end_day ?>" SIZE="2">/ <INPUT TYPE="TEXT" NAME="ctr_end_month" VALUE="<? print $ctr_end_month ?>" SIZE="2">/ <INPUT TYPE="TEXT" NAME="ctr_end_year" VALUE="<? print $ctr_end_year ?>" SIZE="4"> </TD> </TR> <TR> <TD class='color_title' colspan=6><b><? echo $msg_details_crt ?></b></TD></TR> <input type="hidden" name="products" value="<? print $products ?>" > <input type="hidden" name="platforms" value="<? print $platforms ?>" ><?$aff_products = explode ("," , "0".$products);$aff_platforms = explode ("," , "0".$platforms);//boucle d'affichage des produits s閘ectionn閟for ($i=1; $i < count($aff_products); $i++){$del = "?delprdptf=".$aff_products[$i].",".$aff_platforms[$i];?> <TR> <TD class="tdcr"> <I>Product n
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?