コード例 #1
0
ファイル: site.php プロジェクト: nugget/SlackerDKP
 function returncolumns($table)
 {
     $this->dbcnx();
     $columns = array();
     $colnames = mysql_querY("show columns from {$table}");
     while ($f = mysql_fetch_object($colnames)) {
         $columns[] = $f->Field;
     }
     return $columns;
 }
コード例 #2
0
ファイル: cl_omega.lib.php プロジェクト: laiello/athletica
 /**
  * outputs starts
  * Event; Round; Heat; Lane; NRelay; idBib
  *
  * - $meeting		meeting id
  */
 function set_lststart($meeting)
 {
     global $cfgRoundStatus;
     $tmp = 'Event; Round; Heat; Lane; NRelay; idBib';
     mysql_query("LOCK TABLES serienstart as sst READ, start as st READ, serie as s READ, wettkampf as w READ, anmeldung as a READ\r\n\t\t\t\t\t, staffel as sf READ, runde AS r READ");
     $sql = "SELECT DISTINCT s.Film, w.xWettkampf, s.xRunde, s.xSerie, sst.Position, st.xStaffel, a.Startnummer, sf.Startnummer as Staffelnummer FROM\r\n\t\t\t\tserienstart as sst\r\n\t\t\t\tLEFT JOIN start as st using(xStart)\r\n\t\t\t\tLEFT JOIN serie as s on sst.xSerie = s.xSerie\r\n\t\t\t\tLEFT JOIN wettkampf as w on w.xWettkampf = st.xWettkampf\r\n\t\t\t\tLEFT JOIN anmeldung as a on st.xAnmeldung = a.xAnmeldung\r\n\t\t\t\tLEFT JOIN staffel as sf on st.xStaffel = sf.xStaffel\r\n\t\t\t\tLEFT JOIN runde as r on r.xWettkampf = w.xWettkampf\r\n\t\t\tWHERE\r\n\t\t\t\tw.Zeitmessung = 1\r\n\t\t\tAND\tw.xMeeting = " . $meeting . " \r\n\t\t\tAND r.Status != " . $cfgRoundStatus['results_done'] . "";
     $res = mysql_query($sql);
     if (mysql_errno() > 0) {
         AA_printErrorMsg(mysql_errno() . ": " . mysql_error());
     } else {
         while ($row = mysql_fetch_assoc($res)) {
             if ($row['xStaffel'] > 0) {
                 $tmp .= "\r\n" . $row['Film'] . ";1;1" . ";" . $row['Position'] . ";" . $row['xStaffel'] . ";" . $row['Staffelnummer'];
             } else {
                 $tmp .= "\r\n" . $row['Film'] . ";1;1" . ";" . $row['Position'] . ";" . $row['xStaffel'] . ";" . $row['Startnummer'];
             }
         }
         $this->send_file($tmp, "LSTSTART.TXT");
     }
     mysql_querY("UNLOCK TABLES");
 }
コード例 #3
0
ファイル: listings.php プロジェクト: Emaren/agentpage
    $dir = $_GET['dir'];
    // dir is always set if sort if set
    if ($dir == 'asc') {
        $sort_dir[$sort] = 'desc';
        $sort_img[$sort] = 'sort_desc.gif';
    } else {
        $sort_dir[$sort] = 'asc';
        $sort_img[$sort] = 'sort_asc.gif';
    }
}
if ($_GET['did'] != '') {
    $sql = 'select * from tb_listings where id=' . $_GET['did'];
    $res = mysql_query($sql);
    if ($res) {
        $sql = 'select * from tb_listings images where listingid=' . $_GET['did'];
        $res = mysql_querY($sql);
        if (mysql_num_rows($res) > 0) {
            while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {
                unlink(realpath('./') . '/images/' . $row['imagename'] . '.' . $row['ext']);
                unlink(realpath('./') . '/images/' . $row['imagename'] . '_sm1.' . $row['ext']);
                unlink(realpath('./') . '/images/' . $row['imagename'] . '_sm4.' . $row['ext']);
                $sql2 = 'delete from tb_listing_images where id=' . $row['id'];
                $res2 = mysql_query($sql);
            }
        }
        $sql = 'delete from tb_user_listings where listingid=' . $_GET['did'];
        $res = mysql_query($sql);
        $sql = 'delete from tb_listings where id=' . $_GET['did'];
        $res = mysql_query($sql);
        $msg = 'Success deleted listing No ' . $_GET['did'];
    } else {