Project

General

Profile

Bug #1765 » set_lp_utf8.php

Andre Boivin, 27/07/2010 00:53

 
1
<?php
2
 // name of the language file that needs to be included
3
$language_file = 'admin';
4
$cidReset = true;
5
require ('../inc/global.inc.php');
6
$this_section = SECTION_PLATFORM_ADMIN;
7

    
8
api_protect_admin_script();
9
require_once (api_get_path(LIBRARY_PATH)."course.lib.php");
10
require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
11
require_once (api_get_path(LIBRARY_PATH).'sortabletable.class.php');
12
/**
13
 * Get the number of courses which will be displayed
14
 */
15

    
16
	$course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
17

    
18
  $sql1 = "SELECT * FROM $course_table";
19
  $res1 = mysql_query($sql1) or die(mysql_error());
20

    
21
    			   while($resulta = mysql_fetch_array($res1)) {
22
    			   $db_name=$resulta['db_name'];
23

    
24
    			   $sql4 = "UPDATE $db_name.lp SET default_encoding = 'UTF-8'
25
		
26
    ";
27

    
28
			mysql_query($sql4) OR die("<p>Erreur Mysql2<br/>$sql4<br/>".mysql_error()."</p>");
29

    
30
 echo $db_name;
31
}   
32
/*
33
==============================================================================
34
		FOOTER
35
==============================================================================
36
*/
37
Display :: display_footer();
38
?>
(2-2/3)