当前位置: 首页>>代码示例>>PHP>>正文


PHP Time::getLink方法代码示例

本文整理汇总了PHP中Time::getLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::getLink方法的具体用法?PHP Time::getLink怎么用?PHP Time::getLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Time的用法示例。


在下文中一共展示了Time::getLink方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: BD

$db = new BD();
$sql = sprintf("select r2.campeonato campeonato from\n\t\t\t\t\t\t(select max(subtime(addtime(data, hora),'06:00:00')) datarod\n\t\t\t\t\t\t\t\tfrom cad_rodada r,\n\t\t\t\t\t\t\t\tcad_campeonato c\n\t\t\t\t\t\t\t\twhere date_add(now(),interval 1 hour)  > subtime(addtime(data, hora),'06:00:00')\n\t\t\t\t\t\t\t\tand c.codigo = r.campeonato\n\t\t\t\t\t\t\t\tand c.`flandamento` = 'S'\n\t\t\t\t\t\t\t\thaving date_add(now(),interval 1 hour) > datarod) r,\n\t\t\t\t\t\t(select campeonato,max(subtime(addtime(data, hora),'06:00:00')) datarod\n\t\t\t\t\t\t\t\tfrom cad_rodada r,\n\t\t\t\t\t\t\t\tcad_campeonato c\n\t\t\t\t\t\t\t\twhere date_add(now(),interval 1 hour) > subtime(addtime(data, hora),'06:00:00')\n\t\t\t\t\t\t\t\tand c.codigo = r.campeonato\n\t\t\t\t\t\t\t\tand c.`flandamento` = 'S'\n\t\t\t\t\t\t\t\tgroup by r.campeonato\n\t\t\t\t\t\t\t\thaving date_add(now(),interval 1 hour) > datarod) r2\n\t\t\t\t\t\twhere r.datarod = r2.datarod");
$db->Query($sql);
$db->Next();
$camp = $db->getValue('campeonato');
$cmp = new Campeonato($camp);
$db->Close();
$cab = sprintf('<legend><span style="color:green;"><b>Rodada Atual</b></legend>');
echo $cab . "\n";
?>
	
 <table id=menuadm frame=box  bordercolor="white" border="1px" cellspacing="0" style="width:450px;" width="450px"> 
          <tr class="cabec"> <td width="140px"  align="right">Mandante</td><td  width="40px" align="center">x</td><td width="140px">Visitante</td><td align="center">Data/Hora</td> </tr>


<?php 
$sql = sprintf("select r.rodada,r.jogo,r.golsma,r.golsvi,r.manda cmanda, r.visita cvisita,\n\t\t\t\t\t\t\t\t\t\t\t\ttm.nome manda,tv.nome visita,\n\t\t\t\t\t\t\t\t\t\t\t\taddtime(r.data, r.hora) datahora\n\t\t\t\t\t\t\t\t\t\t\t\tfrom\n\t\t\t\t\t\t\t\t\t\t\t\tcad_times tm,\n\t\t\t\t\t\t\t\t\t\t\t\tcad_times tv,\n\t\t\t\t\t\t\t\t\t\t\t\tcad_rodada r\n\t\t\t\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t\t\tr.campeonato = %d\n\t\t\t\t\t\t\t\t\t\t\t\tand r.rodada = %d\n\t\t\t\t\t\t\t\t\t\t\t\tand r.manda = tm.codigo\n\t\t\t\t\t\t\t\t\t\t\t\tand r.visita = tv.codigo", $cmp->getCodigo(), $cmp->getRodadaAtual());
$db = new BD();
$db->Query($sql);
while ($db->Next()) {
    $tm = new Time($db->getValue('cmanda'));
    $tv = new Time($db->getValue('cvisita'));
    $linha = sprintf('<td align="right">%s</td>' . '<td  align="center">%s x %s</td> ' . '<td>%s</td> ' . '<td>%s %s</td> ', $tm->getLink(), $db->getValue('golsma'), $db->getValue('golsvi'), $tv->getLink(), date("d/m/Y H:i", strtotime($db->getValue('datahora'))), $dw[date("w", strtotime($db->getValue('datahora')))]);
    echo '<tr class="dettab">' . $linha . '</tr>' . "\n";
}
$db->Close();
?>
</fieldset>
 </table>
 	</td></tr>
开发者ID:alencarmo,项目名称:OCF,代码行数:30,代码来源:rodadaatual.php

示例2: clascopa

function clascopa($usr)
{
    $sql = sprintf("select grupo, posicao,time,t.nome\n\t\t\t\t\t\t from cad_palpite_grupo g,\n\t\t\t\t\t\t\t  cad_times t\n\t\t\t\t\t\t where userid = %d\n\t\t\t\t\t\t\t   and g.time = t.codigo\n\t\t\t\t\t\t order by grupo,posicao", $usr);
    $rs = mysql_query($sql) or die('\\nErro consultando classificação: ' . mysql_error());
    if (mysql_num_rows($rs) == 0) {
        return;
    }
    echo '<tr><td colspan=2> <table frame=box bordercolor="white" border="1px" cellspacing="0" style="width:640px;">' . "\n";
    echo '<tr  class="cabec"><td align=center>Grupo</td><td align=center>1º Classificado</td><td align=center>2º Classificado</td></tr>';
    while ($rc = mysql_fetch_assoc($rs)) {
        $tm = new Time($rc['time']);
        if ($rc['posicao'] == 1) {
            echo '<tr class="dettab"><td align=center>' . $rc['grupo'] . '</td><td align=center>' . $tm->getLink() . '</td>';
        } else {
            echo '<td align=center>' . $tm->getLink() . '</td></tr>';
        }
    }
    echo '</table></td></tr>';
}
开发者ID:alencarmo,项目名称:OCF,代码行数:19,代码来源:lst_detalhe.php

示例3: listajogos

function listajogos($camp, $rod)
{
    $maiorjg = 0;
    $bloq = " ";
    $dw = array("Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab");
    echo "<tr>" . "\n";
    include 'conectadb.php';
    $sql = sprintf("select grupo,count(*) qtde from cad_grupo\n\t\t\t\t\t\twhere campeonato = %d\n\t\t\t\t\t\t\tgroup by grupo" . " order by grupo", $camp);
    $rs1 = mysql_query($sql) or die('\\nErro consultando banco de dados: ' . mysql_error());
    $qtgrp = mysql_num_rows($rs1);
    $sql = sprintf("select r.jogo,p.pmanda,p.pvisita,r.manda cmanda,r.visita cvisita,tm.nome mandante,tv.nome visitante,r.data,r.hora,r.grupo,subtime(addtime(r.data,r.hora),'00:15:00') limite\n\t\t\t\t\t\tfrom\n\t\t\t\t\t\tcad_rodada r,\n\t\t\t\t\t\tcad_times tm,\n\t\t\t\t\t\tcad_times tv\n\t\t\t\t\t\tleft join\n\t\t\t\t\t\tcad_palpite p\n\t\t\t\t\t\ton\n\t\t\t\t\t\tr.campeonato = p.campeonato\n\t\t\t\t\t\tand r.rodada = p.rodada\n\t\t\t\t\t\tand r.jogo = p.jogo\n\t\t\t\t\t\tand p.userid = %d\n\t\t\t\t\t\twhere\n\t\t\t\t\t\tr.campeonato = %d\n\t\t\t\t\t\tand r.rodada = %d\n\t\t\t\t\t\tand r.manda = tm.codigo\n\t\t\t\t\t\tand r.visita = tv.codigo", $_SESSION['userid'], $camp, $rod);
    $rs1 = mysql_query($sql) or die('\\nErro consultando banco de dados: ' . mysql_error());
    $grpant = " ";
    while ($row = mysql_fetch_assoc($rs1)) {
        if ($qtgrp > 1 && $grpant != $row['grupo']) {
            echo '<tr><td><br></td></tr>';
            echo '<tr><td colspan=2 style="font-weight:bold;">Grupo ' . $row['grupo'] . '</tr></td>' . "\n";
            echo '<tr><td colspan=3><b>1º Classificado</td><td colspan=3><b>2º Classificado</td></tr>';
            echo '<tr>' . "\n";
            selclas($camp, $row['grupo'], 1);
            selclas($camp, $row['grupo'], 2);
            $grpant = $row['grupo'];
            echo '</tr>' . "\n";
        }
        if (strtotime('NOW') + 3600 > strtotime($row['limite'])) {
            $bloq = "disabled";
        } else {
            $bloq = " ";
        }
        $tm = new Time($row['cmanda']);
        $tv = new Time($row['cvisita']);
        echo '<tr id=menuadm><td align="center" style="font-weight:bold;">' . $row['jogo'] . '</td>' . "\n";
        // Numero do Jogo
        echo '<td align="right">' . "\n";
        echo $tm->getLink();
        //             echo ("</td>")."\n";
        $golsma = sprintf('     <input type="text" style="width:20px;" width="20px" maxlength="2" name="M%02d" value="%s" %s>', $row['jogo'], $row['pmanda'], $bloq);
        //             echo ("<td>");
        echo $golsma;
        // input dos gols do mandante
        echo "</td>";
        echo "<td align='center'>X</td>" . "\n";
        $golsvi = sprintf('     <input type="text" style="width:20px;" width="20px" maxlength="2" name="V%02d" value="%s" %s>', $row['jogo'], $row['pvisita'], $bloq);
        echo "<td align='left'>";
        echo $golsvi;
        // input dos gols do visitante
        //             echo ("</td>");
        //             echo ("<td align='left'>")."\n";
        echo $tv->getLink();
        echo "</td>" . "\n";
        $dataj = sprintf('%s %s <i>%s</i>', date("d/m/Y", strtotime($row['data'])), date("H:i", strtotime($row['hora'])), $dw[date("w", strtotime($row['data']))]);
        echo "<td>";
        echo $dataj . "\n";
        echo "</td>";
        if ($row['jogo'] > $maiorjg) {
            $maiorjg = $row['jogo'];
        }
    }
    //     echo ('<tr> <td colspan=10><br>* Os resultados não informados serão considerados zero</td></tr>')."\n";
    echo '<tr> <td colspan=10>';
    include "traco.php";
    echo '</td></tr>' . "\n";
    echo '	 <tr> <td colspan="2"> <div style="float:left;"> <input tabindex="3" name="gravar" value="Gravar" type="submit"> ' . "\n";
    echo '<input type=hidden name="jogos"  value="' . $maiorjg . '">' . "\n";
    //     mysql_free_result($result);
    //     mysql_free_result($rs1);
    mysql_close($link);
}
开发者ID:alencarmo,项目名称:OCF,代码行数:68,代码来源:frm_cadpalpite.php


注:本文中的Time::getLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。