function initial() { global $status, $debug, $log, $function_name, $argv; // first parse the pmc.ini $ini = parse_ini_file("pmc.ini"); // Set variable $status = $ini["Status"]; $debug = $ini["Debug"]; $log = $ini["Log"]; // Debug_mode service_debug(); // checking... service_status(); // log... service_log(); // parse URL into Params parse_param(); // include module include_module(); // call module function if ($function_name != NULL) { if ($debug == 1) { echo "use function " . $function_name . ".<br>"; } if ($argv == NULL) { $function_name(); } else { $function_name($argv); } } }
function UP($name = null, $param = array()) { $a = array(); $ab = strpos($name, '?'); if ($ab !== false) { $a = explode('/', substr($name, 0, $ab)); } else { $a = explode('/', $name); } $data = array('pn' => $a[0], 'pm' => $a[1]); $data = array_merge($data, $param); //查找参数字符串 preg_match('/\\w+\\/\\w+\\?(.*)/', $name, $out); if (!empty($out[1])) { $data = array_merge($data, parse_param($out[1])); } //C('URL_MODEL',0); C('URL_MODEL', 0); $uri = U('Addons/plugin', $data); C('URL_MODEL', 1); // return U('Addons/plugin', $data); return $uri; }
<table border="0" align="center" width="620"> <tr> <td align="center"> <td> </tr> </table> <?php echo "<center><table class='list' cellpadding='3' cellspacing='0' width='620'>\n"; echo "<tr>"; echo "<td class='list'><b>" . _('Time') . "</b></td>\n"; echo "<td class='list'><b>MAC</b></td>\n"; echo "<td class='list'><b>" . _('Stb action') . "</b></td>\n"; echo "<td class='list'><b>" . _('Parameter') . "</b></td>\n"; echo "</tr>\n"; foreach ($user_log as $arr) { echo "<tr>"; echo "<td class='list' nowrap>" . $arr['time'] . "</td>\n"; echo "<td class='list' nowrap>" . $arr['mac'] . "</td>\n"; echo "<td class='list'>" . $arr['action'] . "</td>\n"; echo "<td class='list'>" . parse_param($arr['action'], $arr['param']) . "</td>\n"; echo "</tr>\n"; } echo "</table>\n"; echo "<table width='600' align='center' border=0>\n"; echo "<tr>\n"; echo "<td width='100%' align='center'>\n"; echo page_bar(); echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</center>\n";
* @copyright Copyright (C) 2014 Fiyo CMS. * @license GNU/GPL, see LICENSE.txt * @description **/ defined('_FINDEX_') or die('Access Denied'); $id = app_param('id'); $contact = new Contact() or die; //$contact -> send(@$_POST['name'],@$_POST['email'],@$_POST['text'],@$_POST['send'],@$_POST['to']); $param = menuInfo('parameter'); $email = parse_param('office_email', $param); $ph1 = parse_param('office_phone1', $param); $ph2 = parse_param('office_phone2', $param); $addr = parse_param('office_address', $param); $text = parse_param('office_text', $param); $fax = parse_param('office_fax', $param); $map = parse_param('office_map', $param); ?> <script> function reloadCaptcha() { document.getElementById('captcha').src = document.getElementById('captcha').src+ '?' +new Date(); } $(function() { $('.send_contact').click(function() { var name = $("#contact-name").val(); var email = $("#contact-email").val(); var text = $("#contact-text").val(); var phone = $("#contact-phone").val(); var subject = $("#contact-subject").val(); var url = $("#contact-url").val();
function get_last_param($mac){ global $db; global $last_action; //$sql = "select * from user_log where mac='$mac' and action<>'play_now()' and action<>'create_link()' and action<>'create_link' order by time desc"; $sql = "select * from user_log where mac='$mac' and action<>'create_link()' and action<>'create_link' order by time desc"; $rs=$db->executeQuery($sql); $param = @$rs->getValueByName(0, 'param'); return parse_param($last_action,$param); }