Beispiel #1
0
function parseContenDetail($url, $data, &$x)
{
    global $logger, $filename, $conf;
    $content = getContent($url);
    if ($content != "") {
        $row_data = array();
        foreach ($data as $key => $value) {
            $row_data[] = StringHelper::handleStrNewline(parseTag($value, $content));
        }
        $row_data[] = $url;
        if (trim($row_data[0]) || trim($row_data[1]) || trim($row_data[2])) {
            File_CSV::write($filename, $row_data, $conf);
            echo "{$x} [Ok].\n";
            $logger->log("Get {$url} content.[Ok]");
        } else {
            echo "{$x} [Fail].\n";
            $logger->log("Get {$url} content.[Fail]");
        }
        $x++;
    }
}
 function getCallIco($phone_num, $mobile_phone = false)
 {
     global $ClassDir, $WebTemplateDir;
     include_once $ClassDir . "URLHelper.class.php";
     include_once $ClassDir . "StringHelper.class.php";
     $phone_num = StringHelper::handleStrNewline($phone_num);
     $icon = $mobile_phone ? "<A HREF='###' ONCLICK=\"remoteCellPhoneSMS.callMobilePhone('{$phone_num}');\" ><IMG SRC='" . URLHelper::getWebBaseURL() . $WebTemplateDir . "images/cellphone.gif' /></A><A HREF='###' ONCLICK=\"remoteCellPhoneSMS.sendSMS('{$phone_num}');\" ><IMG SRC='" . URLHelper::getWebBaseURL() . $WebTemplateDir . "images/sms.png' /></A><DIV ID=\"{$phone_num}mobile\" style=\"z-index:10; position:absolute;color:#FFFFFF;\" /><DIV ID=\"{$phone_num}sms\" style=\"z-index:10; position:absolute;color:#FFFFFF;\" />" : "<A HREF='###' ONCLICK=\"remoteCellPhoneSMS.callPhone('{$phone_num}');\" ><IMG SRC='" . URLHelper::getWebBaseURL() . $WebTemplateDir . "images/call.png' /></A><DIV ID=\"{$phone_num}phone\" style=\"z-index:10; position:absolute;\" />";
     if (trim($phone_num) && SHOW_SMS) {
         return $icon;
     }
     return;
 }