Example #1
0
            }
        }
        $ff = substr($this_name, strlen($pre_field));
        $sqlstr .= sprintf(" %s='%s',", $ff, mysql_escape_string($this_value));
    }
    foreach ($poly_data as $pm_id => $this_poly) {
        $doc_url = $cgi["doc_url_{$pm_id}"];
        $sqlstr .= sprintf(" url_%d='%s',", $pm_id, $doc_url);
    }
    $slen = strlen($sqlstr) - 1;
    $sqlstr[$slen] = ' ';
    $sqlstr .= sprintf(" where d_id=%s", $d_id);
    $res = mysql_query($sqlstr, $proj_mysql) or exit(mysql_error() . "\n" . $sqlstr);
    doAboutDataPost($p_id, $t_id, $d_id);
    printf("更新数据库完成!<br>\n");
    if (publishOneDoc($p_id, $t_id, $d_id) < 0) {
        exit($error_message);
    }
    exit;
}
$rel_select_flag = 0;
$rich_text_flag = 0;
$date_input_flag = 0;
foreach ($tempdef_data as $kk => $row) {
    if ($row[type] == 'Date') {
        $date_input_flag = 1;
    }
    if ($row[type] == 'RichText') {
        $rich_text_flag = 1;
    }
    if ($row[type] == 'Rel_Select') {
Example #2
0
foreach($pub_data as $row)
{
	if($p_id != $row[p_id] || $t_id != $row[t_id])
	{
		conProjDB($row[p_id], $row[t_id]);
	}

	$id   = $row[id];
	$p_id = $row[p_id];
	$t_id = $row[t_id];
	$d_id = $row[d_id];

	print "\n\n\n\np_id:$p_id, t_id:$t_id, d_id:$d_id\n";

	if($d_id == 0)
	{
		if( AddDoc($p_id, $t_id) < 0) printf("添加文档失败: %s<br>\n", $error_message);
	}
	else
	{
		if( publishOneDoc($p_id, $t_id, $d_id) < 0) printf("发布文档失败: %s<br>\n", $error_message);
	}

}


exit("Finish!\n");

?>