microframework /data/cmsFront/class/class.content.php

Language PHP Lines 47
MD5 Hash c308a134e29341959fe22108f0a786a6 Estimated Cost $538 (why?)
Repository https://bitbucket.org/greenbox/microframework View Raw File View Project SPDX
 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
<?php

function content_check($content){

/**

Function made in 22.11.2010



How To:

[input]gen[/input] <-- function()

[input]gen!!12[/input] <-- function!!value

[input]gen!!12!!terek[/input] <-- class!!function!!value 



More questions to net-sos@inbox.lv



This is not a class



**/



// Read more iznemt no txt 23.11.2010

$content = str_replace('[more]','',$content ); 

$content = str_replace('[start]','',$content ); 





preg_match_all('|\[input\](.+)\[\/input\]|U', $content, $matches, PREG_SET_ORDER);

if($matches[0]<> ''){

$return = $content;

foreach ($matches as $val) 

{

$datafield = explode("!!", $val[1]);

if($datafield[2] <> ''){

//Include New Class

classload ($datafield[0]);

$funcRes = $datafield[1]($datafield[2]);

}else if($datafield[1] <> ''){

$funcRes = $datafield[0]($datafield[1]);

//echo $datafield[0];

//echo $datafield[1];

}else{

$funcRes = $datafield[0]();

}

	$return = str_replace($val[0],$funcRes,$return );

	//$return .= $val[1];

}

}else{

$return = $content;

}

return $return;

}

?>
Back to Top