$R = $dbcon->Execute("SELECT * FROM {$table} WHERE blast_ID = {$R__MMColParam}") or die($dbcon->ErrorMsg()); $List = $dbcon->Execute("SELECT id, name FROM blast_lists") or die($dbcon->ErrorMsg()); $T = $dbcon->Execute("SELECT id, name FROM blast_templates") or die($dbcon->ErrorMsg()); $rec_id =& new Input('hidden', 'MM_recordId', $_GET['id']); $blast_type = new Input('hidden', 'blast_type', 'Email'); $sendformat = new Input('hidden', 'sendformat', 'HTML and Text'); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit ' . $listtitle, 'banner'); if (!$R->Fields("status")) { $stat = "New"; } else { $stat = $R->Fields("status"); } $blast_status =& new Input('hidden', 'status', $stat); $html .= $buildform->add_row('status', $stat . $blast_status->fetch()); $html .= addfield('subject', 'Subject', 'text', $R->Fields("subject")); $html .= addfield('from_email', 'From Email', 'text', $R->Fields("from_email")); $html .= addfield('from_name', 'From Name', 'text', $R->Fields("from_name")); $html .= addfield('reply_to_address', 'Reply To Address', 'text', $R->Fields("reply_to_address")); $WYSIWYG =& AMPFormElement_HTMLEditor::instance(); $WYSIWYG->addEditor('message_email_html'); $html .= addfield('message_email_html', 'HTML Email Message', 'textarea', $R->Fields("message_email_html")); $html .= addfield('message_email_text', 'Text Email Message', 'textarea', $R->Fields("message_email_text")); #$html .= addfield('embargo','Embargoed Till','text',$R->Fields("embargo")); $list_options = makelistarray($List, 'id', 'name', 'Select List'); $lists =& new Select('list_ID', $list_options, $R->Fields("list_ID")); $html .= $buildform->add_row('Send to List', $lists); $t_options = makelistarray($T, 'id', 'name', 'Select Template'); $temp =& new Select('message_template_ID', $t_options, $R->Fields("message_template_ID")); $html .= $buildform->add_row('HTML Email Template', $temp);
echo helpme("Image"); ?> Image (to appear on front page and in first paragraph of article)</td> </tr> <?php $filelist = AMPfile_list('img/thumb/'); //$img_options = makelistarray($G,'id','galleryname','Select Gallery'); $galattr = 'onChange="art_showThumb(\'img/thumb/\'+this.value);"'; $Gal =& new Select('picture', $filelist, $r->Fields("picture"), false, 10, null, null, $galattr); $th_style = $r->Fields("picture") ? null : " style='display:none' "; $th_img = '<P><img align="center" width=100 src="http://' . $_SERVER['SERVER_NAME'] . '/img/thumb/' . $r->Fields("picture") . '" id="active_thumb"' . $th_style . '>'; echo $buildform->add_row('Image Filename' . $th_img, $Gal); ?> <script type="text/javascript"> function art_showThumb(imgname) { th_img = document.getElementById('active_thumb'); th_img.src='http://'+window.location.host+"/"+imgname; th_img.style.display="block"; } </script> <tr class="text"> <td valign="top"><div align="right"></div></td> <td><p> <a href="imgdir.php" target="_blank">View Images</a> | <a href="#" onclick="change2('upload');" >Upload Image</a></td> </tr><tr><td colspan="2"><div id="upload" style="display:none;"><table width="100%" border="0" align="center"> <?php echo addfield('file', 'Upload New Image <br>(jpg/gif/png files only)', 'file', '', 'Select image'); ?>
$MM_insert = $_REQUEST['MM_insert']; $MM_editTable = "gallery"; $MM_fieldsStr = "section|value|new_file_name|value|caption|value|photoby|value|date|value|byemail|value|publish|value|galleryid|value"; $MM_columnsStr = "section|',none,''|img|',none,''|caption|',none,''|photoby|',none,''|date|',none,''|byemail|',none,''|publish|',none,''|galleryid|',none,''"; require "../Connections/insetstuff.php"; require "../Connections/dataactions.php"; ob_end_flush(); } $G = $dbcon->Execute("SELECT id, galleryname FROM gallerytype") or die($dbcon->ErrorMsg()); $html = $buildform->start_table('name'); $html .= $buildform->add_header('Photo Gallery Settings'); $html .= addfield('add', 'Add to Gallery', 'checkbox'); $html .= addfield('publish', 'Publish', 'checkbox'); $gal_options = makelistarray($G, 'id', 'galleryname', 'Select Gallery'); $Gal =& new Select('galleryid', $gal_options); $html .= $buildform->add_row('Photo Gallery', $Gal); $html .= addfield('caption', 'Caption', 'textarea'); $Type =& new Select('section', $obj->select_type_tree2(0)); $html .= $buildform->add_row('Section', $Type); $html .= addfield('photoby', 'Photo By', 'text'); $html .= addfield('date', 'Date', 'text'); $html .= $buildform->end_table(); echo "<h2>Image Upload</h2> "; if (isset($result_message)) { echo '<br>' . $result_message . '<br><br><br>'; } ?> <p><strong><!--Upload .JPG Image Files Only (<a href="imgother_upload.php">click here</a> for other formats, --> <a href="crop_step1.php" target="_blank">Click here</a> to upload a .JPG you want to crop) </strong></p> <form method="POST" action="<?php echo $MM_editAction;
</tr> </table> </div> <div id="picture" style="display: none;"> <table width="100%" border="0"> <tr class="intitle"> <td colspan="2"><?php echo helpme("images"); ?>Images</td> </tr> <?php $filelist = AMPfile_list('img/thumb'); $galattr= 'onChange="art_showThumb(\'img/thumb/\'+this.value);"'; $Gal = & new Select('image2',$filelist,$subtype->Fields("image2"),false,10,null,null,$galattr); $th_style = $subtype->Fields("image2")?null:" style='display:none' "; $th_img= '<P><img align="center" width=100 src="http://'.$_SERVER['SERVER_NAME'].'/img/thumb/'.$subtype->Fields("image2").'" id="active_thumb"'.$th_style.'>'; echo $buildform->add_row('Section Image (for lists)'.$th_img, $Gal); ?> <script type="text/javascript"> function art_showThumb(imgname) { th_img = document.getElementById('active_thumb'); th_img.src='http://'+window.location.host+"/"+imgname; th_img.style.display="block"; } </script> <tr class="text"> <td valign="top"><div align="right"></div></td> <td><p><a href="#" onclick="change2('upload');" >Upload Image</a></td> </tr><tr><td colspan="2"><div id="upload" style="display:none;"><table width="100%" border="0" align="center"> <?php echo addfield('file','Upload New Image <br>(jpg files only)','file','','Select image');?> </table></div> </td></tr><tr class="text">