blob: c55b6a7cfd6a70a3a91324d1a12657453c8bf119 [file] [log] [blame]
gobrien35e23782007-11-28 21:37:18 +00001<?php
2/*******************************************************************************
3 * Copyright (c) 2007 Eclipse Foundation and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Paul Colton (Aptana)- initial API and implementation
11 * Eclipse Foundation
12*******************************************************************************/
13
gobrien48275462007-11-29 21:29:17 +000014require_once("cb_global.php");
gobrien35e23782007-11-28 21:37:18 +000015
gobrienc0a6c652007-11-28 22:00:47 +000016$query = "select * from languages where is_active = 1 and language_id != 1";
gobrien35e23782007-11-28 21:37:18 +000017
18$res = mysql_query($query,$dbh);
19
gobrienad11d892007-12-19 08:33:25 +000020
21$return = Array();
22
gobrien35e23782007-11-28 21:37:18 +000023while($line = mysql_fetch_array($res, MYSQL_ASSOC)){
gobrienad11d892007-12-19 08:33:25 +000024// $return .= "<li><a href='?language_id=".$line['language_id']."'>".$line['iso_code']. " - ". $line['name']. "</a>";
gobriene4a39c82008-01-11 00:06:14 +000025 if($line['language_id'] == $_SESSION['language']){
26 $line['current'] = true;
27 }
gobrienad11d892007-12-19 08:33:25 +000028 $return[] = $line;
gobrien35e23782007-11-28 21:37:18 +000029}
30
gobrienf7bc46b2007-12-20 23:13:03 +000031//print_r($return);
gobrienad11d892007-12-19 08:33:25 +000032
33print json_encode($return);
34exit();
35
gobrien0a152142007-12-19 08:38:52 +000036?>