( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<style type="text/css">
.TFtableCol{
width:100%;
border-collapse:collapse;
}
.TFtableCol td, th{
padding:7px; border:#dfdfdf 1px solid; font-size: 11px;
}
/* improve visual readability for IE8 and below */
.TFtableCol tr{
background: #fff;
}
/* Define the background color for all the ODD table columns */
.TFtableCol tr td:nth-child(odd){
background: #fff;
}
/* Define the background color for all the EVEN table columns */
.TFtableCol tr td:nth-child(even){
background: #fff;
}
</style>
<?php
if($catid==1){$define="indexAlone.php?mode=mydata&pager=0&msg_id=$msg_id&catid=0&view=$view&where=photo";}
if($catid==0){
$campaign = $_GET["campaign"];
$view = $_GET["view"];
$newsid = $db->base64url_decode($view);
$synced = $db->checkIfNew($newsid);
if($synced == 0)
{
$showCampaign = $db->showCampaign($newsid);
$catalogid = $showCampaign[0]["catalogid"];
$final_image = $showCampaign[0]["hashtag"];
$newsid = $showCampaign[0]["newsid"];
$url="$siteaddress2/v/importExcel.php?File=$final_image&nani=$catalogid&thefile=$final_image&newsid=$newsid";
// Initialize a CURL session.
$ch = curl_init();
// Return Page contents.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//grab URL and pass it to the variable.
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
$resultdata = json_decode($data);
if (json_last_error() === JSON_ERROR_NONE) {
// JSON is valid
$db -> updateData($data,$newsid);
}
else
{?><?php
header("Location: indexAlone.php?mode=mydata&campaign=campaigns&msg=Malformed+Data+Kindly+review+and+try+again");
}
}
}
$showCampaign = $db->showCampaign($newsid);
$data = $showCampaign[0]["text"];
$title = $showCampaign[0]["title"];
$themeid = $showCampaign[0]["themeid"];
$colme = $showCampaign[0]["mytheme"];
$array = json_decode($data,true);
if(empty($campaign) && (!empty($result) || empty($result)))
{?>
<script>
$(document).ready(function(){
$("#update").keyup(function(){
var A=$.trim($(this).val());
if(A.length<=140)
{
$("#check").html("<b class='badge bg-warning'>"+A.length+"</b>");
}
else
{
$("#check").html("140!");
}
});
});
</script> <input id="themeMe" name="themeMe" class="form-control" value="<?php $msg_idX = $db->base64url_decode($msg_id); echo $msg_idX;?>" type="hidden">
<section class="hbox stretch">
<section id="content">
<section >
<aside class="bg-light lter">
<section >
<section>
<ul class="list-group no-radius m-b-none m-t-n-xxs list-group-alt list-group-sm">
<?php include("mydataconvojs.php"); ?>
<div id="containerReportaF" >
<div id="loadingReportaM"></div>
<div class="dataReportaM" ></div>
<div class="paginationReportaM" ></div>
</div>
<div style= " <?php if ($catid ==1){?>display:none;<?php } ?> ">
<br>
<br>
<header class="bg-light dker header clearfix paginationReportaM">
<div class="btn-group pull-right">
</div>
<h4 class="m-t m-b">Bind Data to Design "<strong><?php echo $title ?></strong>" </h4>
</header>
<form id="form2" method="post">
<input id="newsid" name="newsid" class="form-control" value="<?php echo $newsid; ?>" type="hidden"><input id="catalogid" name="catalogid" class="form-control" value="<?php echo $catalogidX;?>" type="hidden">
<?php
$rowX = getEachJSONLayer($themeid,1);
$urlX = $rowX['layers'];
/* exit();*/
$charactersX = json_decode($urlX,true);
$html = '<table class="TFtableCol" style="width:100%">';
/*print_r( $array);*/
// header row
$html .= '<tr>';
foreach($array[0] as $key=>$value){
$html .= '<th>' . strtoupper(htmlspecialchars( str_replace("","","$key"))) . '</th>';
}
$html .= '</tr>';
$html .= '<tr>';
foreach($array[0] as $key=>$value){
$html .= '<td>';
$html .= '<select style="font-size:12px" name="'. $key.'" class="form-control input-lg m-b" id="'. $key.'">';
$html .= '<option style="font-size:12px">None</option>';
foreach ($charactersX as $rowX) {
$html .= '<option style="font-size:12px">Layer'. $rowX['zIndex']. '</option>';
}
$html .= '</select>';
$html .= '</td>';
}
$html .= '</tr>';
// finish table and return it
$html .= '</table>';
echo $html;
?>
<div id="d"></div>
<div id="preview" style="display: none"></div>
<div id="err"></div>
<div class="form-group" style="margin-top:10px;">
<span class="btn btn-warning" id="submitme">Bind Data</span></div>
</form>
</div>
<script>
$("#submitme").click(function() {
var myvars = $('#form2').serialize();
var page = "";
loading_show();
$.ajax
({
type: "GET",
url: "<?php echo $siteaddress2; ?>/v/uploadParameters.php?bindData=yes&c=<?php echo $colme;?>&"+myvars,
data:myvars,
success: function(msg)
{
$("#check").ajaxComplete(function(event, request, settings)
{
$("#check").html(msg);
loading_hide();
window.location = "<?php echo $siteaddress2; ?>/indexAlone.php?mode=mydata&pager=0&msg_id=<?php echo $msg_id ?>&catid=1&view=<?php echo $view ?>&where=photo";
});
}
});
});
<?php /*?>
$("#form2").on('submit',(function(e) {
e.preventDefault();
var myvars = $('#form2').serialize();alert(myvars);
$.ajax({
type : 'POST',
url : "<?php echo $siteaddress2; ?>/v/uploadParameters.php?bindData=yes&c=<?php echo $colme;?>&"+myvars,
data : $('#form').serialize() + ""
}
}));
<?php */?>
</script>
<?php include("sidebarTabs.php"); ?>
</ul>
</section>
</section>
</aside>
</section> </section> </section>
<?php } ?>