コード例 #1
0
function insertClientData($arrClientData)
{
    foreach ($arrClientData as $field_rank_client => $value_rank_client) {
        unset($_POST[$field_rank_client]);
        $_POST[$field_rank_client] = $value_rank_client;
    }
    //End foreach
    $_POST['rcl_status'] = 1;
    $_POST['rcl_resisted'] = 1;
    unset($_POST[rcl_id]);
    print DataJasInsertString('rank_client') . "<br /><br />";
    $intClientId = DataJasInsert('rank_client');
    //seo-rankingのユーザー名とパスワードの登録(update)
    //ユーザー名
    $prefix = "";
    if ($_POST[rcl_agencyflag] == "0") {
        $prefix = "A";
    }
    if ($_POST[rcl_agencyflag] == "1") {
        $prefix = "E";
    }
    if ($_POST[rcl_agencyflag] == "2") {
        $prefix = "A";
    }
    $username = $prefix . "-" . substr(DateNow(0), 2, 2) . substr(0, 5, 2) . "-" . substr("00000" . $intClientId, -5);
    //パスワード
    $pass = randPass(6);
    require 'cin/SQLConnect_jas.php';
    #	  	require('cin/SQLConnect.php');
    $sql = "UPDATE `rank_client` SET `rcl_username` = '" . $username . "', `rcl_password` = '" . $pass . "' WHERE (`rcl_id` = '" . $intClientId . "');";
    #15-02-13変更
    print $sql . "<BR><BR>";
    $c_hit = mysql_db_query($dbName, $sql) or die('UPDATE error: ' . mysql_errno() . ', ' . mysql_error());
    mysql_close($GLOBALS[dbHandle]);
    require 'cin/SQLClose.php';
    return $intClientId;
}
コード例 #2
0
    $_POST['rcm_tel'] = $_POST['mobile'];
}
//End if
//メールアドレス
if ($_POST['email']) {
    $_POST['rcm_mail'] = $_POST['email'];
}
#$_POST['rcm_contactid'] = $this->id;
require 'cin/defalut.php';
if ($_POST[record] == false || $rsCountRcm === 0) {
    #$_POST[record]がないときは	INSERT
    $sqlRcl = " SELECT * FROM rank_client ";
    $sqlRcl .= " WHERE TRUE ";
    $sqlRcl .= " AND rcl_accountid = {$_POST[account_id]} ";
    #print $sqlRcl . "<br />";
    $rsRcl = mysql_db_query($dbName, $sqlRcl);
    $rowRcl = mysql_fetch_array($rsRcl);
    unset($_POST[rcm_id]);
    $_POST['rcm_client_id'] = $rowRcl['rcl_id'];
    $_POST['rcm_make_datetime'] = date('Y-m-d H:i:s');
    #データ作成日付
    #print DataJasInsertString('rank_charger_mas') . "<br />";
    #exit;
    DataJasInsert('rank_charger_mas');
} else {
    $_POST[rcm_id] = $rowRcm[rcm_id];
    #print "update : " . DataJasUpdateString('rank_charger_mas') . "<br />";
    #exit;
    DataJasUpdate('rank_charger_mas');
}
//End if
コード例 #3
0
function registDomain($intRkwid = 0)
{
    if ($intRkwid == 0) {
        return;
    }
    require 'cin/SQLConnect_jas.php';
    $sqlRkw = " SELECT rkw_id, rkw_word, rkw_domid, rkw_url, rkw_rclid FROM rank_keyword ";
    $sqlRkw .= " WHERE TRUE ";
    $sqlRkw .= " AND rkw_domid = 0 ";
    $sqlRkw .= " AND rkw_id = {$intRkwid} ";
    $sqlRkw .= " AND rkw_url != '' ";
    print $sqlRkw . "<br />";
    $rsRkw = mysql_db_query($dbName, $sqlRkw);
    $rsRkwCount = mysql_num_rows($rsRkw);
    $rowRkw = mysql_fetch_array($rsRkw);
    if ($rowRkw[rkw_word] == true && (int) $rowRkw[rkw_domid] === 0) {
        #ドメインIDが保存されてないとき
        $strDomainName = getUrlDomain3($rowRkw[rkw_url]);
        $sqlDom = " SELECT * FROM domain_mgt ";
        $sqlDom .= " WHERE TRUE ";
        $sqlDom .= " AND dom_domain = '{$strDomainName}'";
        $rsDom = mysql_db_query($dbName, $sqlDom);
        $rsCountDom = mysql_num_rows($rsDom);
        print $sqlDom . "<br />";
        if ($rsCountDom === 0) {
            #ドメインが保存されていない場合
            $_POST[dom_rclid] = $rowRkw[rkw_rclid];
            $_POST[dom_registdate] = date('Y-m-d');
            $_POST[dom_domain] = $strDomainName;
            print DataJasInsertString(domain_mgt) . "<br />";
            $_POST[rkw_domid] = DataJasInsert(domain_mgt);
        } else {
            #既にドメインが保存されているとき
            $rowDom = mysql_fetch_array($rsDom);
            $_POST[rkw_domid] = $rowDom['dom_id'];
        }
        //End if
        $sqlUpDate = " UPDATE rank_keyword SET rkw_domid = {$_POST[rkw_domid]} ";
        $sqlUpDate .= " WHERE TRUE ";
        $sqlUpDate .= " AND rkw_id = {$intRkwid} ";
        print $sqlUpDate . "<br />";
        mysql_db_query($dbName, $sqlUpDate);
    }
    //End if
    require 'cin/SQLClose.php';
}
コード例 #4
0
#住所
$_POST['rcl_tel'] = $_POST['phone'];
#電話番号
$_POST['rcl_cover_mail'] = $_POST['email1'];
#メールアドレス
#	$_POST['rcl_charger_id'] = '';	#営業担当者ID
$_POST['rcl_status'] = '1';
#稼働:1 非稼働:0
$_POST['rcl_resisted'] = '1';
#登録済かどうか これでseo-rankingのIDとPASSの判断する?
$_POST['rcl_accountid'] = $this->id;
require 'cin/defalut.php';
if ($_POST[record] == false) {
    #$_POST[record]がないときINSERTする
    #	print DataJasInsertString('rank_client') . "<br />";
    $_POST[rcl_id] = DataJasInsert('rank_client');
    require 'cin/SQLConnect_jas.php';
    $sql = " SELECT * FROM `rank_client` ";
    $sql .= " WHERE TRUE ";
    $sql .= " AND rcl_id = {$_POST[rcl_id]} ";
    #print $sql . "<br />";
    $rs = mysql_db_query($dbName, $sql);
    $row = mysql_fetch_array($rs);
    //既にseo-rankingのユーザーID、パスがある場合登録しない
    #		if(!(($row[rcl_username]) && ($row[rcl_password]))) {  #15-02-13変更
    //クライアントIDの発行
    //====================================================================
    $prefix = "";
    if ($_POST[rcl_agencyflag] == "0") {
        $prefix = "A";
    }
コード例 #5
0
function insertChargerMasData($arrChargerMasData)
{
    foreach ($arrChargerMasData as $field_rank_charger_mas => $value_rank_charger_mas) {
        unset($_POST[$field_rank_charger_mas]);
        $_POST[$field_rank_charger_mas] = $value_rank_charger_mas;
    }
    //End foreach
    $_POST['rcm_make_datetime'] = date('Y-m-d H:i:s');
    unset($_POST[rcm_id]);
    print DataJasInsertString('rank_charger_mas') . "<br /><br />";
    $intChargerMasId = DataJasInsert('rank_charger_mas');
    return $intChargerMasId;
}