Commit b839f16b authored by ueli heuer's avatar ueli heuer 👾
Browse files

Fix more "undefined variable" Error

parent 5d38a83f
......@@ -6,3 +6,4 @@ data/*.rrd
/wwwstat/
/log/
/dump/
/tmp/
\ No newline at end of file
......@@ -718,10 +718,12 @@ function usedby_hardware($hw_id) // {{{
$filter = null;
}
$_id = '';
if (is_array($hw_id) ) {
// TODO: expand array to SQL dw.id in (....)
// TODO: expand array to SQL dw.id in (....)
// "and dw.in in (1,2,3, ... ) "
} elseif ($hw_id > 0 ) {
$_id = sprintf('and dw.id = \'%d\' ',$hw_id);
$_id = sprintf('and dw.id = \'%d\' ',$hw_id);
}
$hw_sql = sprintf('select dw.id, dw.model, dw.description, dh.id, dh.name,
dh.rt_id, (dh.start_date < now() and
......@@ -736,15 +738,9 @@ function usedby_hardware($hw_id) // {{{
order by %s',
$_id, $filter, $order);
if ( $filter || !$_id ) {
$hw_r = $CONFIG->DB->query($hw_sql);
DVG_error::check($hw_r);
$hw_count = $hw_r->rowCount();
} else {
$hw_count = DVG_database::getOne($CONFIG->DB,sprintf('select count(*)
from dvg_host
where hw_id =\'%d\'',$hw_id));
}
// fix the ranges to fall into a valid range
if ( $pos > $hw_count ) { $pos = $hw_count - $show; }
......
......@@ -281,11 +281,11 @@ function detail_location($loc_id,$action) {
$table->add_row('userdark');
$table->add_cell(gettext('Name:'),1,'description');
$table->add_cell($loc_name,$map ? 1 : DVG_table::WHOLE_ROW ,'value');
if ( $map ) {
$table->add_cell($loc_name, isset($map) ? 1 : DVG_table::WHOLE_ROW ,'value');
if ( isset($map) ) {
$table->add_cell($map,1,'right');
}
if ( $loc_ref ) {
if ( isset($loc_ref) ) {
$table->add_row('userdark');
$table->add_cell(gettext('Reference:'),1,'description');
$table->add_cell($loc_ref, DVG_table::WHOLE_ROW ,'value');
......@@ -295,7 +295,7 @@ function detail_location($loc_id,$action) {
$table->add_cell(gettext('Description:'),1,'description');
$table->add_cell($loc_descr,DVG_table::WHOLE_ROW,'value');
if ( $loc_type_name ) {
if ( isset($loc_type_name) ) {
$table->add_row('userdark');
$table->add_cell(gettext('Location Type:'),1,'description');
$table->add_cell(sprintf('<a title="%s" href="%s?action=detail_type;' .
......@@ -303,19 +303,19 @@ function detail_location($loc_id,$action) {
$loc_type_name), DVG_table::WHOLE_ROW,'value');
}
if ( $loc_street ) {
if ( isset($loc_street) ) {
$table->add_row('userdark');
$table->add_cell(gettext('Strasse:'),1,'description');
$table->add_cell($loc_street,DVG_table::WHOLE_ROW,'value');
}
if ( $loc_city ) {
if ( isset($loc_city) ) {
$table->add_row('userdark');
$table->add_cell(gettext('City:'),1,'description');
$table->add_cell($loc_city,DVG_table::WHOLE_ROW,'value');
}
if ( $demarcation_point ) {
if ( isset($demarcation_point) ) {
$table->add_row('userdark');
$table->add_cell(gettext('Demarcation Point:'),1,'description');
$table->add_cell($demarcation_point,DVG_table::WHOLE_ROW,'value');
......@@ -354,7 +354,7 @@ function detail_location($loc_id,$action) {
} else {
$add_loc_cmd = $add_host_cmd = '';
}
if ( $add_host_cmd || $count_hosts) {
if ( isset($add_host_cmd) || isset($count_hosts) ) {
$table->add_row('tablehead');
$table->add_cell(gettext('Host:'),1,'subtitle');
if ( $count_hosts ) {
......@@ -652,6 +652,8 @@ function search_location() # {{{
$filter = sprintf('and (hl.name regexp \'%s\'
or hl.description regexp \'%s\'
or dlt.name regexp \'%s\')',$filter_, $filter_, $filter_);
} else {
$filter = '';
}
$loc_sql = sprintf('select hl.id, hl.name, hl.description,
......@@ -741,6 +743,7 @@ function search_location() # {{{
$table->add_cell(gettext('action'),1,'padding_5 right');
$i = 0;
while (list($loc_id, $loc_name, $loc_description, $type_id, $type_name,
$upper_id, $upper_name, $loc_start_date, $loc_stop_date, $loc_used) =
$loc_r->fetch() ) {
......@@ -1024,6 +1027,8 @@ function list_by_type($type_id) # {{{
$filter = sprintf('and (hl.name regexp \'%s\'
or hl.reference regexp \'%s\'
or hl.description regexp \'%s\')',$filter_, $filter_, $filter_);
} else {
$filter = '';
}
$bt_sql = sprintf('select hl.id, hl.name, hl.reference,
......@@ -1110,7 +1115,7 @@ function list_by_type($type_id) # {{{
1,'left padding_5');
$table->add_cell(gettext('action'),1,'padding_5 right');
$i=0;
while (list($loc_id, $loc_name, $loc_reference, $loc_description,
$loc_start, $loc_stop, $changer, $changed, $creator, $created,
$host_count) =
......@@ -1333,10 +1338,11 @@ function select_location_type ($name,$value,$multiple = FALSE) # {{{
gettext('no type') : gettext('select a location type')),
$out);
} # }}}
function link_by_type($type_id,$count,$text = null) # {{{
function link_by_type($type_id,$count,$text = '') # {{{
{
if ( $text) {
$text1 = sprintf(' %s',$text);
$text1 = $text2 = $text;
if ( $text ) {
$text1 = $text;
$text2 = sprintf(' %ss',$text);
};
if ($count) {
......
......@@ -49,40 +49,40 @@ $PAGE = new DVG_interface(TRUE);
switch ($action) {
case '':
list($page,$help) = loop_menu();
list($page,$title,$help) = loop_menu();
break;
case 'loop_add':
list($page,$help) = loop_edit(0);
list($page,$title,$help) = loop_edit(0);
break;
case 'loop_detail':
list($page,$help) = loop_detail($loop_id,$action);
list($page,$title,$help) = loop_detail($loop_id,$action);
break;
case 'loop_edit':
list($page,$help) = loop_edit($loop_id);
list($page,$title,$help) = loop_edit($loop_id);
break;
case 'loop_save':
list($page,$help) = loop_save($loop_id);
list($page,$title,$help) = loop_save($loop_id);
break;
case 'loop_search':
list($page,$help) = search_loop();
list($page,$title,$help) = search_loop();
break;
case 'loop_do_search':
list($page,$help) = do_search_loop();
list($page,$title,$help) = do_search_loop();
break;
case 'loop_upload':
list($page,$help) = loop_upload();
list($page,$title,$help) = loop_upload();
break;
case 'loop_do_upload':
list($page,$help) = loop_do_upload();
list($page,$title,$help) = loop_do_upload();
break;
// Provider
case 'provider_list':
list($page,$help) = provider_list();
list($page,$title,$help) = provider_list();
break;
case 'provider_detail':
$provider_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,
'provider_id',DVG_input::SRC_REQUEST);
list($page,$help) = provider_detail($provider_id,$action);
list($page,$title,$help) = provider_detail($provider_id,$action);
break;
case 'provider_edit':
$provider_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,
......@@ -97,12 +97,12 @@ switch ($action) {
break;
// Technology
case 'tech_list':
list($page,$help) = tech_list();
list($page,$title,$help) = tech_list();
break;
case 'tech_detail':
$tech_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,
'tech_id',DVG_input::SRC_REQUEST);
list($page,$help) = tech_detail($tech_id,$action);
list($page,$title,$help) = tech_detail($tech_id,$action);
break;
case 'tech_edit':
$tech_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,
......@@ -123,7 +123,7 @@ if ($loop_id) {
$link_loop = sprintf('<a href="%s?action=loop_detail;localloop_id=%s">%s</a>',
LOOP_PHP,$loop_id,DVG_loop::get_name($loop_id));
}
if ($title == '') {
if (! isset($title) || $title == '') {
if ( preg_match('/^provider_/',$action )) {
$title = sprintf ('<a href="%s">local loop</a> ::: <a href="%s?action=provider_list">provider</a>',LOOP_PHP,LOOP_PHP);
} elseif ( preg_match('/^tech/',$action )) {
......@@ -196,7 +196,7 @@ function loop_menu () {
$table->close_table(TRUE);
return array($table->get_table(),'loop:menu');
return array($table->get_table(),'','loop:menu');
}
// }}}
// {{{ function loop_detail ($loop_id)
......@@ -376,7 +376,7 @@ function loop_detail ($loop_id,$action)
$table->close_table(TRUE);
return array($table->get_table(),'loop:detail');
return array($table->get_table(),'','loop:detail');
}
// }}}
function loop_edit ($loop_id) // {{{
......@@ -384,7 +384,8 @@ function loop_edit ($loop_id) // {{{
global $CONFIG,$PAGE;
if ( $loop_id) {
$hidden = '';
if ( isset($loop_id) && $loop_id ) {
$result = DVG_database::getRow($CONFIG->DB,sprintf('select id, name, provider_id,
loc_a, a_fa_port, b_street, b_city, b_up_upk, looptech_id,
order_nr, start_date, stop_date,
......@@ -397,7 +398,9 @@ function loop_edit ($loop_id) // {{{
$action='edit';
} else {
$action = 'new';
$side_a=0;
$loop_name = $provider_id = $side_a = $a_fa_port = $b_street =
$b_city = $b_up_upk = $tech_id = $order_nr = $start_date =
$stop_date = $user = $changed = $created = '';
}
$table = new DVG_table(2);
......@@ -515,7 +518,7 @@ function loop_edit ($loop_id) // {{{
</div>
</form>',LOOP_PHP, DVG_interface::input('hidden','localloop_id',$loop_id), $hidden, $table->get_table());
return array($output,'loop:edit');
return array($output,'','loop:edit');
}
// }}}
......@@ -616,14 +619,14 @@ function search_loop () {
$orphand_date = DVG_input::check(DVG_input::CHECK_DATE,'orphand_date',
DVG_input::SRC_POST);
$orphand = $_REQUEST['orphand'] == 'on';
$faport = $_REQUEST['faport'] == 'on';
$dslamport = $_REQUEST['dslamport'] == 'on';
$history = $_REQUEST['history'] == 'on';
if (is_null($_REQUEST['storebutton'])) {
$orphand = DVG_input::check_checkbox('orphand',DVG_input::SRC_REQUEST);
$faport = DVG_input::check_checkbox('faport',DVG_input::SRC_REQUEST);
$dslamport = DVG_input::check_checkbox('dslamport',DVG_input::SRC_REQUEST);
$history = DVG_input::check_checkbox('history',DVG_input::SRC_REQUEST);
if (isset($_REQUEST['storebutton'])) {
$htmllinks = true;
} else {
$htmllinks = $_REQUEST['htmllinks'] == 'on';
$htmllinks = DVG_input::check_checkbox('htmllinks',DVG_input::SRC_REQUEST);
}
......@@ -659,7 +662,7 @@ function search_loop () {
$table->add_cell('Orphand:',1,'description');
$table->add_cell(sprintf('<input id="ls01" type="checkbox" name="orphand"%s/> ' .
'<label for="ls01">%s</label><br/>%s %s',
$orphand == 'on' ? ' checked="checked"' : '',
$orphand ? ' checked="checked"' : '',
gettext('search only orphand loops'),
DVG_interface::input_date('orphand_date',$orphand_date,
gettext('Day for Orphands'),TRUE),DVG_interface::DATE_HINT),1,'value');
......@@ -698,7 +701,7 @@ function search_loop () {
</div>
</form>', LOOP_PHP, $table->get_table());
return array($output,'loop:search');
return array($output,'','loop:search');
}
// }}}
......@@ -716,6 +719,7 @@ function do_search_loop () {
$provider_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,
'provider_id',DVG_input::SRC_REQUEST);
$provider_sql = '';
if ( is_array($provider_id)) {
$provider_sql = 'and dl.provider_id in (';
$nullprovider = FALSE;
......@@ -736,6 +740,7 @@ function do_search_loop () {
$tech_id = DVG_input::check(DVG_input::CHECK_UNSIGNED_INTEGER,'tech_id',
DVG_input::SRC_REQUEST);
$technology_sql = '';
if ( is_array($tech_id)) {
$technology_sql = 'and dl.looptech_id in (';
$nulltech = FALSE;
......@@ -757,29 +762,35 @@ function do_search_loop () {
$start_date = DVG_input::check(DVG_input::CHECK_DATE,'start_date',DVG_input::SRC_REQUEST);
$stop_date = DVG_input::check(DVG_input::CHECK_DATE,'stop_date',DVG_input::SRC_REQUEST);
$orphand = $_REQUEST['orphand'] == 'on';
$faport = $_REQUEST['faport'] == 'on';
$dslamport = $_REQUEST['dslamport'] == 'on';
$htmllinks = $_REQUEST['htmllinks'] == 'on';
$history = $_REQUEST['history'] == 'on';
$orphand = DVG_input::check_checkbox('orphand',DVG_input::SRC_REQUEST);
$faport = DVG_input::check_checkbox('faport',DVG_input::SRC_REQUEST);
$dslamport = DVG_input::check_checkbox('dslamport',DVG_input::SRC_REQUEST);
$htmllinks = DVG_input::check_checkbox('htmllinks',DVG_input::SRC_REQUEST);
$history = DVG_input::check_checkbox('history',DVG_input::SRC_REQUEST);
$history_query = $history ? '' : ' limit 1';
$loc_sql = '';
if ($side_a_id) {
$loc_sql = "and dl.loc_a = '$side_a_id'";
}
$side_sql = '';
if ($side_b_id) {
$side_sql = "and dl.b_street = '$side_b_id'";
} elseif ($side_b_name) {
$side_sql = "and dl.b_street regexp '$side_b_name'";
}
if ($start_date) { $start_sql = "and dl.start_date regexp '$start_date'"; }
$start_sql = $stop_sql = '';
if ($start_date) {
$start_sql = "and dl.start_date regexp '$start_date'";
}
if ($stop_date) {
$stop_sql = "and dl.stop_date regexp '$stop_date'";
} else {
$stop_sql = "and (dl.stop_date is null or dl.stop_date >= curdate())";
}
if ( $orphand == 'on' ) {
if ( $orphand ) {
$orphand_date = DVG_input::check(DVG_input::CHECK_DATE,'orphand_date',
DVG_input::SRC_REQUEST);
$loop_sql = "SELECT dl.id,dl.name,dl.a_fa_port, dl.b_up_upk,
......@@ -867,19 +878,27 @@ function do_search_loop () {
} else {
if ( $faport ) {
$loop_sql="select dl.id,dl.name,
$loop_sql= sprintf("SELECT dl.id,dl.name,
left(dl.a_fa_port,LOCATE('-',dl.a_fa_port)-1) fa_row,
right(dl.a_fa_port,length(dl.a_fa_port) - LOCATE('-',dl.a_fa_port))+0 fa_pos,
b_up_upk,lp.id,lp.name,
hl.id,hl.name,dl.b_street,
DATE_FORMAT(dl.start_date,'%Y-%b-%e'),
DATE_FORMAT(dl.stop_date,'%Y-%b-%e')
from dvg_localloop dl
LEFT JOIN dvg_loop_provider lp ON dl.provider_id = lp.id
LEFT JOIN dvg_host_location hl ON dl.loc_a = hl.id
where dl.name regexp '$loop_name'
$provider_sql $technology_sql $loc_sql $side_sql $start_sql $stop_sql
order by fa_row,fa_pos";
b_up_upk, lp.id, lp.name,
hl.id, hl.name, dl.b_street,
DATE_FORMAT(dl.start_date,'%%Y-%%b-%%e'),
DATE_FORMAT(dl.stop_date,'%%Y-%%b-%%e')
FROM dvg_localloop dl
LEFT JOIN dvg_loop_provider lp ON dl.provider_id = lp.id
LEFT JOIN dvg_host_location hl ON dl.loc_a = hl.id
WHERE dl.name regexp '%s'
%s %s %s %s %s %s
ORDER BY fa_row,fa_pos",
$loop_name,
$provider_sql,
$technology_sql,
$loc_sql,
$side_sql,
$start_sql,
$stop_sql
);
} else {
$loop_sql="select dl.id,dl.name,dl.a_fa_port,null,b_up_upk,lp.id,lp.name,
......@@ -924,7 +943,7 @@ function do_search_loop () {
$old_fa_row = 0; $old_fa_pos = 1;
while ( list($loop_id,$loop_name_,$fa_row,$fa_pos,$up,$provider_id,
$provider_name,$loc_id,$loc_name,$b_street,$start_date,
$stop_date,$link_id) = $loop_r->fetch()) {
$stop_date) = $loop_r->fetch()) {
if ( $old_fa_row < $fa_row ) {
$max_fa_pos = DVG_database::getOne($CONFIG->DB,sprintf('select
max(right(dl.a_fa_port, length(dl.a_fa_port) -
......@@ -939,6 +958,8 @@ function do_search_loop () {
$old_fa_row = $fa_row;
$old_fa_pos = $fa_pos;
} else {
$max_fa_pos = 0;
}
while ( ++$old_fa_pos < $fa_pos &&
$old_fa_pos <= $max_fa_pos ) {
......@@ -1018,7 +1039,7 @@ function do_search_loop () {
$table->close_table(TRUE);
return array($table->get_table(),'loop:found');
return array($table->get_table(),'','loop:found');
}
// }}}
function quote($do_quote,$text) #{{{
......@@ -1061,7 +1082,7 @@ function loop_upload () #{{{
</div>
</form>', LOOP_PHP, DVG_interface::input('hidden','action','loop_do_upload'),$table->get_table());
return array($output,'loop:upload');
return array($output,'','loop:upload');
} # }}}
function loop_do_upload () # {{{
{
......@@ -1358,7 +1379,7 @@ function loop_do_upload () # {{{
$table->close_table(TRUE);
return array($table->get_table(),'loop:upload');
return array($table->get_table(),'','loop:upload');
} # }}}
function do_fixorder_type($FA_ORDER_TYPE) // {{{
{
......@@ -1443,7 +1464,7 @@ function provider_list() # {{{
$table->close_table(FALSE);
return array($table->get_table(),'loop:found');
return array($table->get_table(),'','provider:list');
}
# }}}
function provider_detail($provider_id,$action) // {{{
......@@ -1469,6 +1490,8 @@ function provider_detail($provider_id,$action) // {{{
list($provider_id,$p_name,$p_phone,$p_fax, $p_email, $p_http, $p_support,
$p_start, $p_stop, $loop_count) = $result;
$title = sprintf('<a href="%s?action=provider_list">Provider</a> :: %s :: %s',LOOP_PHP,gettext('show'),$p_name);
$table = new DVG_table(3);
$table->add_row('tableborder');
......@@ -1522,6 +1545,8 @@ function provider_detail($provider_id,$action) // {{{
$table->close_table(FALSE);
return array($table->get_table(),$title,'provider:detail');
}
# }}}
// {{{ function provider_edit($provider_id)
......@@ -1707,18 +1732,21 @@ function select_provider ($name,$value,$multiple = FALSE) {
global $CONFIG;
$provider_r = $CONFIG->DB->query('select id,name
from dvg_loop_provider
order by ord,name');
$provider_r = $CONFIG->DB->query('SELECT id,name
FROM dvg_loop_provider
WHERE start_date <= now()
AND (stop_date is NULL OR stop_date >= curdate())
ORDER BY ord,name');
DVG_error::check($provider_r);
if ( is_array($value) ) {
if ( isset($value) && is_array($value) ) {
$value_count = count($value);
asort($value);
$i = 0;
}
$out = '';
while ( list($id,$provider) = $provider_r->fetch()) {
if ( $value_count && ( $value[$i] == $id)) {
if ( isset($value_count) && ( $i < $value_count ) && ( $value[$i] == $id)) {
$selected = ' selected="selected"';
$i++;
} elseif ( $value == $id ) {
......@@ -1743,12 +1771,12 @@ function tech_list() # {{{
global $CONFIG;
$tech_r = $CONFIG->DB->query('select dlt.id, dlt.name, count(dl.id)
$tech_r = $CONFIG->DB->query('SELECT dlt.id, dlt.name, count(dl.id)
from dvg_loop_technology dlt
left join dvg_localloop dl on (dl.looptech_id = dlt.id
and dl.start_date <= curdate()
and (dl.stop_date is null or dl.stop_date >= curdate()) )
group by dl.id
group by dlt.id
order by dlt.ord, dlt.name');
DVG_error::check($tech_r);
......@@ -1781,7 +1809,7 @@ function tech_list() # {{{
$table->close_table(FALSE);
return array($table->get_table(),'loop:found');
return array($table->get_table(),'','loop:found');
}
# }}}
function tech_detail($technology_id,$action) // {{{
......@@ -1806,6 +1834,10 @@ function tech_detail($technology_id,$action) // {{{
list($technology_id,$t_name,$t_description, $bbcs_name, $t_ord,
$lastuser, $changed, $creator, $created, $loop_count) = $result;
$title = sprintf('<a href="%s?action=tech_list">%s</a> :: %s :: %s',
LOOP_PHP,gettext('Technology'), gettext('detail'),$t_name);
$table = new DVG_table(3);
$table->add_row('tableborder');
......@@ -1877,7 +1909,7 @@ function tech_edit($technology_id,$new = null,$preset = null,$error = null) // {
}
$mode = 'edit';
$title = sprintf('<a href="%s?action=tech_list">%s</a> :: %s :: %s',
LOOP_PHP,gettext('Technology'),$mode,$p_name);
LOOP_PHP,gettext('Technology'),$mode,$t_name);
} elseif ( $new == 'new' || $new = 'add' ) {
$technology_id = '0';
if ($preset == null) {
......@@ -1894,7 +1926,7 @@ function tech_edit($technology_id,$new = null,$preset = null,$error = null) // {
$table = new DVG_table(4);
$table->add_row('tableborder');
$table->add_cell(sprintf('%s :: %s :: %s',gettext('Local Loop Technology'), $mode, $p_name),DVG_table::WHOLE_ROW,'pagetitle');
$table->add_cell(sprintf('%s :: %s :: %s',gettext('Local Loop Technology'), $mode, $t_name),DVG_table::WHOLE_ROW,'pagetitle');
if ( $error ) {
$table->add_row('userdark');
......@@ -2040,18 +2072,17 @@ function select_tech ($name,$value,$multiple = FALSE) # {{{
global $CONFIG;
$tech_r = $CONFIG->DB->query('select id,name,description
from dvg_loop_technology
order by ord,name');;
DVG_error::check($tech_r);
if ( is_array($value) ) {
$tech_r = $CONFIG->DB->query('SELECT id,name,description
FROM dvg_loop_technology
ORDER BY ord,name');
if ( isset($value) && is_array($value) ) {
$value_count = count($value);
asort($value);
$i = 0;
}
$out = '';
while ( list($id,$tech,$description ) = $tech_r->fetch()) {
if ( $value_count && ( $value[$i] == $id)) {
if ( isset($value_count) && ( $i < $value_count )&& ( $value[$i] == $id)) {
$selected = ' selected="selected"';
$i++;
} elseif ( $value == $id ) {
......
......@@ -219,18 +219,21 @@ function get_description($loc_id) {
}
// }}}
// {{{ function select($field,$id = 0, $action = null )
function select($field,$id = 0, $action = null,$autocomplete = TRUE) {
function select($field,$id = null, $action = null,$autocomplete = TRUE) {
global $CONFIG,$PAGE;
if ( preg_match('/^\d+$/',$id) ) {
if ( preg_match('/^\d+$/',$id) && $id > 0 ) {
$result = DVG_database::getRow($CONFIG->DB,
sprintf('select name,description,street,city
from dvg_host_location
where id = \'%d\'',$id));
list($locname,$locdescription,$street,$city) = $result;
} elseif ($id) {
$locname = $id;
} else {
$locname = '';
$locdescription = '';
$street = '';
$city = '';
$autocomplete = FALSE;
}
......@@ -259,9 +262,10 @@ function get_description($loc_id) {
$loc_id = DVG_database::getOne($CONFIG->DB,sprintf('select id
from dvg_host_location
where name = \'%s\'',$loc_name));
}
} else {
$loc_id = '';
}
return array($loc_id,$loc_name);
}
// }}}
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment