当前位置: 首页>>代码示例>>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;未经允许,请勿转载。