本文整理汇总了PHP中Info::getProvinceByName方法的典型用法代码示例。如果您正苦于以下问题:PHP Info::getProvinceByName方法的具体用法?PHP Info::getProvinceByName怎么用?PHP Info::getProvinceByName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Info
的用法示例。
在下文中一共展示了Info::getProvinceByName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
public static function save($param, $table, $month, $province_id, $record_id)
{
foreach ($param as $key => $value) {
$param[$key] = addslashes($value);
}
$param[] = $record_id;
$columns['base'] = self::$base;
$columns['custom'] = self::$custom;
$columns['complaints'] = self::$complaints;
$columns['income'] = self::$income;
$columns['value_income'] = self::$value_income;
$columns['black_list'] = self::$black_list;
$columns['complaint_province'] = self::$complaint_province;
$columns['complaint_class'] = self::$complaint_class;
// unset($param[0]);
// var_dump(count(explode(',', $columns[$table])),count($param));exit;
$bussLine = array('联通在信' => 1, '彩信' => 2);
$db = self::__instance();
if ($table == 'complaint_province') {
$param[0] = Info::getProvinceByName($param[0]);
$param[2] = strtotime($param[2] . '01');
if (strtotime($month . '-01') != $param[2]) {
return false;
}
}
if ($table == 'complaint_class') {
$param[2] = strtotime($param[2] . '01');
if (strtotime($month . '-01') != $param[2]) {
return false;
}
}
if ($table == 'base') {
$param[0] = Info::getProvinceByName($param[0]);
// $param[6] = ExcelReader::xlsTime($param[6]);
$param[25] = strtotime($param[25] . '01');
if (strtotime($month . '-01') != $param[25]) {
return false;
}
if ($province_id != $param[0]) {
return false;
}
$tmp = array($param[3], $param[0], $param[6], $param[25], $param[5], '', 1, '一年');
$num = $db->count('co_base', array('complaint_phone' => $param[3]));
if ($num > 0) {
$db->delete('co_black_list', array('complaint_phone' => $param[3]));
$tmp = array($param[3], $param[0], $param[6], $param[25], $param[5], '', 2, '五年');
}
$sql = 'insert into co_black_list (' . $columns['black_list'] . ') values ("' . implode('","', $tmp) . '")';
if ($param[3]) {
$r = $db->query($sql);
}
}
if ($table == 'custom') {
$param[29] = strtotime($param[29] . '01');
if (strtotime($month . '-01') != $param[29]) {
return false;
}
$param[22] = Info::getProvinceByName($param[22]);
// if($province_id != $param[22])
// return true;
$param[25] = ExcelReader::xlsTime($param[25]);
//$param[6] = ExcelReader::xlsTime($param[6]);
$param[6] = strtotime($param[6]);
$param[7] = $bussLine[$param[7]];
$tmp = array($param[16], $param[22], $param[6], $param[29], $param[2], '', 1, '一年');
$num = $db->count('co_custom', array('complaint_phone' => $param[16]));
if ($num > 0) {
$db->delete('co_black_list', array('complaint_phone' => $param[16]));
$tmp = array($param[16], $param[22], $param[6], $param[29], $param[2], '', 2, '五年');
}
$sql = 'insert into co_black_list (' . $columns['black_list'] . ') values ("' . implode('","', $tmp) . '")';
if ($param[16]) {
$db->query($sql);
}
// var_dump(Info::getProvinceByName($param[22]));exit;
}
if ($table == 'complaints') {
// $param[17] = ExcelReader::xlsTime($param[17]);
// $param[18] = ExcelReader::xlsTime($param[18]);
// $param[19] = ExcelReader::xlsTime($param[19]);
$param[7] = Info::getProvinceByName($param[7]);
// if($province_id != $param[7])
// return true;
$param[47] = strtotime($param[47] . '01');
if (strtotime($month . '-01') != $param[47]) {
return false;
}
$tmp = array($param[4], $param[7], $param[42], $param[47], $param[41], '', 3, '永久屏蔽');
$sql = 'insert into co_black_list (' . $columns['black_list'] . ') values ("' . implode('","', $tmp) . '")';
$db->query($sql);
}
if ($table == 'income') {
$param[0] = Info::getProvinceByName($param[0]);
// if($province_id != $param[0])
// return true;
$param[13] = strtotime($param[13] . '01');
if (strtotime($month . '-01') != $param[13]) {
return false;
}
}
//.........这里部分代码省略.........