public
Created

get listing types (indexu deluxe)

  • Download Gist
modify_form.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
<%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"%>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.