Skip to content

@dodyrw /modify_form.html
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
get listing types (indexu deluxe)
<%include file="header.html"
title=$smarty.const.PT_MODIFY_URL
meta_keywords=""
meta_description=""
%>
<!-- mod: retrieve listing type from database -->
<%php%>
global $dbConn;
$id = $_GET['id'];
// premium sponsored
$query = "select * from idx_paid_listing where link_id = '$id'";
$row2 = $dbConn->FetchOne($query);
$raw_premium = $row2["premium"];
$raw_sponsored = $row2["sponsored"];
$raw_expire = $row2["expire"];
$raw_paid = $row2["paid"];
$premium = 0;
$sponsored = 0;
if ($raw_paid == 1 &&
$raw_premium == 1 &&
@strtotime("now") < @strtotime($raw_expire)) {
$premium = 1;
$sponsored = 0;
}
if ($raw_paid == 1 &&
$raw_sponsored == 1 &&
@strtotime("now") < @strtotime($raw_expire)) {
$premium = 0;
$sponsored = 1;
}
if (!$premium && !$sponsored) {
$basic = 1;
}
$this->assign('status_basic', $basic);
$this->assign('status_premium', $premium);
$this->assign('status_sponsored', $sponsored);
<%/php%>
<!-- /mod: retrieve listing type from database -->
<div id="content_left_area">
<div class="content_box_full">
<%$hook_html_modify_form_begin%>
<h3><%t%>Update a Listing<%/t%></h3>
<!-- this is how to call the listing type from mod above -->
<%if $status_basic%>
Basic Listing
<%/if%>
<%if $status_premium%>
Premium Listing
<%/if%>
<%if $status_sponsored%>
Sponsored Listing
<%/if%>
<!-- /this is how to call the listing type from mod above -->
<script language="javascript" type="text/javascript" src="<%$tpl_base%>/calendar.js"></script>
<script language="javascript" type="text/javascript" src="<%$tpl_base%>/calendar-en.js"></script>
<script language="javascript" type="text/javascript" src="<%$tpl_base%>/calendar-setup.js"></script>
<script language="javascript" type="text/javascript" src="<%$tpl_base%>/jquery.js"></script>
<script language="javascript" type="text/javascript" src="<%$tpl_base%>/ajax.js"></script>
<script language="javascript" type="text/javascript" src="<%$tpl_base%>/categories.enables.js"></script>
<form action="modify.php" method="post" enctype="multipart/form-data" name="modify_frm">
<input type="hidden" id="form_name" value="modify_frm" />
<input type="hidden" name="pflag" value="modify" />
<input type="hidden" name="link_id" value="<%$link_id%>" />
<fieldset>
<%$hook_html_modify_form_inside_form_begin%>
<%if $error_msg%>
<div id="error_msg"><%$error_msg%></div>
<%/if%>
<%$hook_html_modify_form_inside_form_title%>
<%if $title_is_visible%>
<div>
<label><%t%>Title<%/t%></label>
<span><input type="text" name="title" value="<%$title%>" /></span>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_url%>
<%if $url_is_visible%>
<div>
<label><%t%>Url<%/t%></label>
<span><input type="text" name="url" value="<%$url%>" /></span>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_description%>
<%if $description_is_visible%>
<div>
<label><%t%>Description<%/t%></label>
<textarea name="description"><%$description%></textarea>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_category%>
<div>
<label><%t%>Category<%/t%></label>
<label id="cat_div"><%$category%></label>
</div>
<%$hook_html_modify_form_inside_form_category1%>
<div>
<label><%t%>Additional Category 1<%/t%></label>
<label id="add_cat1_div"><%$add_cat1%></label>
</div>
<%$hook_html_modify_form_inside_form_category2%>
<div>
<label><%t%>Additional Category 2<%/t%></label>
<label id="add_cat2_div"><%$add_cat2%></label>
</div>
<%$hook_html_modify_form_inside_form_contact_name%>
<%if $contact_name_is_visible%>
<div>
<label><%t%>Contact Name<%/t%></label>
<span><input type="text" name="contact_name" value="<%$contact_name%>" /></span>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_contact_email%>
<%if $email_is_visible%>
<div>
<label><%t%>Email<%/t%></label>
<span><input type="text" name="email" value="<%$email%>" /></span>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_keywords%>
<%if $keywords_is_visible%>
<div>
<label><%t%>Keywords<%/t%></label>
<span><input type="text" name="keywords" value="<%$keywords%>" /></span>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_reciprocal_url%>
<%if $reciprocal_url_is_visible%>
<div>
<label><%t%>Reciprocal URL<%/t%></label>
<span><input type="text" name="reciprocal_url" value="<%$reciprocal_url%>" /></span>
</div>
<%/if%>
<%$hook_html_modify_form_inside_form_custom_field_form%>
<!-- remove <%$custom_field_form%> if you want to generate field manualy -->
<%$custom_field_form%>
<%$hook_html_modify_form_inside_form_end%>
<div>
<label>&nbsp;</label>
<input type="submit" class="input_submit" value="<%t%>Submit new update<%/t%>" />
</div>
</fieldset>
</form>
<%$hook_html_modify_form_end%>
</div>
</div>
<%include file="sidebar2.html"%>
<%include file="bottom.html"%>
<%include file="footer.html"%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.