<?php $str_general = ''; if (isset($_POST['txt_input'])) { $string_input = $_POST['txt_input']; $case = isset($_POST['case_general']) ? $_POST['case_general'] : ''; switch ($case) { case "md5": $str_general = str_md5($string_input); break; case "jsonencode": $str_general = str_json($string_input, $case); break; case "jsondecode": $str_general = str_json($string_input, $case); break; case "baseencode": $str_general = str_base64($string_input, $case); break; case "basedecode": $str_general = str_base64($string_input, $case); break; case "urlencode": $str_general = str_urlencode($string_input, $case); break; case "urldecode": $str_general = str_urlencode($string_input, $case); break; default: $str_general = str_md5($string_input); }
$result .= "\"page\":{$pag},"; $result .= "\"total\":{$quanti}"; if ($quanti > 0) { $result .= ",\"rows\":["; while ($rs = mysql_fetch_array($rs_result)) { $img_del = '<img id="' . $rs['id'] . '" src="' . path_img . '/del.png" style="cursor:pointer;margin-right:5px" alt="" class="delete" title="Delete" />'; $img_get_code = '<img id="' . $rs['id'] . '" rel="' . path_stored_quizzes . '/' . $rs['id'] . '/' . $rs['code'] . '.php" src="' . path_img . '/code.png" style="cursor:pointer;margin-right:5px" alt="" class="getcode" title="Get ShortCode to include this quiz in your pages" />'; $img_edit = '<img id="' . $rs['id'] . '" rel="' . $rs['name'] . '" src="' . path_img . '/edit.png" style="cursor:pointer;margin-right:5px" alt="" class="edit" title="Edit" />'; $img_preview = '<a href="' . path_abs_sfw . '/preview.php?code=' . $rs['code'] . '&id=' . $rs['id'] . '" target="_blank"><img src="' . path_img . '/preview.png" style="cursor:pointer;margin-right:5px" alt="" class="preview" title="Quiz Preview" /></a>'; if (!$rs['status']) { $img_status = '<img src="' . path_img . '/exipred.png" title="Inactive" alt="" />'; } else { $img_status = '<img src="' . path_img . '/active.png" title="Active" alt="" />'; } $result .= '{'; $result .= '"id":"' . $rs['id'] . '",'; $result .= '"cell":{'; $result .= '"id":"' . $rs['id'] . '",'; $result .= '"check":"' . str_json('<input type="checkbox" id="' . $rs['id'] . '" value="' . $rs['id'] . '" name="box_elimina[]" class="check_selezione" align="absmiddle" />') . '",'; $result .= '"id":"' . str_json($rs['id']) . '",'; $result .= '"name":"' . str_json($rs['name']) . '",'; $result .= '"creation_date":"' . str_json(view_date($rs['creation_date'])) . '",'; $result .= '"status":"' . str_json($img_status) . '",'; $result .= '"actions":"' . str_json($img_edit . $img_preview . $img_get_code . $img_del) . '"'; $result .= '}},'; } $result = substr($result, 0, strlen($result) - 1); $result .= "]"; } $result .= "}"; echo $result;