Exemplo n.º 1
0
function makeotherday()
{
    makegoogle();
    makebaidu();
    makerss();
    makeindex();
    makemap();
    echo "一键生成当天数据完毕!";
}
Exemplo n.º 2
0
 } else {
     $duration += $t;
     $b++;
     $goahead = $b < $_REQUEST['reps'];
     //count number of battles
     $acount = array_sum($att[$t]['force']);
     $dcount = array_sum($def[$t]['force']);
     //have stats for each sides outcome
     if (isset($ipcdiff[$diff])) {
         $ipcdiff[$diff]++;
     } else {
         $ipcdiff[$diff] = 1;
     }
     #debug ($diff.' IPC Gain for attacker');
     $aindex = makeindex($att[$t]['force']);
     $dindex = makeindex($def[$t]['force']);
     if ($dcount == 0 && $acount == 0) {
         $results['draw']++;
     } else {
         if ($acount > 0) {
             //attacker had surviving units
             if (isset($results['att'][$aindex])) {
                 $results['att'][$aindex]['total']++;
             } else {
                 $results['att'][$aindex] = array('stats' => $astats, 'total' => 1, 'force' => $att[$t]['force'], 'lost' => whatdied($att[$t]['force'], $forces['att']));
             }
         }
         if ($dcount > 0) {
             //defender had surviving units
             if (isset($results['def'][$dindex])) {
                 $results['def'][$dindex]['total']++;