コード例 #1
0
ファイル: helper.php プロジェクト: batman1292/linhainan
function print_person_phone_string($id)
{
    $hadData = false;
    $newline = false;
    $telmoreone = false;
    $mobilemoreone = false;
    $homeDatas = get_person_contact($id, 1);
    while ($homeData = mysql_fetch_assoc($homeDatas)) {
        $newline = true;
        $hadData = true;
        if ($telmoreone) {
            echo ",";
        }
        echo $homeData['CONTACT_ARER_CODE'] . $homeData['CONTACT_STRING'];
        $telmoreone = true;
    }
    if ($newline) {
        echo "<br/>";
    }
    $phoneDatas = get_person_contact($id, 2);
    while ($phoneData = mysql_fetch_assoc($phoneDatas)) {
        $hadData = true;
        if ($mobilemoreone) {
            echo ",";
        }
        echo $phoneData['CONTACT_ARER_CODE'] . $phoneData['CONTACT_STRING'];
        $mobilemoreone = true;
    }
    if (!$hadData) {
        echo "-";
    }
}
コード例 #2
0
//}
$emails = get_person_contact($organization_id, 8);
$email = mysql_fetch_assoc($emails);
if ($email) {
    if ($_POST["organization_mail"] != $email["CONTACT_STRING"]) {
        del_contact($email['ID']);
        if (!empty($_POST["organization_mail"])) {
            add_contact($organization_id, $_POST["organization_mail"], '', 8);
        }
    }
} else {
    if (!empty($_POST["organization_mail"])) {
        add_contact($organization_id, $_POST["organization_mail"], '', 8);
    }
}
$webs = get_person_contact($organization_id, 7);
$web = mysql_fetch_assoc($webs);
if ($web) {
    if ($_POST["organization_web"] != $web["CONTACT_STRING"]) {
        del_contact($web['ID']);
        if (!empty($_POST["organization_web"])) {
            add_contact($organization_id, $_POST["organization_web"], '', 7);
        }
    }
} else {
    if (!empty($_POST["organization_web"])) {
        add_contact($organization_id, $_POST["organization_web"], '', 7);
    }
}
set_updatetime($id);
header('Location:../view/detail_organization.php?id=' . $id);
コード例 #3
0
ファイル: edit_form.php プロジェクト: batman1292/linhainan
        $emails = get_person_contact($organization_id, 7);
        $email = mysql_fetch_assoc($emails);
        if ($email) {
            echo $email['CONTACT_STRING'];
        } else {
            echo '-';
        }
        ?>
                                                    </h6>
                                                </div>
                                            </div>
                                        </div>
                                        <!--email-->
                                        <div class="col-sm-6">
                                            <?php 
        $mobileTels = get_person_contact($organization_id, 8);
        $count_temp = 1;
        while ($mobileTel = mysql_fetch_assoc($mobileTels)) {
            //                            print_r($homeTel);
            ?>
                                                <div class="row">
                                                    <div class="col-sm-6">
                                                        <h5>E-mailที่ทำงาน<?php 
            echo $count_temp;
            ?>
</h5>
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <h6><?php 
            echo $mobileTel['CONTACT_STRING'];
            ?>
コード例 #4
0
ファイル: report.php プロジェクト: batman1292/linhainan
         }
     } else {
         $org_phone_string = '';
     }
     $organization_webs = get_person_contact($organization_id['ORGANIZATION_ID'], 7);
     $org_web = mysql_fetch_assoc($organization_webs);
     if ($org_web) {
         $organization_webs = get_person_contact($organization_id['ORGANIZATION_ID'], 7);
         $org_web = mysql_fetch_assoc($organization_webs);
     } else {
         $org_web = array("CONTACT_STRING" => '');
     }
     $organization_mails = get_person_contact($organization_id['ORGANIZATION_ID'], 8);
     $org_mail = mysql_fetch_assoc($organization_mails);
     if ($org_mail) {
         $organization_mails = get_person_contact($organization_id['ORGANIZATION_ID'], 8);
         $org_mail = mysql_fetch_assoc($organization_mails);
     } else {
         $org_mail = array("CONTACT_STRING" => '');
     }
 } else {
     $org_type = 0;
     $org_comment = '';
     $org_name = '';
     $org_role = '';
     $org_addr = give_addr();
     $org_phone_string = '';
     $org_fax_string = '';
     $org_web = array("CONTACT_STRING" => '');
     $org_mail = array("CONTACT_STRING" => '');
 }
コード例 #5
0
                                <?php 
$fbs = get_person_contact($id, 5);
$fb = mysql_fetch_assoc($fbs);
if ($fb) {
    echo $fb['CONTACT_STRING'];
} else {
    echo '-';
}
?>
                            </div>
                            <div class="col-sm-1">
                                <h5>Line</h5>
                            </div>
                            <div class="col-sm-3" style="margin-top: 10px">
                                <?php 
$lines = get_person_contact($id, 4);
$line = mysql_fetch_assoc($lines);
if ($line) {
    echo $line['CONTACT_STRING'];
} else {
    echo '-';
}
?>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4 col-sm-offset-8" style="margin-top: 10px">
                                <a class="mdi-action-pageview"onClick="javascript:window.location.assign('edit_contact_detail.php?id=<?php 
echo $id;
?>
')">แก้ไขข้อมูลการติดต่อ</a>
コード例 #6
0
ファイル: db_connect.php プロジェクト: batman1292/linhainan
function del_old_contact($id, $type)
{
    $contacts = get_person_contact($id, $type);
    while ($contact = mysql_fetch_assoc($contacts)) {
        del_contact($contact['ID']);
    }
}