Menu lewe
Dostęp do platformy znajduje się na stronie https://platformazakupowa.pl/pn/miekinia_zuk.
//$cal = new Months;
$tab = "auction";
$date_ = "date_";
$sql = " and $tab.id_menu='".$_GET["id"]."' and $tab.title != '' and $tab.active='1'";
//$cal->type = "year";
//$cal->auto_select = null;
$tmpl->set_file('blocks3','form.html');
$tmpl->set_block('blocks3','form_comment');
$tmpl->set_file('blocks2','auction.html');
$tmpl->set_block('blocks2','auction2');
$tmpl->set_block('blocks2','auction_table_row');
$tmpl->set_block('blocks2','auction_head');
$tmpl->set_block('blocks2','photogallery');
$tmpl->set_block('blocks2','auction_title');
$tmpl->set_block('blocks','modul');
//$tmpl->set_block('blocks','table_select');
//$tmpl->set_block('blocks','table_option');
$tmpl->set_block('blocks','table_search');
$tmpl->set_block('blocks','comment');
$tmpl->set_block('blocks','scale');
$tmpl->set_block('blocks','back');
$tmpl->set_block('blocks','photo');
$tmpl->set_block('blocks','auction_table_row_float');
$tmpl->set_block('blocks','table_table');
$tmpl->set_block('blocks','table_tr');
$tmpl->set_block('blocks','table_th');
$tmpl->set_block('blocks','table_td');
if(!isset($_GET["str"]))
$_GET["str"] = null;
if(!isset($_GET["idd"]))
$_GET["idd"] = null;
//$tmpl->set_var("date_label", "Określ datę");
if(isset($_GET["idd"]))
{
$photo_vert = 2;
$iff = 0;
$db = new DB__("select $tab.*, auction_category.name as category from $tab
left join auction_category on auction_category.id=$tab.id_category
where $tab.id='".$_GET["idd"]."' and $tab.title != '' and $tab.active='1'");
if($db->next_record())
{
$tmpl->set_var("id_table", " class=\"table_border\"");
$tmpl->set_var("id_tr", " ");
$tmpl->set_var('n_href', File::make_mode_rew("Zamowienia publiczne", $_GET["id"]));
//$tmpl->parse('modul_', 'auction_head', true);
$site_name_idd = ", ".$db->f('title');
//tytul
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Tytuł:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", "".$db->f('title')."");
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
if($db->f('category'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Kategoria:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('category'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('value'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Wartość:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('value'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('phone'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Nr telefonu:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('phone'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('fax'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Nr faxu:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('fax'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('email'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "E-mail:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('email'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('date_'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Data wprowadzenia:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('date_'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('date_to'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Termin składania ofert:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('date_to').", ".substr($db->f('time_to'),0,5));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('text'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Treść:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('text'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('date_offer') != "" && $db->f('date_offer') != "0000-00-00")
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Data wprowadzenia informacji o wyborze najkorzystniejszej oferty:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('date_offer')." ".substr($db->f('time_offer'),0,5));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
if($db->f('result'))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Wynik postępowania:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $db->f('result'));
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
///////////////////pliki
if($files = Site_files::show_files($db->f('id'), $_GET["id"], "ul_"))
{
$tmpl->set_var('id_td', " class=\"label\"");
$tmpl->set_var("td_", "Pliki:");
$tmpl->parse('tr_', 'table_td');
$tmpl->set_var('id_td', "");
$tmpl->set_var("td_", $files[1].$files[0]);
$tmpl->parse('tr_', 'table_td', true);
$tmpl->parse('table_', 'table_tr', true);
}
$tmpl->parse('modul_', 'table_table', true);
$tmpl->parse('modul_', 'back', true);
$modul = $tmpl->subst('modul');
}
}
else
{
if(!isset($_GET["id_status"]))
$_GET["id_status"] = "-1";
$db = new DB__("select auction_status.* from auction_status, $tab
where auction_status.id=$tab.id_status and $tab.title != '' and $tab.active='1'
group by auction_status.id
order by auction_status.name");
while($db->next_record())
{
if($_GET["id_status"] == $db->f('id'))
$tmpl->set_var('option_selected', " selected=\"selected\"");
else
$tmpl->set_var('option_selected', "");
$tmpl->set_var('option_value', $db->f('id'));
$tmpl->set_var('option_', $db->f('name'));
$tmpl->parse('option_status_', 'table_option', true);
}
$where = "";
if($_GET["id_status"] != "-1" && $_GET["id_status"] != "")
$where .= " and $tab.id_status='".$_GET["id_status"]."'";
//$tmpl->set_var('cal', $cal->show_months($tab, $date_, $sql));
$tmpl->parse('modul_', 'auction2', true);
// ".$cal->where."
$tmpl->set_var("idd", $_GET["id"]);
$db = new DB__("select $tab.*, auction_category.name as category from $tab
left join auction_category on auction_category.id=$tab.id_category
left join auction_status on auction_status.id=$tab.id_status
where $tab.id_menu='".$_GET["id"]."' and $tab.title != '' and $tab.active='1' $where
order by $tab.date_ desc");
if($db->nf())
{
$count = 1;
$links = 10;
if(!isset($_GET["lim"]))//przy wyszukiwaniu zerujemy
{
$_GET["lim"] = 0;
$iff = 0;
}
else
$iff = $_GET["lim"] * $links;
$db->seek($iff);
$tmpl->set_var("ul_", "");
$tmpl->set_var('nf', $db->nf());
while($db->next_record())
{
$iff++;
$fin = "";
//if($db->f('date_to') < date("Y-m-d"))
// $fin = " (zakończony)";
//else
// $fin = " (ogłoszony)";
//$tmpl->set_var("a_", $db->f('title')."$fin (".File::date_from_to($db->f('date_to')).")");
$tmpl->set_var("a_", "".$db->f('title')."$fin");
$tmpl->set_var("id_a", "");
$tmpl->set_var("a_link", File::make_mode_rew($db->f('title'),$_GET["id"],$db->f('id')));
$tmpl->parse("li_",'table_a');
$more = "
";
$more .= "data wprowadzenia: ".$db->f('date_')."
";
if($db->f('date_to'))
$more .= "termin składania ofert: ".$db->f('date_to').", ".substr($db->f('time_to'),0,5)."
";
if($db->f('category'))
$more .= "kategoria: ".$db->f('category')."
";
$tmpl->set_var("more", $more);
$tmpl->parse("li_",'more',true);
$tmpl->set_var("id_li", "");
$tmpl->parse("ul_",'table_li',true);
$tmpl->set_var('id_ul', " class=\"ul_\"");
if(($iff >= $links * ($_GET["lim"] + 1)) && isset($count))
break;
}
$tmpl->parse('modul_','table_ul',true);
//podzialka na dole
$sc = show_scale($db->nf(), $links, "index.php");
if(isset($count) && isset($sc))
{
$tmpl->set_var('scale_', $sc);
$tmpl->parse('modul_', 'scale', true);
}
}
else
{
$tmpl->set_var('cmnt',"Nie znaleziono informacji spełniających wybrane kryteria");
$tmpl->parse('modul_', 'form_comment', true);
}
$modul = $tmpl->subst('modul');
}
?>