當前位置: 首頁>>代碼示例>>PHP>>正文


PHP language::delete_language方法代碼示例

本文整理匯總了PHP中language::delete_language方法的典型用法代碼示例。如果您正苦於以下問題:PHP language::delete_language方法的具體用法?PHP language::delete_language怎麽用?PHP language::delete_language使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在language的用法示例。


在下文中一共展示了language::delete_language方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

        $db_object->insert($mysql);
        //table name and its field to be deleted
        $field_array = array("{$language}" => array("lang_{$lang_id}"), "{$emp_type}" => array("type_{$lang_id}"), "{$acc_rights}" => array("type_{$lang_id}"), "{$contacts}" => array("contact_display_{$lang_id}"), "{$dev_basic}" => array("coursetype_{$lang_id}"), "{$dev_interbasic}" => array("coursename_{$lang_id}"), "{$temp_devbuilder}" => array("title_{$lang_id}", "description_{$lang_id}", "url_{$lang_id}"), "{$unapproved_devbuilder}" => array("title_{$lang_id}", "description_{$lang_id}", "url_{$lang_id}"), "{$approved_devbuilder}" => array("title_{$lang_id}", "description_{$lang_id}", "url_{$lang_id}"), "{$temp_cat}" => array("category_{$lang_id}"), "{$unapp_cat}" => array("category_{$lang_id}"), "{$app_cat}" => array("category_{$lang_id}"), "{$temp_met}" => array("metrics_{$lang_id}"), "{$unapp_met}" => array("metrics_{$lang_id}"), "{$app_met}" => array("metrics_{$lang_id}"), "{$message}" => array("appsub_subject_{$lang_id}", "appsub_message_{$lang_id}", "approved_subject_{$lang_id}", "approved_message_{$lang_id}", "resubmit_subject_{$lang_id}", "resubmit_message_{$lang_id}", "reject_subject_{$lang_id}", "reject_message_{$lang_id}", "obj_message_{$lang_id}", "obj_subject_{$lang_id}", "obj_app_subject_{$lang_id}", "obj_app_message_{$lang_id}", "verification_submit_sub_{$lang_id}", "verification_submit_message_{$lang_id}", "verification_rej_sub_{$lang_id}", "verification_rej_message_{$lang_id}", "verification_remind_sub_{$lang_id}", "verification_remind_message_{$lang_id}", "app_feedback_subject_{$lang_id}", "{$app_feedback_message_}{$lang_id}"), "{$name}" => array("name_{$lang_id}"), "{$reject}" => array("category_{$lang_id}"), "{$ureject}" => array("category_{$lang_id}"), "{$areject}" => array("category_{$lang_id}"), "{$skillraters_table}" => array("rater_level_{$lang_id}"), "{$selected}" => array("objective_{$lang_id}", "how_to_get_{$lang_id}"), "{$uselected}" => array("objective_{$lang_id}", "how_to_get_{$lang_id}"), "{$aselected}" => array("objective_{$lang_id}", "how_to_get_{$lang_id}"), "{$qualify}" => array("qualification_{$lang_id}"), "{$rating}" => array("rating_{$lang_id}"), "{$priority}" => array("priority_{$lang_id}"), "{$owner}" => array("text_{$lang_id}"), "{$langsetting}" => array("requesttext_{$lang_id}", "approvaltext_{$lang_id}"), "{$langresult}" => array("result_{$lang_id}"));
        //table name
        $table_array = array("{$language}", "{$emp_type}", "{$acc_rights}", "{$contacts}", "{$dev_basic}", "{$dev_interbasic}", "{$temp_devbuilder}", "{$unapproved_devbuilder}", "{$approved_devbuilder}", "{$temp_cat}", "{$unapp_cat}", "{$app_cat}", "{$temp_met}", "{$unapp_met}", "{$message}", "{$name}", "{$reject}", "{$ureject}", "{$areject}", "{$skillraters_table}", "{$selected}", "{$uselected}", "{$aselected}", "{$qualify}", "{$rating}", "{$priority}", "{$owner}", "{$langsetting}", "{$langresult}");
        for ($i = 0; $i < count($table_array); $i++) {
            $sql = "";
            $tablename = $table_array[$i];
            $qry = "desc {$tablename}";
            $res = $db_object->get_single_column($qry);
            for ($j = 0; $j < count($field_array[$tablename]); $j++) {
                $field = $field_array[$tablename][$j];
                //echo "field = $field<br>";
                if (in_array($field, $res)) {
                    $sql .= "drop column {$field},";
                }
            }
            if ($sql != "") {
                $sql1 = substr($sql, 0, -1);
                $qry = "alter table {$tablename} {$sql1}";
                $db_object->insert($qry);
            }
        }
        $path = $common->path;
        $folder_name = $path . "/lang/{$lang_id}";
        $common->delete_files($folder_name, $folder_name);
    }
}
$obj = new language();
$obj->delete_language($db_object, $common, $default, $error_msg, $fLang_id);
header("Location:view_lang.php");
開發者ID:nloadholtes,項目名稱:people-prodigy,代碼行數:31,代碼來源:delete_lang.php


注:本文中的language::delete_language方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。