0

I have to deferent domain one "knu.edu.af" two "mis.knu.edu.af". Both registered in one host but the "mis.knu.edu.af" its data is located in another server and I pointed the domain to server via an IP address. Up to this level all things work correctly.

The issue is this: I have a page for QR-code in files of "knu.edu.af", this has the codes to read the data from "mis.knu.edu.af".

For every one I have a specific QR-code, when I scan this QR-code it redirect me to "knu.edu.af" then it read that page for QR-code codes, and then for reading the main data it has a code to connect this QR-code to "mis.knu.edu.af", in this level the things is not working.

Could please guide me what should I do? I'm going to share the QR-code image and the codes with you.

This the image of QR-code

Bellow is the code for reading the data:QR

<?php

$code = $_GET['code'];
$json = file_get_contents('https://mis.knu.edu.af/studentDetails/get/'.$code);
$info=json_decode($json);

?>

پوهنتون خاتم النبیین (ص) @font-face { font-family: 'nazanin'; font-style: normal; src: url('https://knu.edu.af/fonts/bnazanb.ttf') format('truetype'); } * { direction: rtl; font-family: 'nazanin'; } .borderless td, .borderless th { border: none !important; } .form-signin { max-width: 330px; padding: 15px; margin: 0 auto; } .account-wall { margin-top: 20px; padding: 40px 0px 20px 0px; background-color: #f7f7f7; -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3); -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3); box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3); } .login-title { color: #555; font-size: 18px; font-weight: 400; display: block; } .profile-img { width: 126px; margin: 0 auto 10px; display: block; -moz-border-radius: 50%; -webkit-border-radius: 50%; border-radius: 50%; } if($info): if($info->type == "student"){ ?> پوهنتون خاتم النبیین (ص)

                    <? if (@getimagesize("http://mis.knu.edu.af".$info->data->photo_url)): ?>
                        <img class="profile-img" src="http://mis.knu.edu.af<?= $info->data->photo_url ?>" alt="<?= isset($info->data->name) ? $info->data->name : null ?> <?= isset($info->data->last_name) ? $info->data->last_name : null ?>">
                    <? else: ?>
                        <img class="profile-img" src="http://mis.knu.edu.af/images/avatar-placeholder.png" alt="">
                    <? endif; ?>
                <div class="row">
                    <div class="col-md-12">
                        <table class="table borderless">
                            <tr>
                                <td style="text-align:left; width:50%">کد دانشجویی</td>
                                <td style="text-align:right"><?= isset($info->data->code) ? $info->data->code : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">نام و تخلص</td>
                                <td style="text-align:right"><?= isset($info->data->name) ? $info->data->name : null ?> <?= isset($info->data->last_name) ? $info->data->last_name : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">نام پدر</td>
                                <td style="text-align:right"><?= isset($info->data->father_name) ? $info->data->father_name : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">نام پدرکلان</td>
                                <td style="text-align:right"><?= isset($info->data->grandfather_name) ? $info->data->grandfather_name : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">رشته</td>
                                <td style="text-align:right"><?= isset($info->data->department) ? $info->data->department : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">مجموع کریدتها</td>
                                <td style="text-align:right"><?= isset($info->data->totalCredits) ? $info->data->totalCredits : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">کریدتهای پاس شده</td>
                                <td style="text-align:right"><?= isset($info->data->passedCreadits) ? $info->data->passedCreadits : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">کریدتهای ناکام </td>
                                <td style="text-align:right"><?= isset($info->data->failedCredits) ? $info->data->failedCredits : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">فیصدی عمومی</td>
                                <td style="text-align:right"><?= isset($info->data->finalAverage) ? $info->data->finalAverage : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">وضعیت</td>
                                <td style="text-align:right"><?= isset($info->data->status) ? $info->data->status : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">سال شمولیت</td>
                                <td style="text-align:right"><?= isset($info->data->year) ? $info->data->year : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">سال فراغت</td>
                                <td style="text-align:right"><?= isset($info->data->graduation_year) ? $info->data->graduation_year : null ?></td>
                            </tr>
                            
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

</script>
<?php } ?>


<?php

if($info->type == "teacher"){ ?> پوهنتون خاتم النبیین (ص)

                    <? if (@getimagesize("http://mis.knu.edu.af".$info->data->photo_url)): ?>
                        <img class="profile-img" src="http://mis.knu.edu.af<?= $info->data->photo_url ?>" alt="<?= isset($info->data->name) ? $info->data->name : null ?> <?= isset($info->data->last_name) ? $info->data->last_name : null ?>">
                    <? else: ?>
                        <img class="profile-img" src="http://mis.knu.edu.af/images/avatar-placeholder.png" alt="">
                    <? endif; ?>
                <div class="row">
                    <div class="col-md-12">
                        <table class="table borderless">
                            <tr>
                                <td style="text-align:left; width:50%">کد</td>
                                <td style="text-align:right"><?= isset($info->data->code) ? $info->data->code : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">نام و تخلص</td>
                                <td style="text-align:right"><?= isset($info->data->name) ? $info->data->name : null ?> <?= isset($info->data->last_name) ? $info->data->last_name : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">نام پدر</td>
                                <td style="text-align:right"><?= isset($info->data->father_name) ? $info->data->father_name : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">نام پدرکلان</td>
                                <td style="text-align:right"><?= isset($info->data->grandfather_name) ? $info->data->grandfather_name : null ?></td>
                            </tr>
                            <tr>
                                <td style="text-align:left">سمت اداری</td>
                                <td style="text-align:right">استاد</td>
                            </tr>
                            <tr>
                                <td style="text-align:left">وضعیت</td>
                                <td style="text-align:right">{{($info->data->active == 1) ? "فعال" : "غیرفعال" }}</td>
                            </tr>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

</script>
<?php } ?>



<?php

if($info->type == "employee"){ echo "E"; ?> پوهنتون خاتم النبیین (ص) data->photo_url)): ?> data->photo_url ?>" alt="data->name) ? $info->data->name : null ?> data->last_name) ? $info->data->last_name : null ?>"> کد data->code) ? $info->data->code : null ?> نام و تخلص data->name) ? $info->data->name : null ?> data->last_name) ? $info->data->last_name : null ?> نام پدر data->father_name) ? $info->data->father_name : null ?> نام پدرکلان data->grandfather_name) ? $info->data->grandfather_name : null ?> سمت اداری data->job_title) ? $info->data->job_title : null ?> وضعیت {{ ($info->data->active == 1) ? "فعال" : "غیرفعال" }}

            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

</script>
<?php } ?>
این سرویس به علت بروزرسانی در دسترس نمی باشد

0

You must log in to answer this question.

Browse other questions tagged .