= 0 ? 'http://dev-mcc.planetart.com' : SiteSettings::getDomain(SITE_MCC);$htmlOverview = file_get_contents($domain.'/planetart_dashboard.php?overview_from_email_tablename=overview'); //请求页面返回html$htmlOP = file_get_contents($domain.'/planetart_dashboard.php?overview_from_email_tablename=op'); $startStr = '" ; $startdivindex="stripos($htmlOP," $startstr); 查找""开始位置$htmlOP = substr($htmlOP, $startDivIndex, $endDivIndex + strlen($endStr) - $startDivIndex); //截取整个div//OP is the first , overview is the second$html = stristr($htmlOverview, $startStr, TRUE) . $htmlOP . '' . stristr($htmlOverview, $startStr);$html = str_ireplace('
div[id!="tab1"]\').hide(); $(\'.tabs:eq(0)>ul>li:lt(5)\').hide(); $(\'.tabs:eq(1)>ul>li:gt(0)\').hide(); $(\'span[id*="refresh"]\').parent().remove(); $(\'form[id="form_overview"]:eq(0)>br:eq(0)\').remove();', $html);$html = str_ireplace('$("tr[name=\'department\'] span:contains(\'Order Processing\')").parent().find(\'a:gt(0)\').click();', '$(\'.data_table:eq(0) tr[name="department"]:eq(0) a:eq(2)\').click(); $(\'.data_table:eq(1) tr[name="department"]:eq(0) a:eq(0)\').click(); ', $html);$html = str_ireplace('planetart_dashboard_listorders.php', 'http://www.mycustomcase.com/planetart_dashboard_listorders.php', $html);//for debug use query string '?debug=t'if('t' == getIfSet($_GET, 'debug', '')){ echo $html; exit;}else{ $mail = new MailService(); $from_name = 'dashboard'; $from = SiteSettings::$NOREPLY_EMAIL[0]; $to = array('erik@planetart.com','jim.xue@avanquest.cn','Tyler@avanquest.cn'); $subject = 'dashboard email'; $text = ''; $site_id = 0; $ret_email = $mail->sendMail($from_name, $from, $to, $subject,stripslashes($text), $site_id, array(), true, '', array());}?>
转载地址:http://pqexx.baihongyu.com/