// LIST ALL SOFTWARE THAT WILL RUN OM THIS PART *****************************
// INCLUDED IN ALL ROBOTS TO CHECK THEIR DIRECTORY
$qry2=("SELECT tblsystext.txtname
, software.urlmain
, software.sftname
, software.sftid
, software.controller
FROM software
LEFT JOIN tblsystext ON software.controller = tblsystext.recordid
WHERE position(' $idpart ' in software.prtlst) > 0
AND software.rstid = 2
AND tblsystext.lanid = $koekje[2]
AND tblsystext.txlid = 19
ORDER BY sftname ASC
, controller ASC
;");
$result = pg_query($con1, $qry2);
if (pg_num_rows($result)>0) { //Only if at least 1 program exists
echo (' ');
echo (""); //Header
$tmp = get_txt($con1, 9, $koekje[2], 3922); //Fieldname at screen
if ($koekje[3]=="1") { //If this user wants to translate then
echo ("$tmp"); //If desired
}else{ echo ("$tmp"); } //Else just show if no need to translate
echo (" |
---|
");
while($col = pg_fetch_array($result)){
$col[0] = ("$col[0]");
echo (" ");
echo ("$col[2]   | ");
echo ("$col[0] | ");
if ($koekje[0] > 0 and $koekje[3]>0){ //User is logged in and translates
echo ("");
echo ("(Edit) | ");
}
echo (' ');
}
echo (' ');
}
?>
// LIST ALL ROBOTS THAT INCLUDE THIS PART ***********************************
// $idpart
// INCLUDED IN ALL ROBOTS TO CHECK THEIR DIRECTORY
$qry_bpp=("SELECT farmbotversie.id
, farmbotversie.part_list
, tblsystext.txtname
FROM farmbotversie
LEFT JOIN tblsystext ON farmbotversie.id = tblsystext.recordid
WHERE tblsystext.txlid = 27
AND tblsystext.lanid = $koekje[2]
ORDER BY tblsystext.txtname ASC
;");
$result_bpp = pg_query($con1, $qry_bpp);
$header = 0;
while($colbpp = pg_fetch_array($result_bpp)){ //Only if at least 1 robot exists
if(substr_count($colbpp[1], " $idpart ") > 0){
if ($header == 0) {
echo ("");
echo (""); //Header
$tmp = get_txt($con1, 9, $koekje[2], 3879); //Fieldname at screen
if ($koekje[3]=="1") { //If this user wants to translate then
echo ("$tmp"); //If desired
}else{ echo ("$tmp"); } //Else just show if no need to translate
echo (" | ");
$header++;
} //End of if ($header == 0)
echo ("");
echo ("$colbpp[2]");
//Show software van deze bot
$qry=("SELECT software_basedir
FROM farmbotversie
WHERE id = $colbpp[0];");
$result = pg_query($con1, $qry);
$col = pg_fetch_array ($result ,0);
$dir1 = "/var/www/html/robotigs/software/$col[0]";
$arr1 = glob($dir1, GLOB_ONLYDIR);
if (isset($arr1[0])){
$folder = $arr1[0];
$countertmp = 0;
echo ("");
foreach (scandir($folder, 1) as $filename) {
if ($filename<>"." AND $filename <>".."){
if ($countertmp == 0){
$countertmp++;
} //End of if ($countertmp == 0)
$tmp = "/";
$dir = substr($folder, 14) ."/";
$link = $tmp .$dir .$filename;
$showname = substr($filename, 0 ,-4);
echo ("- ");
echo "$showname";
echo ("
");
} //End of if ($filename<>"." AND $filename <>".."){
} //End of foreach (scandir($folder, 1) as $filename)
echo ("");
} //End of if (isset($arr1[0]))
echo (" | ");
}
}
if ($header > 0){
echo (" ");
}
?>
Warning: include(/var/www/html/robotigs/includes/wishlistperpart.php): Failed to open stream: No such file or directory in /var/www/html/robotigs/includes/parts_header.php on line 128
Warning: include(): Failed opening '/var/www/html/robotigs/includes/wishlistperpart.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/robotigs/includes/parts_header.php on line 128
//Lists last 5 parts from which the content was changed
echo ("");
$tmp = get_txt($con1, 9, $koekje[2], 2909);
echo ("$tmp | ");
echo (" ");
$qrylp = "SELECT tblsystext.txtname
, tblsystext.recordid
, tblsystext.mdate
, tblsystext.txlid
FROM tblsystext
WHERE tblsystext.lanid = $koekje[2]
AND tblsystext.txlid = 19 OR tblsystext.txlid = 26 OR tblsystext.txlid = 27
ORDER BY tblsystext.mdate DESC
LIMIT 5
;";
$resultlp = pg_query($con1, $qrylp);
while($rowlp = pg_fetch_array($resultlp)){ //Fields accesible by their sequence
$changeddate = substr($rowlp[2], 0, 11);
echo ("");
echo ("$changeddate | ");
if ($rowlp[3] == 19) {
$tmp = "/robotigs/includes/parts_header.php?idpart=$rowlp[1]";
}
if ($rowlp[3] == 26) {
$tmp = "/robotigs/includes/sorts_header.php?idsrt=$rowlp[1]";
}
if ($rowlp[3] == 27) {
$tmp = "/robotigs/includes/bots_header.php?idbot=$rowlp[1]";
}
echo ("");
echo ("$rowlp[0] | ");
}
echo ("
");
?>
echo ('");
//*** TABLE HEADER ------------------------------------------------------------
echo (" ");
echo (" ");
echo ("Robots | ");
//*** SHOW ALL ALLOWED ROBOTS --------------------------------------------------
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
$sql = pg_query($con1,
"SELECT farmbotversie.id
, tblsystext.txtname
, farmbotversie.bot_icon_link
, farmbotversie.lanid
, farmbotversie.flessenhals
FROM farmbotversie
LEFT JOIN tblsystext ON tblsystext.recordid = farmbotversie.id
WHERE tblsystext.lanid = farmbotversie.lanid
AND tblsystext.txlid = 27
ORDER BY tblsystext.txtname");
}else{
$sql=pg_query($con1,
"SELECT farmbotversie.id
, tblsystext.txtname
, farmbotversie.bot_icon_link
, farmbotversie.lanid
, farmbotversie.flessenhals
FROM farmbotversie
LEFT JOIN tblsystext ON tblsystext.recordid = farmbotversie.id
WHERE tblsystext.lanid = farmbotversie.lanid
AND tblsystext.txlid = 27
AND farmbotversie.status = 100
ORDER BY tblsystext.txtname");
}
$_recordteller = 0;
$_recordseinde = pg_num_rows($sql);
while ($_recordteller<$_recordseinde):
$arr = pg_fetch_array ($sql ,$_recordteller);
$botid = $arr[0];
$botnaam = $arr[1];
$boticonlink = $arr[2];
if ($arr[3] == 1) {$imgname = "nederland.gif";}
if ($arr[3] == 2) {$imgname = "deutschland.gif";}
if ($arr[3] == 3) {$imgname = "uk.gif";}
if ($arr[3] == 4) {$imgname = "france.gif";}
echo ("");
echo ("");
echo (" $botnaam");
echo (" | ");
//echo ("");
//echo (" | ");
if ($koekje[0]>0 and $koekje[3]>0){ //User is logged in and translates
echo ("$arr[4]");
echo (" | ");
}
echo (' ');
$_recordteller++;
endwhile;
echo (' ');
echo ' |