Advertisement
Guest User

Untitled

a guest
Sep 4th, 2012
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.31 KB | None | 0 0
  1. <?
  2.  
  3. require 'cp-includes/inc-confdata.php';
  4. require 'cp-includes/inc-branding.php';
  5.  
  6.  
  7. require 'cp-includes/inc-resource.php';
  8.  
  9.  
  10. require 'cp-includes/inc-general.php';
  11.  
  12.  
  13. require 'cp-includes/inc-functions.php';
  14.  
  15.  
  16. require 'cp-includes/inc-secure.php';
  17.  
  18.  
  19. if ($demo)
  20. {
  21. $dis = 'disabled=\'disabled\'';
  22. }
  23. else
  24. {
  25. $dis = '';
  26. }
  27.  
  28. $page_titl = 'Add Listing';
  29. $page_desc = '';
  30. $page_keys = '';
  31. $page_this = 'l';
  32. $page_mode = 'la';
  33. $page_subn = 'a';
  34. $path_root = '';
  35. $link = mysql_connect ($dbhost, $dbuser, $dbpass);
  36. mysql_select_db ($dbname, $link);
  37. $result = mysql_query ('SELECT * FROM ' . $dbconf, $link);
  38. $conf = mysql_fetch_array ($result);
  39. $conf = safe_data ($conf, 'display');
  40. if ($_SESSION[c2][maxlist] <= $_SESSION[c2][listings])
  41. {
  42. if ($_SESSION[c2][maxlist] != 0)
  43. {
  44. header ('location:cp-list-index.php');
  45. }
  46. }
  47.  
  48. if ($_POST[submit])
  49. {
  50. if (!($demo))
  51. {
  52. $_POST = safe_data ($_POST, 'query');
  53. if (!($_POST[userid]))
  54. {
  55. $error .= 'Please select a <b>User</b> to assign this listing to.<br/>';
  56. }
  57.  
  58. if ($_POST[model_year])
  59. {
  60. if (!(ereg ('[0-9]{4}', $_POST[model_year])))
  61. {
  62. $error .= 'Please enter a 4 digit number for the <b>Model Year</b>.<br/>';
  63. }
  64. }
  65.  
  66. if (!($_POST[make]))
  67. {
  68. $error .= 'Please select a <b>Make</b> for this listing.<br/>';
  69. }
  70.  
  71. if (!($_POST[model]))
  72. {
  73. $error .= 'Please enter the <b>Model</b> for this listing.<br/>';
  74. }
  75.  
  76. if (!($_POST[cond]))
  77. {
  78. $error .= 'Please select a <b>Condition</b> for this listing.<br/>';
  79. }
  80.  
  81. if (!($_POST[category]))
  82. {
  83. $error .= 'Please select a <b>Category</b> for this listing.<br/>';
  84. }
  85.  
  86. if (!($error))
  87. {
  88. if ($_POST[month])
  89. {
  90. if ($_POST[day])
  91. {
  92. if ($_POST[year])
  93. {
  94. $expire = mktime (1, 0, 0, $_POST[month], $_POST[day], $_POST[year]);
  95. }
  96. }
  97. }
  98.  
  99. if ($_POST[mileage])
  100. {
  101. $_POST[mileage] = price ($_POST[mileage]);
  102. }
  103.  
  104. if ($_POST[price])
  105. {
  106. $_POST[price] = price ($_POST[price]);
  107. }
  108.  
  109. if ($_POST[sale])
  110. {
  111. $_POST[sale] = price ($_POST[sale]);
  112. }
  113.  
  114. $result = mysql_query ('SELECT user_type,expire FROM ' . $dbacct . ' WHERE id=\'' . $_POST['userid'] . '\' LIMIT 1', $link);
  115. $row = mysql_fetch_array ($result);
  116. if (!(mysql_query ('INSERT INTO ' . $dblist . ' VALUES(\'0\',
  117. \'' . $_POST['userid'] . '\',
  118. \'' . $_POST['location'] . '\',
  119. \'' . $row['type'] . '\',
  120.  
  121. \'' . time () . '\',
  122. \'' . time () . ('\',
  123. \'' . $expire . '\',
  124. \'' . $row['expire'] . '\',
  125. \'0\',
  126. \'0\',
  127.  
  128. \'' . $_POST['hide'] . '\',
  129. \'' . $_POST['featured'] . '\',
  130. \'' . $_POST['status'] . '\',
  131. \'1\',
  132.  
  133. \'' . $_POST['stock'] . '\',
  134. \'' . $_POST['vin'] . '\',
  135. \'' . $_POST['model_year'] . '\',
  136. \'' . $_POST['make'] . '\',
  137. \'' . $_POST['model'] . '\',
  138. \'' . $_POST['cond'] . '\',
  139. \'' . $_POST['category'] . '\',
  140. \'' . $_POST['category2'] . '\',
  141. \'' . $_POST['mileage'] . '\',
  142. \'' . $_POST['mileage_alt'] . '\',
  143. \'' . $_POST['price'] . '\',
  144. \'' . $_POST['sale'] . '\',
  145. \'' . $_POST['price_alt'] . '\',
  146.  
  147. \'' . $_POST['exterior'] . '\',
  148. \'' . $_POST['interior'] . '\',
  149. \'' . $_POST['doors'] . '\',
  150. \'' . $_POST['fuel'] . '\',
  151. \'' . $_POST['drive'] . '\',
  152.  
  153. \'' . $_POST['engine'] . '\',
  154. \'' . $_POST['trans'] . '\',
  155. \'' . $_POST['top_speed'] . '\',
  156. \'' . $_POST['horsepower'] . '\',
  157. \'' . $_POST['torque'] . '\',
  158. \'' . $_POST['towing'] . '\',
  159.  
  160. \'' . $_POST['features'] . '\',
  161. \'' . $_POST['description'] . '\',
  162.  
  163. \'' . $_POST['tagline'] . '\',
  164. \'' . $_POST['link_url'] . '\',
  165. \'' . $_POST['link_text'] . '\',
  166. \'' . $_POST['ebay_url'] . '\')'), $link)))
  167. {
  168. exit (mysql_error ());
  169. }
  170.  
  171. $listid = mysql_insert_id ($link);
  172. if (!(mysql_query ('UPDATE ' . $dbacct . ' SET listings=listings+1 WHERE id=\'' . $_POST['userid'] . '\' LIMIT 1', $link)))
  173. {
  174. exit (mysql_error ());
  175. }
  176.  
  177. if ($_POST[userid] == $_SESSION[c2][userid])
  178. {
  179. ++$_SESSION[c2][listings];
  180. }
  181.  
  182. if (!(mysql_query ('UPDATE ' . $dbloca . ' SET listings=listings+1 WHERE id=\'' . $_POST['location'] . '\' LIMIT 1', $link)))
  183. {
  184. exit (mysql_error ());
  185. }
  186.  
  187. if (!(mysql_query ('INSERT INTO ' . $dbfeat . ' (id) VALUES(\'' . $listid . '\')', $link)))
  188. {
  189. exit (mysql_error ());
  190. }
  191.  
  192. foreach ($_POST as $id => $value)
  193. {
  194. if (substr ($id, 0, 2) == 'cp')
  195. {
  196. if (!(mysql_query ('UPDATE ' . $dbfeat . ' SET ' . $id . '=\'' . $value . '\' WHERE id=\'' . $listid . '\' LIMIT 1', $link)))
  197. {
  198. exit (mysql_error ());
  199. }
  200.  
  201. continue;
  202. }
  203. }
  204.  
  205. header ('location:cp-list-summary.php?id=' . $listid . '&add=true');
  206. }
  207. else
  208. {
  209. $_POST = safe_data ($_POST, 'display');
  210. }
  211. }
  212. }
  213. else
  214. {
  215. $_POST[userid] = $_SESSION[c2][userid];
  216. $_POST[location] = $conf[location];
  217. }
  218.  
  219. if ($_SESSION[c2][user_type] == 1)
  220. {
  221. if ($conf[user_mod])
  222. {
  223. $urestrict = '';
  224. }
  225. else
  226. {
  227. $urestrict = 'AND id=\'' . $_SESSION[c2][userid] . '\'';
  228. }
  229. }
  230. else
  231. {
  232. if ($_SESSION[c2][user_type] == 2)
  233. {
  234. if ($conf[admin_mod])
  235. {
  236. $urestrict = '';
  237. }
  238. else
  239. {
  240. $urestrict = 'AND (id=\'' . $_SESSION[c2][userid] . '\' OR user_type=\'1\')';
  241. }
  242. }
  243. else
  244. {
  245. $urestrict = '';
  246. }
  247. }
  248.  
  249. if ($_SESSION[c2][user_type] == 1)
  250. {
  251. if ($conf[user_expire])
  252. {
  253. $expire = true;
  254. }
  255. else
  256. {
  257. $expire = false;
  258. }
  259. }
  260. else
  261. {
  262. if ($_SESSION[c2][user_type] == 2)
  263. {
  264. if ($conf[admin_expire])
  265. {
  266. $expire = true;
  267. }
  268. else
  269. {
  270. $expire = false;
  271. }
  272. }
  273. else
  274. {
  275. $expire = true;
  276. }
  277. }
  278.  
  279. if ($_SESSION[c2][user_type] == 1)
  280. {
  281. if ($conf[user_feature])
  282. {
  283. $feature = true;
  284. }
  285. else
  286. {
  287. $feature = false;
  288. }
  289. }
  290. else
  291. {
  292. if ($_SESSION[c2][user_type] == 2)
  293. {
  294. if ($conf[admin_feature])
  295. {
  296. $feature = true;
  297. }
  298. else
  299. {
  300. $feature = false;
  301. }
  302. }
  303. else
  304. {
  305. $feature = true;
  306. }
  307. }
  308.  
  309. if ($_SESSION[c2][user_type] == 1)
  310. {
  311. if ($conf[user_hide])
  312. {
  313. $hide = true;
  314. }
  315. else
  316. {
  317. $hide = false;
  318. }
  319. }
  320. else
  321. {
  322. if ($_SESSION[c2][user_type] == 2)
  323. {
  324. if ($conf[admin_hide])
  325. {
  326. $hide = true;
  327. }
  328. else
  329. {
  330. $hide = false;
  331. }
  332. }
  333. else
  334. {
  335. $hide = true;
  336. }
  337. }
  338.  
  339. require 'cp-includes/inc-header.php';
  340. require 'cp-includes/inc-navigation.php';
  341. echo '
  342. <div id=\'content\'>
  343.  
  344. <h1>Add a New Listing</h1>
  345.  
  346. <p>You can use the form below to add a new listing to your database.</p>
  347.  
  348. ';
  349. if ($error)
  350. {
  351. echo '<div id=\'msg-error\'>' . $error . '</div>';
  352. }
  353.  
  354. echo '
  355. <p>Required fields are indicated by an asterisk (*)</p>
  356.  
  357. <form action=\'';
  358. echo $_SERVER[PHP_SELF];
  359. echo '\' method=\'post\'>
  360. <div class=\'form alt\'>
  361. <table border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  362.  
  363. <tr>
  364. <td class=\'label\'><label for=\'userid\'>Assign Listing To: *</label></td>
  365. <td class=\'field\'>
  366. <select class=\'widtha\' id=\'userid\' name=\'userid\' tabindex=\'1\'>
  367. ';
  368. $result = mysql_query ('SELECT id,CONCAT(first_name,\' \',last_name) AS name FROM ' . $dbacct . '
  369. WHERE (maxlist=\'\' OR listings<maxlist) ' . $urestrict . ' ORDER BY name ASC', $link);
  370. while ($row = mysql_fetch_array ($result))
  371. {
  372. $row = safe_data ($row, 'display');
  373. echo '<option value=\'' . $row['id'] . '\'';
  374. if ($row[id] == $_POST[userid])
  375. {
  376. echo ' selected=\'selected\'';
  377. }
  378.  
  379. echo '>' . $row['name'] . '</option>';
  380. }
  381.  
  382. echo ' </select>
  383. </td>
  384. <td class=\'label\'><label for=\'expire\'>Listing Expiration:</label></td>
  385. <td>
  386. ';
  387. if ($expire)
  388. {
  389. echo ' <select name=\'month\' style=\'width:98px;\' tabindex=\'4\'>
  390. <option value=\'\'></option>
  391. ';
  392. for ($n = 1; $n <= 12; ++$n)
  393. {
  394. $month = date ('F', mktime (0, 0, 0, $n, 1, date ('Y')));
  395. echo '<option value=\'' . $n . '\' ';
  396. if ($n == $_POST[month])
  397. {
  398. echo 'selected';
  399. }
  400.  
  401. echo '>' . $month . '</option>';
  402. }
  403.  
  404. echo ' </select>
  405. <select name=\'day\' style=\'width:45px;\' tabindex=\'5\'>
  406. <option value=\'\'></option>
  407. ';
  408. for ($n = 1; $n <= 31; ++$n)
  409. {
  410. echo '<option value=\'' . $n . '\' ';
  411. if ($n == $_POST[day])
  412. {
  413. echo 'selected';
  414. }
  415.  
  416. echo '>' . $n . '</option>';
  417. }
  418.  
  419. echo ' </select>
  420. <select name=\'year\' style=\'width:55px;\' tabindex=\'6\'>
  421. <option value=\'\'></option>
  422. ';
  423. for ($n = date ('Y') - 1; $n <= date ('Y') + 5; ++$n)
  424. {
  425. echo '<option value=\'' . $n . '\' ';
  426. if ($n == $_POST[year])
  427. {
  428. echo 'selected';
  429. }
  430.  
  431. echo '>' . $n . '</option>';
  432. }
  433.  
  434. echo ' </select>
  435. ';
  436. }
  437. else
  438. {
  439. echo ' <i>Disabled</i>
  440. ';
  441. }
  442.  
  443. echo ' </td>
  444. </tr>
  445.  
  446. <tr>
  447. <td><label for=\'location\'>Location: *</label></td>
  448. <td>
  449. <select class=\'widtha\' id=\'location\' name=\'location\' tabindex=\'2\'>
  450. ';
  451. if ($_SESSION[c2][location])
  452. {
  453. $lrestrict = 'WHERE id=\'' . $_SESSION[c2][location] . '\'';
  454. }
  455.  
  456. $result = mysql_query ('SELECT id,name FROM ' . $dbloca . ' ' . $lrestrict . ' ORDER BY name ASC', $link);
  457. while ($row = mysql_fetch_array ($result))
  458. {
  459. $row = safe_data ($row, 'display');
  460. echo '<option value=\'' . $row['id'] . '\'';
  461. if ($row[id] == $_POST[location])
  462. {
  463. echo ' selected=\'selected\'';
  464. }
  465.  
  466. echo '>' . $row['name'] . '</option>';
  467. }
  468.  
  469. echo ' </select>
  470. </td>
  471. <td class=\'label\'><label for=\'featured\'>Feature this Listing:</label></td>
  472. <td>
  473. ';
  474. if ($feature)
  475. {
  476. echo ' <input class=\'check\' type=\'checkbox\' id=\'featured\' name=\'featured\' value=\'1\' ';
  477. if ($_POST[featured])
  478. {
  479. echo 'checked="checked"';
  480. }
  481.  
  482. echo ' tabindex=\'7\'/>&nbsp;&nbsp;
  483. Check to feature this listing
  484. ';
  485. }
  486. else
  487. {
  488. echo ' <i>Disabled</i>
  489. ';
  490. }
  491.  
  492. echo ' </td>
  493. </tr>
  494.  
  495. <tr>
  496. <td><label for=\'status\'>Listing Status: *</label></td>
  497. <td>
  498. <select class=\'widtha\' id=\'status\' name=\'status\' tabindex=\'3\'>
  499. ';
  500. for ($n = 1; $n <= 3; ++$n)
  501. {
  502. echo '<option value=\'' . $n . '\'';
  503. if ($n == $_POST[status])
  504. {
  505. echo ' selected=\'selected\'';
  506. }
  507.  
  508. echo '>' . $status[$n] . '</option>';
  509. }
  510.  
  511. echo ' </select>
  512. </td>
  513. <td class=\'label\'><label for=\'hide\'>Hide this Listing:</label></td>
  514. <td>
  515. ';
  516. if ($hide)
  517. {
  518. echo ' <input class=\'check\' type=\'checkbox\' id=\'hide\' name=\'hide\' value=\'1\' ';
  519. if ($_POST[hide])
  520. {
  521. echo 'checked="checked"';
  522. }
  523.  
  524. echo ' tabindex=\'8\'/>&nbsp;&nbsp;
  525. Check to hide this listing
  526. ';
  527. }
  528. else
  529. {
  530. echo ' <i>Disabled</i>
  531. ';
  532. }
  533.  
  534. echo ' </td>
  535. </tr>
  536.  
  537. </table>
  538. </div>
  539.  
  540. <div class=\'form\'>
  541. <table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  542.  
  543. <tr>
  544. <td class=\'label\'><label for=\'stock\'>Stock Number:</label></td>
  545. <td class=\'field\'><input class=\'widtha\' type=\'text\' id=\'stock\' name=\'stock\' value=\'';
  546. echo $_POST[stock];
  547. echo '\' tabindex=\'9\'/></td>
  548. <td class=\'label\'><label for=\'category\'>Category: *</label></td>
  549. <td>
  550. <select class=\'widtha\' id=\'category\' name=\'category\' tabindex=\'15\'>
  551. <option value=\'\'>&nbsp;</option>
  552. ';
  553. dropdown (explode ('
  554. ', $conf[categories]), $_POST[category]);
  555. echo ' </select>
  556. </td>
  557. </tr>
  558.  
  559. <tr>
  560. <td><label for=\'vin\'>';
  561. echo $conf[vin];
  562. echo ':</label></td>
  563. <td><input class=\'widtha\' type=\'text\' id=\'vin\' name=\'vin\' value=\'';
  564. echo $_POST[vin];
  565. echo '\' tabindex=\'10\'/></td>
  566. <td><label for=\'category2\'>Secondary Category:</label></td>
  567. <td>
  568. <select class=\'widtha\' id=\'category2\' name=\'category2\' tabindex=\'16\'>
  569. <option value=\'\'>&nbsp;</option>
  570. ';
  571. dropdown (explode ('
  572. ', $conf[categories]), $_POST[category2]);
  573. echo ' </select>
  574. </td>
  575. </tr>
  576.  
  577. <tr>
  578. <td><label for=\'model_year\'>Model Year:</label></td>
  579. <td><input class=\'widthb\' type=\'text\' id=\'model_year\' name=\'model_year\' value=\'';
  580. echo $_POST[model_year];
  581. echo '\' maxlength=\'4\' tabindex=\'11\'/>
  582. (';
  583. echo date ('Y');
  584. echo ')</td>
  585. <td><label for=\'mileage\'>';
  586. echo $conf[units];
  587. echo ':</label></td>
  588. <td><input class=\'widtha\' type=\'text\' id=\'mileage\' name=\'mileage\' value=\'';
  589. echo $_POST[mileage];
  590. echo '\' tabindex=\'17\'/></td>
  591. </tr>
  592.  
  593. <tr>
  594. <td><label for=\'make\'>Make: *</label></td>
  595. <td>
  596. <select class=\'widtha\' id=\'make\' name=\'make\' tabindex=\'12\'>
  597. <option value=\'\'>&nbsp;</option>
  598. ';
  599. dropdown (explode ('
  600. ', $conf[makes]), $_POST[make]);
  601. echo ' </select>
  602. </td>
  603. <td><label for=\'mileage_alt\'>Usage:</label></td>
  604. <td><input class=\'widtha\' type=\'text\' id=\'mileage_alt\' name=\'mileage_alt\' value=\'';
  605. echo $_POST[mileage_alt];
  606. echo '\' tabindex=\'18\'/></td>
  607. </tr>
  608.  
  609. <tr>
  610. <td><label for=\'model\'>Model: *</label></td>
  611. <td><input class=\'widtha\' type=\'text\' id=\'model\' name=\'model\' value=\'';
  612. echo $_POST[model];
  613. echo '\' tabindex=\'13\'/></td>
  614. <td><label for=\'price\'>Price:</label></td>
  615. <td><input class=\'widtha\' type=\'text\' id=\'price\' name=\'price\' value=\'';
  616. echo $_POST[price];
  617. echo '\' tabindex=\'19\'/></td>
  618. </tr>
  619.  
  620. <tr>
  621. <td><label for=\'cond\'>Condition: *</label></td>
  622. <td>
  623. <select class=\'widtha\' id=\'cond\' name=\'cond\' tabindex=\'14\'>
  624. <option value=\'\'>&nbsp;</option>
  625. ';
  626. dropdown (explode ('
  627. ', $conf[conditions]), $_POST[cond]);
  628. echo ' </select>
  629. </td>
  630. <td><label for=\'sale\'>Sale Price:</label></td>
  631. <td><input class=\'widtha\' type=\'text\' id=\'sale\' name=\'sale\' value=\'';
  632. echo $_POST[sale];
  633. echo '\' tabindex=\'20\'/></td>
  634. </tr>
  635.  
  636. <tr>
  637. <td></td>
  638. <td></td>
  639. <td><label for=\'price_alt\'>Price Alternative:</label></td>
  640. <td><input class=\'widtha\' type=\'text\' id=\'price_alt\' name=\'price_alt\' value=\'';
  641. echo $_POST[price_alt];
  642. echo '\' tabindex=\'21\'/></td>
  643. </tr>
  644.  
  645. </table>
  646. </div>
  647.  
  648. <div class=\'form alt\'>
  649. <table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  650.  
  651. <tr>
  652. <td class=\'label\'><label for=\'exterior\'>Exterior Color:</label></td>
  653. <td class=\'field\'><input class=\'widtha\' type=\'text\' id=\'exterior\' name=\'exterior\' value=\'';
  654. echo $_POST[exterior];
  655. echo '\' tabindex=\'22\'/></td>
  656. <td class=\'label\'><label for=\'engine\'>Engine:</label></td>
  657. <td><input class=\'widtha\' type=\'text\' id=\'engine\' name=\'engine\' value=\'';
  658. echo $_POST[engine];
  659. echo '\' tabindex=\'27\'/></td>
  660. </tr>
  661.  
  662. <tr>
  663. <td><label for=\'interior\'>Interior Color:</label></td>
  664. <td><input class=\'widtha\' type=\'text\' id=\'interior\' name=\'interior\' value=\'';
  665. echo $_POST[interior];
  666. echo '\' tabindex=\'23\'/></td>
  667. <td><label for=\'trans\'>Transmission:</label></td>
  668. <td>
  669. <select class=\'widtha\' id=\'trans\' name=\'trans\' tabindex=\'28\'>
  670. <option value=\'\'>&nbsp;</option>
  671. ';
  672. dropdown (explode ('
  673. ', $conf[transmissions]), $_POST[trans]);
  674. echo ' </select>
  675. </td>
  676. </tr>
  677.  
  678. <tr>
  679. <td><label for=\'doors\'>Doors:</label></td>
  680. <td><input class=\'widtha\' type=\'text\' id=\'doors\' name=\'doors\' value=\'';
  681. echo $_POST[doors];
  682. echo '\' tabindex=\'24\'/></td>
  683. <td><label for=\'top_speed\'>Top Speed:</label></td>
  684. <td><input class=\'widtha\' type=\'text\' id=\'top_speed\' name=\'top_speed\' value=\'';
  685. echo $_POST[top_speed];
  686. echo '\' tabindex=\'29\'/></td>
  687. </tr>
  688.  
  689. <tr>
  690. <td><label for=\'fuel\'>Fuel Type:</label></td>
  691. <td>
  692. <select class=\'widtha\' id=\'fuel\' name=\'fuel\' tabindex=\'25\'>
  693. <option value=\'\'>&nbsp;</option>
  694. ';
  695. dropdown (explode ('
  696. ', $conf[fuels]), $_POST[fuel]);
  697. echo ' </select>
  698. </td>
  699. <td><label for=\'horsepower\'>Horsepower:</label></td>
  700. <td><input class=\'widtha\' type=\'text\' id=\'horsepower\' name=\'horsepower\' value=\'';
  701. echo $_POST[horsepower];
  702. echo '\' tabindex=\'30\'/></td>
  703. </tr>
  704.  
  705. <tr>
  706. <td><label for=\'drive\'>Drive Train:</label></td>
  707. <td><input class=\'widtha\' type=\'text\' id=\'drive\' name=\'drive\' value=\'';
  708. echo $_POST[drive];
  709. echo '\' tabindex=\'26\'/></td>
  710. <td><label for=\'torque\'>Torque:</label></td>
  711. <td><input class=\'widtha\' type=\'text\' id=\'torque\' name=\'torque\' value=\'';
  712. echo $_POST[torque];
  713. echo '\' tabindex=\'31\'/></td>
  714. </tr>
  715.  
  716. <tr>
  717. <td></td>
  718. <td></td>
  719. <td><label for=\'towing\'>Towing Capacity:</label></td>
  720. <td><input class=\'widtha\' type=\'text\' id=\'towing\' name=\'towing\' value=\'';
  721. echo $_POST[towing];
  722. echo '\' tabindex=\'32\'/></td>
  723. </tr>
  724.  
  725. </table>
  726. </div>
  727.  
  728. <div class=\'form\'>
  729. <table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  730.  
  731. <tr>
  732. <td align=\'center\'>
  733.  
  734. ';
  735. $result = mysql_query ('SELECT * FROM ' . $dbcapt . ' ORDER BY caption ASC', $link);
  736. if (mysql_num_rows ($result))
  737. {
  738. $cnt = mysql_num_rows ($result);
  739. $num = ceil ($cnt / 3);
  740. echo '<table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'><tr><td style=\'text-align:left;\' width=\'34%\' valign=\'top\'>';
  741. $n = 1;
  742. while ($row = mysql_fetch_array ($result))
  743. {
  744. echo '<div class=\'check\'>';
  745. echo '<input class=\'check\' type=\'checkbox\' id=\'cp' . $row['id'] . '\' name=\'cp' . $row['id'] . '\' value=\'1\'';
  746. if ($_POST['cp' . $row['id']])
  747. {
  748. echo ' checked=\'checked\'';
  749. }
  750.  
  751. echo '/>';
  752. echo '&nbsp;&nbsp;&nbsp;<label for=\'cp' . $row['id'] . '\'>' . $row['caption'] . '</label>';
  753. echo '</div>';
  754. if ($n % $num == 0)
  755. {
  756. if ($n < $cnt)
  757. {
  758. echo '</td><td style=\'text-align:left;\' width=\'33%\' valign=\'top\'>';
  759. }
  760. }
  761.  
  762. ++$n;
  763. }
  764.  
  765. echo '</td></tr></table>';
  766. }
  767. else
  768. {
  769. echo 'There are no QuickSelect features available for selection.';
  770. }
  771.  
  772. echo '
  773. </td>
  774. </tr>
  775.  
  776. </table>
  777. </div>
  778.  
  779. <div class=\'form alt\'>
  780. <table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  781.  
  782. <tr>
  783. <td width=\'380\'><label for=\'features\'>Additional Features: (list one feature per line)</label></td>
  784. <td><label for=\'description\'>Description:</label></td>
  785. </tr>
  786.  
  787. <tr>
  788. <td><textarea class=\'widtha\' id=\'features\' name=\'features\'>';
  789. echo $_POST[features];
  790. echo '</textarea></td>
  791. <td><textarea class=\'widtha\' id=\'description\' name=\'description\'>';
  792. echo $_POST[description];
  793. echo '</textarea></td>
  794. </tr>
  795.  
  796. </table>
  797. </div>
  798.  
  799. <div class=\'form\'>
  800. <table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  801.  
  802.  
  803. <tr>
  804. <td class=\'label\'><label for=\'tagline\'>Tagline:</label></td>
  805. <td><input class=\'widthc\' type=\'text\' id=\'tagline\' name=\'tagline\' value=\'';
  806. echo $_POST[tagline];
  807. echo '\' maxlength=\'200\'/></td>
  808. </tr>
  809.  
  810. <tr>
  811. <td class=\'label\'><label for=\'link_url\'>Additional Info URL:</label></td>
  812. <td><input class=\'widthc\' type=\'text\' id=\'link_url\' name=\'link_url\' value=\'';
  813. echo $_POST[link_url];
  814. echo '\'/></td>
  815. </tr>
  816.  
  817. <tr>
  818. <td><label for=\'link_text\'>Additional Info Text:</label></td>
  819. <td><input class=\'widtha\' type=\'text\' id=\'link_text\' name=\'link_text\' value=\'';
  820. echo $_POST[link_text];
  821. echo '\'/>&nbsp;
  822. (this is the text that will appear as the link, 25 character limit)</td>
  823. </tr>
  824.  
  825. <tr>
  826. <td class=\'label\'><label for=\'ebay_url\'>eBay Auction URL:</label></td>
  827. <td><input class=\'widthc\' type=\'text\' id=\'ebay_url\' name=\'ebay_url\' value=\'';
  828. echo $_POST[ebay_url];
  829. echo '\'/></td>
  830. </tr>
  831.  
  832. </table>
  833. </div>
  834.  
  835. <div class=\'form alt\'>
  836. <table width=\'100%\' border=\'0\' cellpadding=\'0\' cellspacing=\'0\'>
  837.  
  838. <tr>
  839. <td align=\'center\'><input type=\'submit\' name=\'submit\' value=\'Submit Listing\' ';
  840. echo $dis;
  841. echo '/></td>
  842. </tr>
  843.  
  844. </table>
  845. </div>
  846.  
  847. </form>
  848.  
  849. </div>
  850.  
  851. ';
  852. require 'cp-includes/inc-footer.php';
  853. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement