blob: 5eedaa9a5357095e2b36bfbf369a354add701071 [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>";
25 $return[] = $line;
gobrien35e23782007-11-28 21:37:18 +000026}
27
gobrienad11d892007-12-19 08:33:25 +000028
29print json_encode($return);
30exit();
31
gobrien35e23782007-11-28 21:37:18 +000032?>
33
34<ul id='language-choices'>
gobrien35e23782007-11-28 21:37:18 +000035 <?=$return;?>
36</ul>