<?php require_once ('../php/connect.php'); ?>
<?php require ("php/secure.php");?>
<?php
// Get ID
function Random2($length=20,$type=1){
$key = '';
switch($type){
case 2:
$pattern = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
break;
case 3:
$pattern = "12345678901234567890123456789012345678901234567890";
break;
default:
$pattern = "1234567890abcdefghijklmnopqrstuvwxyz";
break;
}
for($i=0;$i<$length;$i++){
$key .= $pattern{rand(0,35)};
}
return $key;
}
$generatevid = strtoupper(Random2(20,5));
// Edit Affiliate
if (isset($_GET['id'])) {
$colname_GetID = $_GET['id'];
}
$query_Edit = "SELECT * FROM Affiliates WHERE id = '$colname_GetID'";
$Edit = mysqli_query($SMB, $query_Edit);
$row_Edit = mysqli_fetch_assoc($Edit);
$totalRows_Edit = mysqli_num_rows($Edit);
// All Affiliates
$query_Affiliates = "SELECT * FROM Affiliates ORDER BY sort ASC";
$Affiliates = mysqli_query($SMB, $query_Affiliates);
$totalRows_Affiliates = mysqli_num_rows($Affiliates);
if($totalRows_Affiliates > 0){
while($row_Affiliates = mysqli_fetch_assoc($Affiliates)){
$Affiliates_ID = $row_Affiliates['id'];
$Affiliates_Title = $row_Affiliates['title'];
$Affiliates_Sort = $row_Affiliates['sort'];
$Affiliates_Output .= '<tr>
<td width="73%" height="45"><a href="edit-affiliates.php?id='.$Affiliates_ID.'">'.$Affiliates_Title.'</a></td>
<td width="15%" height="45" align="center">'.$Affiliates_Sort.'</td>
<td width="12%" align="right"><a href="php/delete.php?affiliates='.$Affiliates_ID.'"><img src="../images/delete.png" alt="" width="25"/></a></td>
</tr>';
}
}
else {
$Affiliates_Output .= '<tr><td height="45" colspan="3" align="center">No Affiliates Added. </td>
</tr>';
}
// Images
$query_Media = "SELECT * FROM School_Media WHERE type='image' ORDER BY id DESC";
$Media = mysqli_query($SMB, $query_Media);
$totalRows_Media = mysqli_num_rows($Media);
if($totalRows_Media > 0){
while($row_Media = mysqli_fetch_assoc($Media)){
$Media_ID = $row_Media['id'];
$Media_media = $row_Media['video'];
$Media_ModuleImg = $row_Media['ModuleImg'];
$Media_Output .='<tr align="left" valign="middle">
<td><img src="https://www.successfulmedicalbilling.com/admin/school/img/'.$Media_media.'" width="100" alt=""/></td>
<td>https://www.successfulmedicalbilling.com/admin/school/img/'.$Media_media.'</td>
</tr>';
}
}
else {
$Media_Output .='<tr align="left" valign="middle">
<td colspan="6">No Images Added</td>
</tr>';
}
?>
<!doctype html>
<html><!-- InstanceBegin template="/Templates/cpanel.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Successful Medical Billing Cpanel</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<!-- InstanceEndEditable -->
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="../js/datepicker.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="https://cdn.tiny.cloud/1/znxig3ypa8s92l5po9mh8sjo9qm1tkx67rkavrg3r1kc3xx0/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
<script>
tinymce.init({
selector: 'textarea',
content_css : "../admin/css/style.css",
plugins: 'advlist autolink lists link image charmap print preview anchor searchreplace visualblocks code fullscreen insertdatetime media table paste imagetools wordcount',
toolbar_mode: 'floating',
image_advtab: true,
convert_urls:false,
});
</script>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css">
<style type="text/css">
.style11 {font-family: Arial, Helvetica, sans-serif; color: #000066; }
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="100" bgcolor="#FFFFFF"><table width="75%" align="center" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td width="76%"><span class="cpanel_hdr"><a href="dashboard.php"><img src="../images/SMB_logo2.png" alt="" width="150" height="150" align="absmiddle"/></a></span></td>
<td width="24%" align="right" valign="middle" class="cpanel_hdr"><span class="cpanel_hdrRed">C</span><span class="cpanel_hdrBlue">panel</span></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td height="100"><table width="75%" align="center" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td> </td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#EBEBEB"><table width="100%" cellspacing="4" cellpadding="4">
<tbody>
<tr>
<td width="25%" align="left" valign="top" bgcolor="#939191"><table width="100%" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td height="40" align="center" valign="middle" bgcolor="#EE2E24" class="nav_hdr">Main Menu</td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="search.php">Search Cpanel</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="dashboard.php">Dashboard</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="registered.php">Manage Registration</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="books.php">Manage Book</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-support.php">Manage Support</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="transaction-new.php">Process Transaction</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="content.php">Content</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-banners.php">Product Image Banners</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="SMB-courses.php">SMB Courses</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="sironia-summits.php">Sirona Summits</a> </div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="other-events.php"> Speaking Events</a> </div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-calendar.php">Manage Calendar</a> </div></td>
</tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-portal.php">Manage Portal</a> </div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="host-a-course.php">Host A Course</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="affiliates.php">Manage Affiliates</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="popup-manager.php">Manage Pop-Ups</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="promo.php">Universal Promo Codes</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="promo-reports.php">Promo Reports</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-emails.php">Email Lists</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-prospects.php">Manage Prospect List</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-mailers.php">Manage Customer List</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="admin.php">Manage Admin</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="manage-media.php">Manage Media</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="company.php">Company Info</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="seo.php">SEO</a></div></td>
</tr>
<tr>
<td align="left" valign="middle" nowrap="nowrap"><div class="nav"><a href="school/dashboard.php">SMBDU Cpanel</a></div></td>
</tr>
<tr>
<td align="left" valign="middle"> </td>
</tr>
</table></td>
<td width="75%" align="center" valign="top"><!-- InstanceBeginEditable name="Content" -->
<table width="95%" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td class="pageHdr">Edit Affiliate: <?php echo $row_Edit['title']; ?></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><div class="container">
<ul class="tabs">
<li class="tab-link current" data-tab="tab-1">Edit Affilate</li>
<li class="tab-link" data-tab="tab-2">Edit Logo</li>
<li class="tab-link" data-tab="tab-3">All Affliates</li>
</ul>
<div id="tab-1" class="tab-content current">
<table width="100%" cellspacing="2" cellpadding="2">
<tr>
<td class="pageHdr">Manage Affiliates</td>
</tr>
<tr>
<td><form action="../php/edit.php" method="post" name="form1" id="form10">
<table width="100%" cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td align="left" valign="top" nowrap="nowrap"><strong>Title:</strong></td>
<td align="left" valign="top"><input name="title" type="text" id="title" value="<?php echo $row_Edit['title']; ?>"></td>
</tr>
<tr>
<td align="left" valign="top" nowrap><strong>Content:</strong></td>
<td align="left" valign="top"><textarea name="content" cols="40" rows="5" class="content" id="content"><?php echo $row_Edit['content']; ?></textarea></td>
</tr>
<tr>
<td align="left" valign="top" nowrap="nowrap"><strong>Show On:</strong></td>
<td nowrap="nowrap"><input name="SMB" type="checkbox" id="SMB" value="1" <?php if($row_Edit['SMB'] =='1') echo ' checked="checked"'; ?> >
<strong>SMB</strong> <br>
<input name="SMBDU" type="checkbox" id="SMBDU" value="1" <?php if($row_Edit['SMBDU'] =='1') echo ' checked="checked"'; ?>>
<strong>SMBDU
<label for="checkbox"></label>
</strong></td>
</tr>
<tr>
<td align="left" valign="top" nowrap="nowrap"><strong>Contact Form:</strong></td>
<td nowrap="nowrap"><input name="contactForm" type="radio" id="status" value="1" <?php if($row_Edit['contactForm'] =='1') echo ' checked="checked"'; ?>>
<label for="dentist_book2">Active<br>
<input name="contactForm" type="radio" id="status" value="0" <?php if($row_Edit['contactForm'] =='0') echo ' checked="checked"'; ?>>
Inactive</label></td>
</tr>
<tr>
<td align="left" valign="top" nowrap="nowrap"><strong>Email Address: </strong></td>
<td nowrap="nowrap"><input name="email_address" type="text" id="email_address" placeholder="3" value="<?php echo $row_Edit['email_address']; ?>"></td>
</tr>
<tr>
<td align="left" valign="top" nowrap="nowrap"><strong>Sort:</strong></td>
<td nowrap="nowrap"><input name="sort" type="text" id="sort" placeholder="3" value="<?php echo $row_Edit['sort']; ?>"></td>
</tr>
<tr>
<td width="100%" colspan="2" nowrap="nowrap"><input name="submit" type="submit" class="content_submit" id="submit11" value="Save Changes"></td>
</tr>
<tr>
<td colspan="2" nowrap="nowrap"><input name="Affiliates" type="hidden" id="Affiliates" value="Edit">
<input name="id" type="hidden" id="id" value="<?php echo $row_Edit['id']; ?>"></td>
</tr>
</tbody>
</table>
</form></td>
</tr>
<tbody>
</tbody>
</table>
</div>
<div id="tab-2" class="tab-content">
<form action="../php/edit.php" method="post" enctype="multipart/form-data" name="form2" id="form2">
<table width="100%">
<tbody>
<tr>
<td height="45" colspan="2" align="left" valign="middle"><h4><strong>Manage Affiliate Logo</strong></h4></td>
</tr>
<tr>
<td width="50%" rowspan="2" align="left" valign="top"><img src="https://www.successfulmedicalbilling.com/admin/school/img/<?php echo $row_Edit['logo']; ?>" alt="" width="250"/></td>
<td width="50%" align="left" valign="top"><label for="logo"><strong>Upload Logo: </strong></label><input type="file" name="logo" id="logo"></td>
</tr>
<tr>
<td align="left" valign="top"><p>
<input name="submit" type="submit" class="content_submit" id="submit" value="Upload Logo">
</p>
<p>
<input name="id" type="hidden" id="id" value="<?php echo $row_Edit['id']; ?>">
<input name="Affiliate_Logo" type="hidden" id="Affiliate_Logo" value="Edit">
<input name="vid" type="hidden" id="vid" value="<?php echo $generatevid; ?>">
</p></td>
</tr>
</tbody>
</table>
</form>
</div>
<div id="tab-3" class="tab-content">
<table width="100%">
<tbody>
<tr>
<td height="25"><strong>Manage Affiliates</strong></td>
<td align="center"><strong>Sort</strong></td>
<td align="right"> </td>
</tr>
<?php echo $Affiliates_Output; ?>
</tbody>
</table>
</div>
</div></td>
</tr>
</tbody>
</table>
<!-- InstanceEndEditable --></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<script>
$(document).ready(function(){
$('ul.tabs li').click(function(){
var tab_id = $(this).attr('data-tab');
$('ul.tabs li').removeClass('current');
$('.tab-content').removeClass('current');
$(this).addClass('current');
$("#"+tab_id).addClass('current');
})
})
</script>
</body>
<!-- InstanceEnd --></html> |