function generate_manifest_unq_number() { $token = rand(1000, 10000); //generate the unique manifest number //small modification: we add also post code to generator $manifest_new_number = get_site_sesion() . "4" . get_post_code_session(get_site_sesion()) . "5" . rand(100, 10000) . $token; return $manifest_new_number; }
echo '</div>'; //here a space for a table with collection details echo '<p>Your manifest collection details: </p>'; echo '<div>'; echo '<table data-role="table" data-mode="columntoggle" class="ui-responsive" data-column-btn-text="Edit!" >'; echo '<thead><tr> <th data-priority="6">Collection</th> <th>First</th> <th data-priority="1">Last Sticker</th> <th>You collected: </th> </tr> </thead>'; echo '<tbody>'; echo '<tr>'; echo '<td>'; echo get_post_code_session(get_site_sesion()); echo '</td>'; echo '<td>'; echo $first_sticker = get_sticker_session(); echo '</td>'; echo '<td>'; echo $last_sticker; echo '</td>'; echo '<td>'; echo $range = calculate_sticker_range($first_sticker, $last_sticker); echo " items"; //add to db dbi_write_sticker_range($site_id, $range); echo '</td>'; echo '</tr>'; echo '</tbody>';