Hi,
I am using Yii2 basic. I have a offering CRUD. In the view page on my localhost the details are correctly displayed as I coded. But on the domain I have hosted the application as subdomain. Here when I view the page, the details are not displayed correctly. I am using Admin LTE. There were warnings for font awesome. " Failed to decode downloaded font: http://website.com/fonts/glyphicons-halflings-regular.woff2". When I inspect in the chrome browser, I have a warning as follows:
DevTools failed to parse SourceMap: http://website.com/css/bootstrap.min.css.map
The code of view page is as below:
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
use app\models\Offering;
use app\models\Church;
use app\models\District;
use app\models\Taluka;
use app\models\Village;
use app\models\Location;
use app\models\Area;
use app\models\Offeringdetails;
/* @var $this yii\web\View */
/* @var $model app\models\Offering */
$this->title = $model->OfferingId;
$this->params['breadcrumbs'][] = ['label' => 'Offerings', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<head>
<style>
.table
{
width: 500px;
border: 2px solid black;
}
</style>
<script type = "text/javascript" >
function preventBack(){window.history.forward();}
setTimeout("preventBack()", 0);
window.onunload=function(){null};
</script>
</head>
<div class="offering-view">
<?=Html::a('<span class="glyphicon glyphicon-list"></span> List', ['index'], ['class' => 'btn btn-primary']);?>
<br>
<?php
$church = Yii::$app->db->createCommand('SELECT church.ChurchName
from church, offering
WHERE church.ChurchId = offering.ChurchId
and offering.ChurchId='.$model->ChurchId)->queryAll();
foreach($church as $church1)
{
$churchname = $church1['ChurchName'];
}
$district = Yii::$app->db->createCommand('SELECT district.District
from district, church
WHERE district.DistrictId = church.DistrictId
and church.ChurchId='.$model->ChurchId)->queryAll();
foreach($district as $district1)
{
$dis=$district1['District'];
}
$taluka = Yii::$app->db->createCommand('SELECT taluka.Taluka
from taluka, church
WHERE taluka.TalukaId = church.TalukaId
and church.ChurchId='.$model->ChurchId)->queryAll();
foreach($taluka as $taluka1)
{
$tal=$taluka1['Taluka'];
}
$records = Yii::$app->db->createCommand('SELECT church.VillageId, church.LocationId, church.AreaId
from church
where church.ChurchId='.$model->ChurchId)->queryAll();
foreach($records as $record)
{
$vid = $record['VillageId'];
$lid= $record['LocationId'];
$aid= $record['AreaId'];
}
if($vid!=null)
{
$village = Yii::$app->db->createCommand('SELECT village.Village
from village, church
WHERE village.VillageId = church.VillageId
and church.ChurchId='.$model->ChurchId)->queryAll();
foreach($village as $village1)
{
$vil=$village1['Village'];
}
$date = Offering::findOne($model->OfferingId);
echo "<b><h3><center>Offering Details - ".$date->Date."</center></h3></b>";
echo "<b><h4><center>".$churchname."</center></h4></b>";
echo "<b><h4><center> District - ".$dis.", Taluka - ".$tal.", Village - ".$vil."</center></h4></b>";
}
if($lid&&$aid!=null)
{
$location = Yii::$app->db->createCommand('SELECT location.Location, area.Area
from location, church, area
WHERE location.LocationId = church.LocationId and
area.AreaId = church.AreaId
and church.ChurchId='.$model->ChurchId)->queryAll();
foreach($location as $location1)
{
$loc=$location1['Location'];
$area=$location1['Area'];
}
$date = Offering::findOne($model->OfferingId);
echo "<b><h3><center>Offering Details -".$date->Date."</center></h3></b>";
echo "<b><h4><center>".$churchname."</center></h4></b>";
echo "<b><h4><center> District - ".$dis.", Taluka - ".$tal.", Location - ".$loc." , Area - ".$area."</center></h4></b>";
}
?>
<hr style="color: blue;
background-color: blue;
height: 5px;">
<center>
<div class="table-responsive">
<div class="container">
<table class="table table-bordered">
<thead>
<tr bgcolor='#B8B8B8'>
<th style='border: 1px solid black;'>Sr.No</th>
<th style='border: 1px solid black;'>Offering Type</th>
<th style='border: 1px solid black;'>Amount</th>
</tr>
</thead>
<tbody>
<?php
$countno=1;
$offering = Offering::findOne($model->OfferingId);
$offering1= $offering->offeringdetails;
foreach($offering1 as $offering2)
{
echo "<tr>";
echo "<td style='border: 1px solid black;'><b>".$countno."</b></td>";
echo "<td style='border: 1px solid black;'><b>".$offering2['OfferingType']."</b></td>";
echo "<td style='border: 1px solid black;'><b>".$offering2['Amount']."</b></td>";
echo "</tr>";
$countno++;
}
?>
</tbody>
</table>
</div>
</div>
</center>
</div>
How should I resolve this?