Files
Testing/include/analytics/ask_dr_bate_up_after_ins.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

53 lines
4.8 KiB
PHP

<?php if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
include(PATHTOINCLUDES."base.php");
$em="";
$sql="SELECT
`ask_dr_bate`.`aid`,
`ask_dr_bate`.`thecontent`,
`ask_dr_bate`.`thetype`,
`ask_dr_bate`.`thelink`,
`ask_dr_bate`.`theimg`,
`ask_dr_bate`.`isactive`,
`ask_dr_bate`.`thedate`
FROM
`ask_dr_bate`
ORDER BY `ask_dr_bate`.`aid` DESC";
$query=$database->database_query($sql) or $em .= $database->database_error();
echo $em;
?>
<fieldset>
<legend style="color:#000;">Ask Dr. Bate - Update - Edit the text directly.</legend>
<?php $rownum=0;$imgnum=0;
while ($row = $database->database_fetch_assoc($query)) {
$rownum=$rownum+1;
$imgnum=$imgnum+1;
if($rownum % 2 != 0){$rc="odd";} else{$rc="even";}
?>
<?php if($rc=="odd") { ?>
<div id="adb_imsg_<?php echo $row["aid"];?>" style="display:none;"><span style="padding:0 10px 0 0px;color:green;">Article successfully updated. I think.</span></div>
<div class="bg-gray adb-item" style="width:100%;background:#333;width:210px;" id="ask_cw_<?php echo $row["aid"]; ?>">
<div class="adb-yellow adb-content" style="color:#ffcd1d;font-size:80%;line-height:120%;text-align:left;padding:2px;">
<a href="javascript:get_page('http://bateworld.com/ask_dr_bate.php?user=AskDrBate&blogentry_id=1642')"><img src="/include/analytics/images/dr_bate/dr_bate_<?php echo $imgnum;?>.jpg" style="float:left;margin-right:5px;width:36px;height:36px;border:none;" alt="Ask Dr. Bate"></a><a href="javascript:get_page('http://bateworld.com/ask_dr_bate.php?user=AskDrBate&blogentry_id=1642')" style="color:#ffcd1d;text-decoration:none;" id="thecontent_<?php echo $row["aid"];?>" contenteditable="true"><?php echo stripslashes($row["thecontent"]); ?></a>
<div class="adb-blog-type adb-green" style="text-align:right;font-size:85%;color:#88d293;padding-right:5px;" id="thetype_<?php echo $row["aid"]; ?>" contenteditable="true"><?php echo stripslashes($row["thetype"]); ?></div>
</div>
</div>
<div><label for="thelink" style="color:#000;display:block;">Link (required) use ask_dr_bate.php</label><input type="text" name="thelink_<?php echo $row["aid"]; ?>" id="thelink_<?php echo $row["aid"]; ?>" value="<?php echo $row["thelink"];?>" maxlength="90" required pattern="\S" style="width:100%;" /></div>
<div style="position:relative;text-align:right;"><input type="checkbox" name="active_<?php echo $row["aid"];?>" id="active_<?php echo $row["aid"];?>" <?php if($row["isactive"]=="Y"){echo 'checked="checked"';}?> onchange="ask_dr_bate_active('<?php echo $row["aid"]; ?>')" /><a onclick="preview_article('<?php echo $row["aid"];?>')" style="position:absolute;left:0px;top:4px;color:green;cursor:pointer;cursor:hand;">View Article</a><button onclick="ask_dr_bate_update('<?php echo $row["aid"];?>')">Update</button></div>
<hr />
<?php } else { ?>
<div id="adb_imsg_<?php echo $row["aid"];?>" style="display:none;"><span style="padding:0 10px 0 0px;color:green;">Article successfully updated. I think.</span></div>
<div class="bg-black adb-item" style="width:100%;background:#000;width:210px;" id="ask_cw_<?php echo $row["aid"]; ?>">
<div class="adb-green adb-content" style="padding:2px;color:#88d293;font-size:80%;line-height:120%;text-align:left;">
<a href="javascript:get_page('http://bateworld.com/ask_dr_bate.php?user=AskDrBate&blogentry_id=1624')"><img src="/include/analytics/images/dr_bate/dr_bate_2.jpg" style="float:left;margin-right:5px;width:36px;height:36px;border:none;" alt="Ask Dr. Bate"></a><a href="javascript:get_page('http://bateworld.com/ask_dr_bate.php?user=AskDrBate&blogentry_id=1624')" style="color:#88d293;text-decoration:none;" id="thecontent_<?php echo $row["aid"];?>" contenteditable="true"><?php echo stripslashes($row["thecontent"]); ?></a>
<div class="adb-blog-type adb-yellow" style="text-align:right;font-size:85%;color:#ffcd1d;padding-right:5px;" id="thetype_<?php echo $row["aid"]; ?>" contenteditable="true"><?php echo stripslashes($row["thetype"]); ?></div>
</div>
</div>
<div><label for="thelink" style="color:#000;display:block;">Link (required) use ask_dr_bate.php</label><input type="text" name="thelink_<?php echo $row["aid"]; ?>" id="thelink_<?php echo $row["aid"]; ?>" value="<?php echo $row["thelink"];?>" maxlength="90" required pattern="\S" style="width:100%;" /></div>
<div style="position:relative;text-align:right;"><input type="checkbox" name="active_<?php echo $row["aid"];?>" id="active_<?php echo $row["aid"];?>" <?php if($row["isactive"]=="Y"){echo 'checked="checked"';} ?> onchange="ask_dr_bate_active('<?php echo $row["aid"]; ?>')" />
<a onclick="preview_article('<?php echo $row["aid"];?>')" style="position:absolute;left:0px;top:4px;color:green;cursor:pointer;cursor:hand;">View Article</a>
<button onclick="ask_dr_bate_update('<?php echo $row["aid"];?>')">Update</button></div>
<hr />
<?php }?>
<?php }?>
</fieldset>