Пример #1
0
    $smarty->assign('dgjx', $dgjx);
    $smarty->assign('nwaige1', $nwaige1);
    $sql = "select * from `81` where num=?";
    $db->query($sql, array($nwaigee1));
    $rs = $db->fetchArray();
    $wgjx = $rs['jx'];
    $wgf2 = getpf($wgjx);
    $smarty->assign('wgjx', $wgjx);
    $smarty->assign('nzhongge1', $nzhongge1);
    $sql = "select * from `81` where num=?";
    $db->query($sql, array($nzhonggee1));
    $rs = $db->fetchArray();
    $zgjx = $rs['jx'];
    $zgf2 = getpf($zgjx);
    $smarty->assign('zgjx', $zgjx);
    $sancai1 = getsancai($ntiangee1) . getsancai($nrengee1) . getsancai($ndigee1);
    $sqlsancai = "select * from sancai where title=?";
    $db->query($sqlsancai, array($sancai1));
    if ($rssancai = $db->fetchArray()) {
        $xg1 = $rssancai['xg'];
    }
    $smarty->assign('xg1', $xg1);
    $n1 = abs($rgf1 - $rgf2);
    $n2 = abs($dgf1 - $dgf2);
    $n3 = abs($zgf1 - $zgf2);
    $n4 = abs($tgf1 - $tgf2);
    $n5 = abs($wgf1 - $wgf2);
    $zf = $n1 + $n2 + $n3 + ($n4 + $n5) / 5;
    $zf = round(100 - $zf);
    $smarty->assign('zf', $zf);
}
Пример #2
0
Файл: xm.php Проект: cwcw/cms
$dgxx = $rs["content"];
$sql = "select * from `81` where num=?";
$result = $db->query($sql, array($zhonggee));
$rs = $db->fetchArray($result);
$zgyy = $rs["yy"];
$zgjx = $rs["jx"];
$zgas = $rs["as"];
$zgxx = $rs["content"];
$sql = "select * from `81` where num=?";
$result = $db->query($sql, array($waigee));
$rs = $db->fetchArray($result);
$wgyy = $rs["yy"];
$wgjx = $rs["jx"];
$wgas = $rs["as"];
$wgxx = $rs["content"];
$sancai = getsancai($tiange) . getsancai($renge) . getsancai($dige);
//'三才吉凶
$sql = "select * from sancai where title=?";
$result = $db->query($sql, array($sancai));
if ($rs = $db->fetchArray($result)) {
    $sancaicontent = $rs['content'];
    $scyy = $rs['yy'];
    $scjx = $rs['jx'];
    $jcy = $rs['jcy'];
    $jcyjx = $rs['jx1'];
    $cgy = $rs['cgy'];
    $cgyjx = $rs['jx2'];
    $rjgx = $rs['rjgx'];
    $rjgxjx = $rs['jx3'];
    $xg = $rs['xg'];
}
Пример #3
0
 (<?php 
echo is_array($_tmp = $this->_tpl_vars['dige']) ? $this->_run_mod_handler('getsancai', true, $_tmp) : getsancai($_tmp);
?>
)</p></td>
      <td width="25%"  class="new2" align="center" bgcolor="#FFFFFF">外格-&gt; <?php 
echo $this->_tpl_vars['waige'];
?>
 (<?php 
echo is_array($_tmp = $this->_tpl_vars['waige']) ? $this->_run_mod_handler('getsancai', true, $_tmp) : getsancai($_tmp);
?>
)<br />
      <p> </p>        <p>总格-&gt; <?php 
echo $this->_tpl_vars['zhongge'];
?>
 (<?php 
echo is_array($_tmp = $this->_tpl_vars['zhongge']) ? $this->_run_mod_handler('getsancai', true, $_tmp) : getsancai($_tmp);
?>
)</p></td>
    </tr>
  </tbody>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0" class="b1" style="table-layout:fixed;word-wrap:break-word;">
    <TBODY>
      <tr>
        <TD class=ttd><p><font color="#0000FF">天格<?php 
echo $this->_tpl_vars['tiangee'];
?>
的解析:</font><font color="#ff0000">天格数是先祖留传下来的,其数理对人影响不大。</font>
</TD>
      </tr>
<tr>
        <TD class=ttd>