forked from Requiao/vmundus.net
-
Notifications
You must be signed in to change notification settings - Fork 1
/
temp.php
39 lines (34 loc) · 864 Bytes
/
temp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
session_start();
include('connect_db.php');
/*
$user_id = $_SESSION['user_id'];
if($user_id != 1) {
exit();
}
$FILE_ID = 12;
$LANG = 'php';
//$LANG = 'js';
$LANGUAGE = 'word';
$LANGUAGE = 'portuguese';
//php
if($LANG == "php") {
$query = "SELECT var_name, $LANGUAGE FROM translation WHERE file_id = '$FILE_ID'";
$result = $conn->query($query);
while($row = $result->fetch_row()) {
list($var_name, $word) = $row;
$word = preg_replace('/\[.*?\]/', '', $word);
echo "\"$var_name\"=>\"$word\",<br>";
}
}
//js
if($LANG == "js") {
$query = "SELECT var_name, $LANGUAGE FROM translation WHERE file_id = '$FILE_ID'";
$result = $conn->query($query);
while($row = $result->fetch_row()) {
list($var_name, $word) = $row;
$word = preg_replace('/\[.*?\]/', '', $word);
echo "$var_name: \"$word\",<br>";
}
}*/
?>