コード例 #1
0
        for ($i = 0; $i < count($check_arr); $i++) {
            $exist_tag_name = $check_arr[$i];
            //echo "$exist_tag_name<br>";
            if ($fTag_name == $exist_tag_name) {
                $message = $error_msg["cExistingeeo"];
                echo $message;
                $this->displayEeo_tags($db_object, $common, $form_array);
                exit;
            }
        }
        $mysql = "insert into {$eeo_tag_table} set tag_name='{$fTag_name}',eeo_id='{$eeo_id}'";
        //echo $mysql;
        $db_object->insert($mysql);
    }
}
$obj = new eeoTags();
while (list($kk, $vv) = @each($_POST)) {
    ${$kk} = $vv;
    $form_array["{$kk}"] = $vv;
}
while (list($kk, $vv) = @each($_GET)) {
    ${$kk} = $vv;
    $form_array["{$kk}"] = $vv;
}
$form_array = @array_merge($form_array, $error_msg, $default);
//print_r($form_array);
if ($fAdd_tag) {
    $obj->add_tag($db_object, $common, $form_array, $error_msg, $default);
    $message = $error_msg["cAddtag"];
    echo $message;
    $obj->displayEeo_tags($db_object, $common, $form_array, $default);
コード例 #2
0
        echo $returncontent;
    }
    function addTags($db_object, $common, $form_array, $default)
    {
        while (list($kk, $vv) = @each($form_array)) {
            ${$kk} = $vv;
        }
        //	print_r($form_array);
        $eeo_tag_table = $common->prefix_table("eeo_tags");
        $mysql = "insert into {$eeo_tag_table} set tag_name='{$fTag_name}',eeo_id='{$eeo_id}'";
        //echo $mysql;
        $db_object->insert($mysql);
        //print_r($eeo_arr);
    }
}
$obj = new eeoTags();
while (list($kk, $vv) = @each($_POST)) {
    ${$kk} = $vv;
    $form_array["{$kk}"] = $vv;
}
while (list($kk, $vv) = @each($_GET)) {
    ${$kk} = $vv;
    $form_array["{$kk}"] = $vv;
}
//	print_r($form_array);
if ($fAdd_tag) {
    $obj->addTags($db_object, $common, $form_array, $default);
    $obj->showTags($db_object, $common, $form_array, $default);
} else {
    $obj->showTags($db_object, $common, $form_array, $default);
}