Created
December 16, 2011 11:25
-
-
Save yko/1485715 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#use strict; | |
sub Vacancy_Menu { | |
################################################################################ | |
### Выборка из таблиц по заданным параметрам | |
my $data=$dbh->prepare("SELECT * FROM ${pref}_rubrika ORDER BY stepshift ASC"); | |
$data->execute(); | |
if ($my{'c'} eq ''){ | |
($my{'c'}) = $dbh->selectrow_array("SELECT id FROM ${pref}_gorod where stepshift=(SELECT min(stepshift) FROM $pref\_gorod)");; | |
} | |
$my_c = "&c=$my{'c'}"; | |
print <<HTML; | |
<div class="vakansii"> | |
HTML | |
while (@array = $data->fetchrow_array){ | |
my $rubrika_menu_id = $array[0]; | |
my $rubrika_menu_name = $array[1]; | |
if ($my{'r'} == $rubrika_menu_id){ | |
print "<b>$rubrika_menu_name</b><br /> \n"; | |
} else { | |
print "<a href=\"/rubrika/?r=$rubrika_menu_id$my_c\">$rubrika_menu_name</a><br /> \n"; | |
} | |
} | |
print <<HTML; | |
</div> | |
HTML | |
################################################################################ | |
} | |
1; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment