public static function includeText($name)
 {
     $value = StaticField::getStaticFieldValueByName($name);
     if (swValidate('edit')) {
         echo "<a target='_top' class='edit' href='swcms/editstatic.php?name={$name}' class='edit'></a>";
     }
     echo displayValue($value);
 }
// admin header
session_start();
require_once '../../lib/php/DOLib.php';
if (!swValidate('s_username')) {
    header("location: ../index.php");
}
connect();
$type = $_POST["type"];
$name = $_POST["name"];
$value = $_POST["value"];
$id = $_POST["id"];
if ($type) {
    switch ($type) {
        case 'getStaticFieldValueByName':
            $result = "getStaticFieldValue result:" . StaticField::getStaticFieldValueByName($name);
            break;
        case 'getStaticFieldByName':
            $result = "getStaticField result:" . implode(",", StaticField::getStaticFieldByName($name));
            break;
        case 'getStaticFieldById':
            $result = "getStaticFieldById result:" . implode(",", StaticField::getStaticFieldById($id));
            break;
        case 'getAllStaticFieldsByName':
            $staticFields = StaticField::getAllStaticFieldsByName($name);
            if (!$staticFields) {
                $result = "no record for the name={$name}";
            } else {
                foreach ($staticFields as $sf) {
                    $sfList[] = implode(",", $sf);
                }