Exemplo n.º 1
0
    }
}
?>
						<table class="table table-striped table-bordered bootstrap-datatable datatable">
						  <thead>
							  <tr>
								  
								  <th>Interest Name</th>
								  <th>Show In App</th>
								  <th>Actions</th>
							  </tr>
						   </thead>   
						   <tbody>
						   
						  <?php 
$rv = aGetAllTags();
if (count($rv) > 0) {
    if (is_array($rv)) {
        foreach ($rv as $rv1) {
            echo "<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>" . $rv1['tag'] . "</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td>";
            if ($rv1['showInApp'] == 1) {
                echo "<span class='label-success label label-default'>Yes</span>";
            } else {
                echo "<span class='label-warning label label-default'>No</span>";
            }
            echo "</td>\r\n\t\t\t\t\t\t\t\t\t\t\t<td class='center'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a class='btn btn-default' href='#' onclick='return confirm(\"Are you sure you want to delete the selected name? The action is not revesible\")'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<i class='icon-trash icon-white'></i> \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tView\r\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t  </tr>";
        }
    }
}
?>
						  </tbody>
Exemplo n.º 2
0
<?php

include_once "../lib/sm-connection.php";
include_once "../lib/sm-constant.php";
include_once "../lib/intfunctions.php";
$tag = $_POST['Tag'];
$showInApp = $_POST['showInApp'];
$chk = aGetAllTags();
if (is_array($chk)) {
    foreach ($chk as $chk1) {
        $p1 = $chk1['tag'];
        if ($p1 == $tag) {
            //echo "Record already exists";
            header("location: ../interestAdd.php?in=1");
            exit;
        }
    }
}
if ($tag != '') {
    $pu = iInsertTags($tag, $showInApp, '', '');
    if (is_numeric($pu)) {
        header("location: ../interestAdd.php?in=2");
        //echo "Record Inserted";
    } else {
        header("location: ../interestAdd.php?in=3");
        //echo "There was an error";
    }
}